This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gnu-v3-abi.c: problems w/ virtual base class
- From: "Kris Warkentin" <kewarken at qnx dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Wed, 30 Oct 2002 12:10:26 -0500
- Subject: gnu-v3-abi.c: problems w/ virtual base class
Hello,
We're porting gdb 5.2.1 to our toolchain and I'm noticing a problem with
inherited virtual base classes.
Given:
class vA {
public:
int va;
int vx;
};
class vB : public virtual vA {
public:
int vb;
int vx;
};
vB g_vB;
we get the failure:
Expected output:
(gdb) print g_vB
$73 = {<vA> = {va = 3, vx = 4}, _vb$vA = 0x80422a4, vb = 5, vx = 6}
(gdb)
Output given:
(gdb) print g_vB
$67 = {Expected a negative vbase offset (old compiler?)
(gdb)
Now I looked at the comment for this in gnu-v3-abi.c and I'm guessing the
issue has to do with the fact that we're using gcc-2.95.3. I'm thinking
that, because this worked with gdb-5.0, it's probably a configuration error
in how we build gdb. Can anyone tell me anything about the c++ abi stuff
and if there's any way to make it play nicely with an older gcc?
cheers,
Kris