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: Michael Elizabeth Chastain <mec at shout dot net>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 1 Jan 2003 03:28:00 -0000
- Subject: Re: gdb/620: instance member (added in extending class) shown incorrectly
- Reply-to: Michael Elizabeth Chastain <mec at shout dot net>
The following reply was made to PR c++/620; it has been noted by GNATS.
From: Michael Elizabeth Chastain <mec@shout.net>
To: gdb-gnats@sources.redhat.com, tomas.sieger@seznam.cz
Cc:
Subject: Re: gdb/620: instance member (added in extending class) shown incorrectly
Date: Tue, 31 Dec 2002 21:22:35 -0600
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