From: Tom Tromey <tromey@redhat.com>
To: Chris Moller <moller@nc.rr.com>
Cc: Project Archer <archer@sourceware.org>
Subject: Re: vtable?
Date: Thu, 14 Jan 2010 20:11:00 -0000 [thread overview]
Message-ID: <m38wc0fnvw.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4B4F5C02.8020909@nc.rr.com> (Chris Moller's message of "Thu, 14 Jan 2010 13:01:38 -0500")
Chris> One of my guesses of the moment is that under the circumstances of the
Chris> bug, the "vtable" is either being built wrong or is somehow being
Chris> corrupted--does anyone have a clue where the "vtable" is built?
From what I understand, gdb doesn't actually use the dwarf stuff to
build the class' vtable. There is a bug report or two in gcc bugzilla
about this; I gather that gcc doesn't emit all the needed info.
So, rather than rely on the dwarf, gdb encodes knowledge of the ABI.
Chris> Another guess is that in gnuv3_baseclass_offset, gnuv3_get_vtable is
Chris> being called with a bad type argument, but I haven't looked into that
Chris> yet.
I don't know about this code, but one interesting thing about the bug is
that casts to the base types seem to return the right answers:
(gdb) p e
$1 = (E *) 0x804a008
(gdb) p (D*)e
$2 = (D *) 0x804a00c
(gdb) p (C*)e
$3 = (C *) 0x804a010
This makes me wonder whether the bug is actually in the value printing
code -- because computing the base offsets seems to work in at least one
case.
That's just something I would look at though, don't give it too much
credence. I don't know much about this code.
Tom
next prev parent reply other threads:[~2010-01-14 20:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 18:01 vtable? Chris Moller
2010-01-14 20:11 ` Tom Tromey [this message]
2010-01-14 20:30 ` vtable? Chris Moller
2010-01-19 16:15 ` vtable? Chris Moller
2010-01-19 22:33 ` vtable? Tom Tromey
2010-01-20 8:44 ` vtable? Chris Moller
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=m38wc0fnvw.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=archer@sourceware.org \
--cc=moller@nc.rr.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).