Re: break jmisc.main

Tom Tromey
2003-03-13T22:59:34Z

>>>>> "David" == David Carlton <carlton@math.stanford.edu> writes:

David> Here's the scoop with the FAILs on "break jmisc.main" and "break
David> jmisc.main(java.lang.String[]))".

Thanks a lot for looking at this.

David> .long .LC2 # DW_AT_name: "jmisc.main(java.lang.String[])"
David> Sigh. GCJ should get fixed.

I really don't know anything about debug info. How should this read?

In the above `jmisc' is just a class. However, `java.lang' is a
namespace. In the past at least there wasn't namespace support in
gdb...?

David> Unfortunately, it doesn't find one: the symbol that it
David> finds is called something strange like
David> "jmisc::main(Jaray<java::lang::String*>*)". (I'm pretty sure
David> that's right, though I'd have to check this at home to be sure;
David> that's what c++filt demangles the name to.)

Should be `JArray', but other than that it looks ok.

gcj uses the same mangling as C++. That is an important part of the
whole "CNI" approach to writing native methods -- you can just write
them in C++ with basically zero overhead.

I don't think there is any way to tell a Java symbol from a C++
symbol. Which one you want to use depends more on context -- if I'm
debugging the Java code, I like to see the Java symbols. If I'm
debugging the C++ code, it is probably more convenient to see the C++
form. Likewise for entering breakpoints and the like.

David> (And a third thing: convince somebody who knows more about GCJ
David> to become GDB's Java maintainer.)

I would love for anybody to become an active gdb/java maintainer.
The only inducement I have is the future possibility of a cool gcj
t-shirt (assuming I ever print more). That plus gratitude.

Tom