This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Debugging unhandled exceptions
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: Debugging unhandled exceptions
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Thu, 18 Nov 1999 18:50:15 -0800 (PST)
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <3834B68D.429BA9E4@albatross.co.nz>
>>>>> "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