diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-10-09 18:33:28 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-10-09 18:33:28 +0000 |
commit | a73d2258a7f0bd52aa9a4df764109c9df7f02e26 (patch) | |
tree | 63e08918a560f241cb08d68731fc9f8768ff2b1d /gdb/testsuite/gdb.cp | |
parent | af369495707bffd0a2bdfc8ba5a088e23d8d4b8f (diff) | |
download | gdb-a73d2258a7f0bd52aa9a4df764109c9df7f02e26.zip gdb-a73d2258a7f0bd52aa9a4df764109c9df7f02e26.tar.gz gdb-a73d2258a7f0bd52aa9a4df764109c9df7f02e26.tar.bz2 |
gdb/
Fix printed anonymous struct name.
* dwarf2read.c (fixup_partial_die): Handle for anonymous structs also
DW_TAG_interface_type. Strip for anonymous structs any prefixes.
(anonymous_struct_prefix): New function.
(determine_prefix): New variables retval. Call anonymous_struct_prefix.
(dwarf2_name): Strip for anonymous structs any prefixes.
gdb/testsuite/
Fix printed anonymous struct name.
* gdb.cp/anon-struct.exp (print type of X::t2): New test.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/anon-struct.exp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/anon-struct.exp b/gdb/testsuite/gdb.cp/anon-struct.exp index 0afb99a..ed51864 100644 --- a/gdb/testsuite/gdb.cp/anon-struct.exp +++ b/gdb/testsuite/gdb.cp/anon-struct.exp @@ -24,6 +24,9 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } gdb_test "ptype t::t" "type = void \\(t \\* const\\)" \ "print type of t::t" +gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \ + "print type of X::t2" + gdb_test "ptype X::t2::t2" "type = void \\(X::t2 \\* const\\)" \ "print type of X::t2::t2" |