This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Debugging unhandled exceptions
- To: java-discuss at sourceware dot cygnus dot com
- Subject: Debugging unhandled exceptions
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Fri, 19 Nov 1999 15:31:41 +1300
When running Java code that generates an unhandled exception in a Java VM, the
VM prints a very convenient stack trace showing where the exception occured.
When the same thing happens in libgcj, only the type of the exception gets
printed, and you need to use gdb to try to get a backtrace and work out where
the exception occured. Unfortunatly, libgcj aborting on an unhandled exception
is considered by gdb to be normal exit condition, and this makes it rather
difficult to find the point in the program that actually generated the
exception. It would be really cool if libgcj could somehow signal gdb so that it
would stop at the location of the exception and allow you to get a useful
backtrace, in the same way that gdb will stop on unhandled signals in C code.
Any ideas on how easy/difficult this would be to implement?
regards
[ bryce ]