aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-05-21 19:47:54 +0000
committerTom Tromey <tromey@redhat.com>2012-05-21 19:47:54 +0000
commitb1af9e975066c48b043c5234199effd47115b4d4 (patch)
tree3a6e58a8b29679f4e34eecc734405b6f5420cde1 /gdb/testsuite
parent248537e34b516ddcd9489f76441d81139ca7e2f7 (diff)
downloadgdb-b1af9e975066c48b043c5234199effd47115b4d4.zip
gdb-b1af9e975066c48b043c5234199effd47115b4d4.tar.gz
gdb-b1af9e975066c48b043c5234199effd47115b4d4.tar.bz2
PR c++/7173:
* gnu-v3-abi.c (gnuv3_baseclass_offset): Return early for Java types. * value.h (value_cast_pointers): Update. * valops.c (value_cast_pointers): Add 'subclass_check' argument. (value_cast): Update. (update_search_result): New function. (do_search_struct_field): New, from search_struct_field. Check for ambiguous results. (search_struct_field): Rewrite. * infcall.c (value_arg_coerce): Update. * eval.c (evaluate_subexp_standard) <STRUCTOP_MEMBER>: Use value_cast_pointers. * ada-lang.c (ada_convert_actual): Update. testsuite * gdb.cp/inherit.exp (test_print_mi_members): Expect errors. Remove kfails. (test_print_mi_member_types): Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.cp/inherit.exp77
2 files changed, 18 insertions, 65 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8e36471..21809b8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2012-05-21 Tom Tromey <tromey@redhat.com>
+ * gdb.cp/inherit.exp (test_print_mi_members): Expect errors.
+ Remove kfails.
+ (test_print_mi_member_types): Likewise.
+
+2012-05-21 Tom Tromey <tromey@redhat.com>
+
* gdb.base/callfuncs.exp (do_function_calls): Update for 'set
print symbol' change.
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index 7e2e871..7a59053 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -321,25 +321,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"
@@ -350,20 +336,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"
@@ -406,25 +380,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"
@@ -435,20 +394,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"