[RFA] Fix JVMTI/JDWP Exception Handling

Keith Seitz keiths@redhat.com
Tue May 1 23:33:00 GMT 2007


Hi,

The following patch is a follow-on from Kyle's original patch. 
Unfortunately, I discovered while playing with the original patch that 
there is a small problem with Threads not being removed from the Map in 
ExceptionEvent. So I've removed this and implemented the rest in 
interpret.cc.

Also we were missing the JDWP side of this. I have implemented that, 
too. So, as far as I can tell, JVMTI/JDWP Exception notifications work 
(both interpreted and native).

QCC? (Questions/comments/concerns?)

Keith

ChangeLog
2007-05-01  Keith Seitz  <keiths@redhat.com>

         * include/jvmti-int.h (_Jv_ReportJVMTIExceptionThrow):
         Declare.
         * interpret.cc (_Jv_ReportJVMTIExceptionThrow): New function.
         (find_catch_location): New function.
         (REPORT_EXCEPTION): New macro.
         (throw_internal_error): Use REPORT_EXCEPTION.
         (throw_incompatible_class_change_error): Likewise.
         (throw_null_pointer_exception): Likewise.
         (throw_class_format_error): Likewise.
         * interpret-run.cc (INTERP_REPORT_EXCEPTION)[DEBUG]: Set
         to REAL_REPORT_EXCEPTION.
         (INTERP_REPORT_EXCEPTION)[!DEBUG]: Make nop.
         (insn_new): Use INTERP_REPORT_EXCEPTION.
         (insn_athrow): Likewise.
         Remove previous JVMTI exception notifications.
         Add JVMTI ExceptionCatch notificatin.
         * jni.cc (_Jv_PopSystemFrame): Notify JVMTI clients of
         exception throw.
         * gnu/gcj/jvmti/ExceptionEvent.java: Removed.
         * gnu/gcj/jvmti/ExceptionEvent.h: Removed.
         * gnu/classpath/jdwp/natVMVirtualMachine.cc
         (jdwpExceptionCB): New function.
         (jdwpVMInitCB): Set Exception event handler and enable.
         * sources.am: Regenerated.
         * Makefile.in: Regenerated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jvmti-exceptions.patch
Type: text/x-patch
Size: 12215 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070501/c466e0a6/attachment.bin>


More information about the Java-patches mailing list