This is the mail archive of the gdb@sourceware.org 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: Some java questions


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> But that's not my real concern. What puzzles me is this second
Keith> function "jmisc.main(java.lang.String[])void". What the heck is that,
Keith> cause it isn't java. It looks to me like some partially demangled java
Keith> method signature (which is still not valid input to a java compiler).

To support Java 1.5, we had to add return types to name mangling.
These are needed due to covariant return types.

What you are seeing here is just how the demangler chooses to print
this information.  E.g., when I 'nm --demangle=java' a simple java
program, I see:

0804891e T h.main(java.lang.String[])void
         U java.lang.Object.toString()java.lang.String
[etc]

Keith> At long last, my question is: Is gdb supposed to be able to do
Keith> something with "jmisc.main(java.lang.String[])void", i.e. is it
Keith> considered valid "input" to break, print, and other commands?

FYI -- nobody really maintains the gcj support in gdb.

It would be nice to be able to break on a method that can only be
differentiated by its return type.  Normally, though, I think only one
of the methods like this really matters -- the rest are just bridge
methods and probably not interesting.  It might be tricky for gdb to
sort this out though.

Tom


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