This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/620: instance member (added in extending class) shown incorrectly
- From: Tomas Sieger <sieger at systinet dot com>
- To: mec at shout dot net
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 2 Jan 2003 07:28:01 -0000
- Subject: Re: gdb/620: instance member (added in extending class) shown incorrectly
- Reply-to: Tomas Sieger <sieger at systinet dot com>
The following reply was made to PR c++/620; it has been noted by GNATS.
From: Tomas Sieger <sieger@systinet.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/620: instance member (added in extending class) shown
incorrectly
Date: Thu, 02 Jan 2003 08:19:58 +0100
I have successfully tested gdb 5.3 in my environment. It displays
correct value of the 'q' instance member using 'p *(AA*)a'.
thanks
Tomas Sieger
Michael Elizabeth Chastain wrote:
>
> Thankyou for the bug report.
>
> This bug is fixed in gdb 5.3. I checked your test program with:
>
> target => native
> host => i686-pc-linux-gnu
> osversion => red-hat-8.0
> gdb => 5.3, HEAD%20021231
> gcc => 2.95.3, 3.2.1
> binutils => 2.13.2
> libc => vendor
> gformat => dwarf-2, stabs+
>
> gdb printed the correct values in all cases:
>
> (gdb) print *(AA*)a
> $1 = {<A> = {p = 0x1}, q = 0x2}
>
> It is likely that the bug was fixed by this patch:
>
> 2002-08-21 Jim Blandy <jimb@redhat.com>
>
> * valops.c (value_cast): Simplify and correct logic for doing a
> static cast from a pointer to a base class to a pointer to a
> derived class.
>
> The CVS mainline version of gdb has a test script, gdb.c++/casts.exp,
> to look for this sort of bug.
>
> Please try gdb 5.3 and let me know if it works for you in your environment.
>
> Michael C