Debugging unhandled exceptions
Tom Tromey
tromey@cygnus.com
Thu Nov 18 18:50:00 GMT 1999
>>>>> "Bryce" == Bryce McKinlay <bryce@albatross.co.nz> writes:
Bryce> When running Java code that generates an unhandled exception in
Bryce> a Java VM, the VM prints a very convenient stack trace showing
Bryce> where the exception occured.
This is on our to-do list. I'm not sure when it will happen exactly.
Bryce> It would be really cool if libgcj could somehow signal gdb so
Bryce> that it would stop at the location of the exception and allow
Bryce> you to get a useful backtrace, in the same way that gdb will
Bryce> stop on unhandled signals in C code.
Bryce> Any ideas on how easy/difficult this would be to implement?
I don't have any ideas about how to implement it inside gdb. I don't
know that much about gdb. I thought gdb had some idea of what
exception support should look like to the user, but as I recall it
doesn't work at all.
When I'm debugging Java, I often put a breakpoint on _Jv_Throw. All
Java exceptions are thrown in this function. This isn't automatic,
but it does work.
Tom
More information about the Java
mailing list