Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: gdb/testsuite/gdb.cp/inherit.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/infcall-dlopen.exp ('k') | gdb/testsuite/gdb.cp/koenig.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.cp/inherit.exp
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index c970d03bcbca72f0a38f3c03e5ff73c1cffddaab..fc5f2e28787f13b3fec37e21729c371ee4590583 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -21,21 +21,14 @@ set ws "\[\r\n\t \]+"
set nl "\[\r\n\]+"
set vhn "\\$\[0-9\]+"
-if $tracelevel then {
- strace $tracelevel
-}
-
if { [skip_cplus_tests] } { continue }
load_lib "cp-support.exp"
-set testfile "inherit"
-set srcfile misc.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile misc.cc
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- untested inherit.exp
- return -1
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+ return -1
}
# Single inheritance, print type definitions.
@@ -325,25 +318,11 @@ proc test_print_mi_members {} {
# Print all members of g_D.
#
- # g_D.A::a and g_D.A::x are ambiguous member accesses, and gdb
- # should detect these. There are no ways to PASS these tests
- # because I don't know what the gdb message will be. -- chastain
- # 2004-01-27.
-
- set name "print g_D.A::a"
- gdb_test_multiple "print g_D.A::a" $name {
- -re "$vhn = (15|11)$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::a"
- }
- }
-
- set name "print g_D.A::x"
- gdb_test_multiple "print g_D.A::x" $name {
- -re "$vhn = (16|12)$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::x"
- }
- }
-
+ # g_D.A::a and g_D.A::x are ambiguous member accesses.
+ gdb_test "print g_D.A::a" "base class 'A' is ambiguous in type 'D'"
+ gdb_test "print g_D.C::a" "$vhn = 15"
+ gdb_test "print g_D.B::a" "$vhn = 11"
+ gdb_test "print g_D.A::x" "base class 'A' is ambiguous in type 'D'"
gdb_test "print g_D.B::b" "$vhn = 13"
gdb_test "print g_D.B::x" "$vhn = 14"
gdb_test "print g_D.C::c" "$vhn = 17"
@@ -354,20 +333,8 @@ proc test_print_mi_members {} {
# Print all members of g_E.
# g_E.A::a and g_E.A::x are ambiguous.
- set name "print g_E.A::a"
- gdb_test_multiple "print g_E.A::a" $name {
- -re "$vhn = (21|25)$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::a"
- }
- }
-
- set name "print g_E.A::x"
- gdb_test_multiple "print g_E.A::x" $name {
- -re "$vhn = (26|22)$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::x"
- }
- }
-
+ gdb_test "print g_E.A::a" "base class 'A' is ambiguous in type 'E'"
+ gdb_test "print g_E.A::x" "base class 'A' is ambiguous in type 'E'"
gdb_test "print g_E.B::b" "$vhn = 23"
gdb_test "print g_E.B::x" "$vhn = 24"
gdb_test "print g_E.C::c" "$vhn = 27"
@@ -410,25 +377,10 @@ proc test_print_mi_member_types {} {
# Print all members of g_D.
#
- # g_D.A::a and g_D.A::x are ambiguous member accesses, and gdb
- # should detect these. There are no ways to PASS these tests
- # because I don't know what the gdb message will be. -- chastain
- # 2004-01-27.
-
- set name "ptype g_D.A::a"
- gdb_test_multiple "ptype g_D.A::a" $name {
- -re "type = int$nl$gdb_prompt $" {
- kfail "gdb/68" "ptype g_D.A::a"
- }
- }
-
- set name "ptype g_D.A::x"
- gdb_test_multiple "ptype g_D.A::x" $name {
- -re "type = int$nl$gdb_prompt $" {
- kfail "gdb/68" "ptype g_D.A::x"
- }
- }
+ # g_D.A::a and g_D.A::x are ambiguous member accesses.
+ gdb_test "ptype g_D.A::a" "base class 'A' is ambiguous in type 'D'"
+ gdb_test "ptype g_D.A::x" "base class 'A' is ambiguous in type 'D'"
gdb_test "ptype g_D.B::b" "type = int"
gdb_test "ptype g_D.B::x" "type = int"
gdb_test "ptype g_D.C::c" "type = int"
@@ -439,20 +391,8 @@ proc test_print_mi_member_types {} {
# Print all members of g_E.
# g_E.A::a and g_E.A::x are ambiguous.
- set name "ptype g_E.A::a"
- gdb_test_multiple "ptype g_E.A::a" $name {
- -re "type = int$nl$gdb_prompt $" {
- kfail "gdb/68" "ptype g_E.A::a"
- }
- }
-
- set name "ptype g_E.A::x"
- gdb_test_multiple "ptype g_E.A::x" $name {
- -re "type = int$nl$gdb_prompt $" {
- kfail "gdb/68" "ptype g_E.A::x"
- }
- }
-
+ gdb_test "ptype g_E.A::a" "base class 'A' is ambiguous in type 'E'"
+ gdb_test "ptype g_E.A::x" "base class 'A' is ambiguous in type 'E'"
gdb_test "ptype g_E.B::b" "type = int"
gdb_test "ptype g_E.B::x" "type = int"
gdb_test "ptype g_E.C::c" "type = int"
@@ -674,7 +614,7 @@ proc test_print_mvi_classes { } {
# gcc 2.95.3 -gstabs+
pass $name
}
- -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = $hex, vc = 23, vx = 24\}, $re_vbptr_3_vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+ -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = ${hex}( <vtable for vD.*>)?, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <vtable for vC.*>)?, vc = 23, vx = 24\}, $re_vbptr_3_vD = ${hex}( <vtable for vD.*>)?, vd = 25, vx = 26\}$nl$gdb_prompt $" {
# gcc 3.3.2 -gdwarf-2
# gcc HEAD 2004-01-21 -gdwarf-2
# gcc HEAD 2004-01-21 -gstabs+
@@ -695,7 +635,7 @@ proc test_print_mvi_classes { } {
# gcc 2.95.3 -gstabs+
pass $name
}
- -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+ -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = ${hex}( <vtable for vE.*>)?, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <vtable for vE.*>)?, vc = 0, vx = 0\}, $re_vbptr_3_vD = ${hex}( <vtable for vE.*>)?, vd = 0, vx = 0\}, $re_vbptr_3_vE = ${hex}( <vtable for vE.*>)?, ve = 27, vx = 28\}$nl$gdb_prompt $" {
# gcc 3.3.4 -gdwarf-2
# gcc 3.3.4 -gstabs+
# gcc 3.4.1 -gdwarf-2
@@ -715,19 +655,6 @@ proc test_print_mvi_classes { } {
}
proc do_tests { } {
- global subdir
- global objdir
- global srcdir
- global binfile
-
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
gdb_test_no_output "set width 0"
if { ![runto_main] } then {
« no previous file with comments | « gdb/testsuite/gdb.cp/infcall-dlopen.exp ('k') | gdb/testsuite/gdb.cp/koenig.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698