[patch] java run-time stack trace
Bryce McKinlay
bryce@albatross.co.nz
Thu Feb 8 15:09:00 GMT 2001
Andrew Haley wrote:
> Per Bothner writes:
> > Bryce McKinlay <bryce@albatross.co.nz> writes:
> >
> > > Actually, I'd like to have CNI functions mangled in C++ style. This is
> > > how they are written in the source code (think copy/search/paste), and it
> > > can help to make it very obvious when the stack trace goes through native
> > > code. Also, this is consistent with GDB.
> >
> > What about library functions? Having (say) ClassLoader.defineClass
> > should up in C++ style is *not* what most users want or expect.
Why not? If ClassLoader.defineClass is showing up in a stack trace, then
presumably there is a bug somewhere. The user wants to understand what is going
on in order to fix that bug, so will go looking for the implementation. That
implementation is written in C++ style, so surely it makes sense to demangle it
in C++ style. We don't _want_ to hide implementation details in a stack trace!
> I'm sure this is right. What bothers me is how java demangling can
> possibly cope with things like array<int>.
Well, it should cope fine - it doesn't touch anything it isn't aware of - all it
does is emit "." instead of "::", no "*"s, the right java primitive type names,
and a special case for "JArray<>". Otherwise, the same C++ demangling code is
used.
regards
[ bryce ]
More information about the Java
mailing list