From edf3d5f3f8c5adff55934e57da9cd8c874dc2a55 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 2 Feb 2010 16:45:17 +0000 Subject: gdb PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * valops.c (search_struct_field): Compute nbases after calling CHECK_TYPEDEF. (check_field): Call CHECK_TYPEDEF. * cp-valprint.c (cp_print_value): Pass correct address to baseclass_offset. Fix check for virtual base past the end of the object. Don't offset address passed to cp_print_value_fields or apply_val_pretty_printer. (cp_print_value_fields): Fix call to val_print. (cp_print_value_fields_rtti): New function. * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti. * p-valprint.c (pascal_object_print_value_fields): Fix call to val_print. * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded offset to address. * language.h (struct language_defn) : Document. * c-lang.h (cp_print_value_fields_rtti): Declare. gdb/testsuite PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * gdb.cp/virtbase.cc: New file. * gdb.cp/virtbase.exp: New file. * gdb.cp/userdef.exp: Allow 'struct' or 'class'. --- gdb/testsuite/gdb.cp/userdef.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/testsuite/gdb.cp/userdef.exp') diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp index bd54c78..2bbf95e 100644 --- a/gdb/testsuite/gdb.cp/userdef.exp +++ b/gdb/testsuite/gdb.cp/userdef.exp @@ -153,7 +153,7 @@ gdb_test "break A2::'operator +'" ".*Breakpoint $decimal at.*" gdb_test "print c" "\\\$\[0-9\]* = {m = {z = .*}}" gdb_test "print *c" "\\\$\[0-9\]* = \\(Member &\\) @$hex: {z = .*}" gdb_test "print &*c" "\\\$\[0-9\]* = \\(Member \\*\\) $hex" -gdb_test "ptype &*c" "type = struct Member {\[\r\n \]+int z;\[\r\n\]+} &\\*" +gdb_test "ptype &*c" "type = (struct|class) Member {(\[\r\n \]+public:)?\[\r\n \]+int z;\[\r\n\]+} &\\*" gdb_exit return 0 -- cgit v1.1