From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/c++] Fix printing classes with virtual base classes
Date: Wed, 14 Nov 2001 22:41:00 -0000 [thread overview]
Message-ID: <20011127162612.A18178@nevyn.them.org> (raw)
In-Reply-To: <npd723j4lc.fsf@zwingli.cygnus.com>
They are both independent fixes. The fixes to gnu-v3-abi.c by
themselves fix several tests in virtfunc.exp when using G++ 3.0
(from XFAIL to XPASS, ugh...). Then if you look at the test logs, you
should find two failure modes for the ones that still fail. Some are
marked "virtual baseclass botch", and I am trying right now to fix
those; but I believe that one will just be wrong. That's because my
use of value_field in gnuv3_virtual_fn_field triggers the bug; the
value has not been read in yet, so only its address is copied, and the
embedded offset for the parent type is lost. We then get the wrong
vtable and call the wrong function.
I can't construct an independent testcase, but I think it should be
possible. Most things run afoul of the other "botch" bug.
On Tue, Nov 27, 2001 at 04:17:51PM -0500, Jim Blandy wrote:
>
> These are two independent fixes, right? I understand GDB may need
> them both before it works correctly; I'm asking if each of them is a
> correct change in its own right. If so, could you show me a test case
> that each change fixes?
>
> Daniel Jacobowitz <drow@mvista.com> writes:
> > 2001-11-26 Daniel Jacobowitz <drow@mvista.com>
> >
> > * values.c (value_primitive_field): Add embedded_offset to the
> > address of structure members.
> > * gnu-v3-abi.c (gnuv3_rtti_type): Cast to base type before
> > attempting to access vtable pointer. Set using_enc_p if we cast.
> > (gnuv3_virtual_fn_field): Call value_cast with structure rather than
> > structure pointer. Cast to base type before attempting to access
> > vtable pointer.
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/c++] Fix printing classes with virtual base classes
Date: Tue, 27 Nov 2001 13:26:00 -0000 [thread overview]
Message-ID: <20011127162612.A18178@nevyn.them.org> (raw)
Message-ID: <20011127132600.7eFEZMPj9UCaLRcTkXZPpb-DtxyB7fMlRdwDC7sFXbQ@z> (raw)
In-Reply-To: <npd723j4lc.fsf@zwingli.cygnus.com>
They are both independent fixes. The fixes to gnu-v3-abi.c by
themselves fix several tests in virtfunc.exp when using G++ 3.0
(from XFAIL to XPASS, ugh...). Then if you look at the test logs, you
should find two failure modes for the ones that still fail. Some are
marked "virtual baseclass botch", and I am trying right now to fix
those; but I believe that one will just be wrong. That's because my
use of value_field in gnuv3_virtual_fn_field triggers the bug; the
value has not been read in yet, so only its address is copied, and the
embedded offset for the parent type is lost. We then get the wrong
vtable and call the wrong function.
I can't construct an independent testcase, but I think it should be
possible. Most things run afoul of the other "botch" bug.
On Tue, Nov 27, 2001 at 04:17:51PM -0500, Jim Blandy wrote:
>
> These are two independent fixes, right? I understand GDB may need
> them both before it works correctly; I'm asking if each of them is a
> correct change in its own right. If so, could you show me a test case
> that each change fixes?
>
> Daniel Jacobowitz <drow@mvista.com> writes:
> > 2001-11-26 Daniel Jacobowitz <drow@mvista.com>
> >
> > * values.c (value_primitive_field): Add embedded_offset to the
> > address of structure members.
> > * gnu-v3-abi.c (gnuv3_rtti_type): Cast to base type before
> > attempting to access vtable pointer. Set using_enc_p if we cast.
> > (gnuv3_virtual_fn_field): Call value_cast with structure rather than
> > structure pointer. Cast to base type before attempting to access
> > vtable pointer.
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2001-11-27 21:26 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-13 9:24 Daniel Jacobowitz
2001-11-13 9:24 ` Daniel Jacobowitz
2001-11-13 9:34 ` Kevin Buettner
2001-11-26 18:25 ` Kevin Buettner
2001-11-26 21:07 ` Andrew Cagney
2001-11-13 21:56 ` Andrew Cagney
2001-11-14 22:09 ` Jim Blandy
2001-11-27 12:48 ` Jim Blandy
2001-11-26 18:02 ` Daniel Jacobowitz
2001-11-13 18:02 ` Jim Blandy
2001-11-14 9:33 ` Daniel Jacobowitz
2001-11-14 22:39 ` Jim Blandy
2001-11-14 22:41 ` Daniel Jacobowitz [this message]
2001-11-27 13:26 ` Daniel Jacobowitz
2001-11-21 13:03 ` Daniel Jacobowitz
2001-11-22 13:53 ` Jim Blandy
2001-11-30 11:42 ` Jim Blandy
2001-11-29 22:41 ` Daniel Jacobowitz
2001-11-30 8:48 ` Andrew Cagney
2001-11-21 17:30 ` Andrew Cagney
2001-11-30 8:57 ` Daniel Jacobowitz
2001-11-21 23:07 ` Daniel Jacobowitz
2001-11-27 13:16 ` Jim Blandy
2001-11-26 23:08 ` Daniel Jacobowitz
2001-11-26 20:38 ` Jim Blandy
2001-11-26 21:36 ` Daniel Jacobowitz
2001-11-14 0:12 ` Daniel Jacobowitz
2001-11-26 22:05 ` Daniel Berlin
2001-11-14 0:15 ` Daniel Berlin
2001-11-27 7:15 ` Jim Blandy
2001-11-14 13:02 ` Jim Blandy
2001-11-27 7:45 ` Daniel Jacobowitz
2001-11-14 13:55 ` Daniel Jacobowitz
2001-11-26 17:19 ` Daniel Jacobowitz
2001-11-15 14:06 Michael Elizabeth Chastain
2001-11-16 11:52 ` Daniel Berlin
2001-11-27 20:49 ` Daniel Berlin
2001-11-27 20:38 ` Michael Elizabeth Chastain
2001-11-30 9:00 Michael Elizabeth Chastain
2001-11-21 23:07 ` Michael Elizabeth Chastain
2001-11-22 3:17 ` Daniel Jacobowitz
2001-11-30 9:52 ` Daniel Jacobowitz
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=20011127162612.A18178@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@zwingli.cygnus.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