From: Luis Machado <lgustavo@codesourcery.com>
To: "'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>
Subject: [PATCH, c++ testsuite] Fix a few failures in gdb.cp/virtfunc.exp
Date: Mon, 03 Jun 2013 12:31:00 -0000 [thread overview]
Message-ID: <51AC8CA2.3030008@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Hi,
I noticed a few tests failing for ppc64. Those are related to printing
virtual tables for objects.
Some of these failures are related to how the output from that command
comes out in a target that uses function descriptors.
This is the regular non-function-descriptor output:
info vtbl a
vtable for 'A' @ 0x401858 (subobject @ 0x603220):
[0]: 0x400d9a <A::f()>
vtable for 'V' @ 0x401880 (subobject @ 0x603230):
[0]: 0x400ea2 <VB::vvb()>
[1]: 0x400e16 <V::vv()>
And the output for a target that does function descriptors:
info vtbl a
vtable for 'A' @ 0x10013518 (subobject @ 0x10013e20):
[0]: @0x10013b88: 0x10001c6c <A::f()>
vtable for 'V' @ 0x10013540 (subobject @ 0x10013e30):
[0]: @0x10013cd8: 0x10001f74 <VB::vvb()>
[1]: @0x10013c48: 0x10001df4 <V::vv()>
As you can see, there are additional fields for each virtual function
pointer, and that is the address of the function descriptor.
The attached patch takes care of this.
OK?
[-- Attachment #2: vtbl_fd.diff --]
[-- Type: text/x-patch, Size: 694 bytes --]
2013-06-03 Luis Machado <lgustavo@codesourcery.com>
* gdb.cp/virtfunc.exp (make_one_vtable_result): Handle extra output
from targets that use function descriptors in the virtual tables.
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 2509cc7..4b73482 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -234,7 +234,7 @@ 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}"
+ append result ".${count}.:( @$hex:)? $hex <$func..>${nls}"
incr count
}
next reply other threads:[~2013-06-03 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 12:31 Luis Machado [this message]
2013-06-03 16:18 ` Tom Tromey
2013-06-04 8:53 ` Luis Machado
2013-06-04 9:03 ` Luis Machado
2013-06-04 9:10 ` Will Newton
2013-06-04 9:18 ` Luis Machado
2013-06-05 15:36 ` Tom Tromey
2013-06-05 20:39 ` Luis Machado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AC8CA2.3030008@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox