aboutsummaryrefslogtreecommitdiff
path: root/libjava/interpret-run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/interpret-run.cc')
-rw-r--r--libjava/interpret-run.cc29
1 files changed, 27 insertions, 2 deletions
diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc
index 26cc4a6..95037903 100644
--- a/libjava/interpret-run.cc
+++ b/libjava/interpret-run.cc
@@ -1,6 +1,6 @@
// interpret-run.cc - Code to interpret bytecode
-/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -2466,7 +2466,32 @@ details. */
insn_breakpoint:
{
- // nothing just yet
+ JvAssert (JVMTI_REQUESTED_EVENT (Breakpoint));
+
+ // Send JVMTI notification
+ using namespace ::java::lang;
+ jmethodID method = meth->self;
+ jlocation location = meth->insn_index (pc - 1);
+ Thread *thread = Thread::currentThread ();
+ JNIEnv *jni_env = _Jv_GetCurrentJNIEnv ();
+
+ _Jv_JVMTI_PostEvent (JVMTI_EVENT_BREAKPOINT, thread, jni_env,
+ method, location);
+
+ // Continue execution
+ using namespace gnu::gcj::jvmti;
+ Breakpoint *bp
+ = BreakpointManager::getBreakpoint (reinterpret_cast<jlong> (method),
+ location);
+ JvAssert (bp != NULL);
+
+ pc_t opc = reinterpret_cast<pc_t> (bp->getInsn ());
+
+#ifdef DIRECT_THREADED
+ goto *(opc->insn);
+#else
+ goto *(insn_target[*opc]);
+#endif
}
}
catch (java::lang::Throwable *ex)