This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: patch to robustify gnuv3_rtti_type
Daniel Jacobowitz wrote:
> Go look at gnuv3_rtti_type again. It's misnamed; it does not use RTTI
> at all. It only looks that the vtable exists and has a name demangled to
> 'vtable for <Class>'.
Yes. With my current patches (gcc and gdb), I get when debugging Java
runtime (written in C++):
(gdb) whatis source
type = Class *
(gdb) p *source
can't find class named `java::lang::Class', as given by C++ RTTI
That is actually an improvement. The problem at this point is
inconsistent handling of namespaces bwteeen g++ and gcj. gcj
emits a class named 'java.lang.Class' (including the periods),
while g++ emits plain 'Class'. So gdb does not realize these are
the same class. And neither g++ or gcj emits proper namespace
information. I think this is one of the biggest stumbling-blocks
to proper Java debugging.
What is the current status of support for namepace-handling in gdb?
If we fix gcj so it emits the same debug into as g++ (i.e.
'java.lang.Class' is emitted as plain 'Class'), can gdb "do the
right thing" based on the mangled names? If not, can gdb handle
dwarf2 namespace information (which g++ currently supresses)?
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/