This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4/5] implement "info vtable"

Andreas> [0]: @0x10014278: 0x10001b0c <A::f()>

Please try the appended.


2012-07-19  Tom Tromey  <>

	* gdb.cp/virtfunc.exp (make_one_vtable_result): Handle function
	(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]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]