This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC]: java inferior function call support


Tom Tromey <tromey@redhat.com> writes:

> >>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
> 
> Daniel> I'm not at all sure about the vtable changes.  They should be
> Daniel> compatible, because gcj does try to follow the C++ ABI.  If you'll send
> Daniel> a testcase, I'll take another look and see what I'm missing.
> 
> Yeah, a gcj vtable looks pretty much like the vtable of a C++ class
> with only a single superclass.  It is a bit odd in that there are a
> couple of vtable slots that don't actually point to methods, but I
> think this shouldn't matter to gdb.
> 
> If gdb uses C++ RTTI, then that would be a problem, since gcj doesn't
> generate the same sort of RTTI information.

I don't think it does.  When GDB wants to find an object's run-time
type, it finds the address of its vtable, looks up the minimal symbol
whose value is that address, demangles that, and extracts the class's
name from the demangled vtable name.  Then it uses debugging info from
there.

But I don't think there's much in GDB that looks at the RTTI itself.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]