This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/c++] Fix printing classes with virtual base classes
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 26 Nov 2001 23:39:34 -0500
- Subject: Re: [RFA/c++] Fix printing classes with virtual base classes
- References: <20011126201945.A27754@nevyn.them.org>
I'm with you on VALUE_OFFSET and VALUE_EMBEDDED_OFFSET. I'm pretty
sure VALUE_OFFSET can be eliminated from GDB entirely, with some minor
changes to the representation of subvalues of registers and
convenience variables.
Can you explain exactly what TYPE_VPTR_FIELDNO means, and how it works
in heavily derived classes? What I think you're basically doing there
is taking the address of the field indicated by TYPE_VPTR_FIELDNO,
casting that to a void *, and then casting that to the `struct
gdb_gnu_v3_abi_vtable' type. I have this vague memory that maybe
using TYPE_VPTR_FIELDNO correctly would fix that.
I wonder if that dereferencing code could be simplified with a
judicious use of `lookup_pointer_type (vtable_type)' and
`value_deref'...