This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [4/5] implement "info vtable"
- From: Tom Tromey <tromey at redhat dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 19 Jul 2012 11:01:04 -0600
- Subject: Re: [4/5] implement "info vtable"
- References: <87mx82prmd.fsf@fleche.redhat.com> <4F4F8D39.60507@redhat.com> <874ntpdg5s.fsf@fleche.redhat.com> <m24np4jdru.fsf@igel.home>
Andreas> [0]: @0x10014278: 0x10001b0c <A::f()>
Please try the appended.
Tom
b/gdb/testsuite/ChangeLog:
2012-07-19 Tom Tromey <tromey@redhat.com>
* gdb.cp/virtfunc.exp (make_one_vtable_result): Handle function
descriptor.
(test_info_vtbl): Remove unused globals.
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 4621a74..bef71c8 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -235,7 +235,9 @@ proc make_one_vtable_result {name args} {
set result "vtable for '${name}' @ $hex .subobject @ $hex.:$nls"
set count 0
foreach func $args {
- append result ".${count}.: $hex <$func..>${nls}"
+ # The (@$hex: ) part is because we might see a descriptor
+ # instead.
+ append result ".${count}.: (@$hex: )?$hex <$func..>${nls}"
incr count
}
@@ -245,10 +247,6 @@ proc make_one_vtable_result {name args} {
# Test "info vtbl".
proc test_info_vtbl {} {
- global hex
-
- set nls "\[\r\n\]+"
-
set vt_A [make_one_vtable_result A A::f]
set vt_B [make_one_vtable_result B B::f]
set vt_V [make_one_vtable_result V VB::vvb V::vv]