+#ifdef DEBUG
+ // This needs to be done before the pc is changed.
+ jlong throw_loc = meth->insn_index (pc);
+#endif
+ // Check if the exception is handled and, if so, set the pc to the start
+ // of the appropriate catch block.
+ if (meth->check_handler (&pc, meth, ex))
+ {
+ sp = stack;
+ sp++->o = ex; // Push exception.
+#ifdef DEBUG
+ if (JVMTI_REQUESTED_EVENT (Exception))
+ {
+ using namespace gnu::gcj::jvmti;
+ jlong throw_meth = reinterpret_cast<jlong> (meth->get_method ());
+ jlong catch_loc = meth->insn_index (pc);
+ ExceptionEvent::postExceptionEvent (thread, throw_meth,
+ throw_loc, ex, throw_meth,
+ catch_loc);
+ }
+#endif
+ NEXT_INSN;
+ }
+#ifdef DEBUG
+ if (JVMTI_REQUESTED_EVENT (Exception))
+ {
+ using namespace gnu::gcj::jvmti;
+ jlong throw_meth = reinterpret_cast<jlong> (meth->get_method ());
+ ExceptionEvent::postExceptionEvent (thread, throw_meth, throw_loc,
+ ex, NULL, NULL);
+ }