aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2007-04-20 00:06:11 +0000
committerKeith Seitz <kseitz@gcc.gnu.org>2007-04-20 00:06:11 +0000
commit52fdc9b5d9e8e868a066146571d364c470986061 (patch)
tree3445ad0de038ba6d533d5820552dfe986c5d94d5 /libjava
parent699cee69531988d1dcc6bd5ae17bc9ba56a0125f (diff)
downloadgcc-52fdc9b5d9e8e868a066146571d364c470986061.zip
gcc-52fdc9b5d9e8e868a066146571d364c470986061.tar.gz
gcc-52fdc9b5d9e8e868a066146571d364c470986061.tar.bz2
interpret-run.cc [...]: Save the original insn for the breakpoint before posting the JVMTI notification.
* interpret-run.cc [insn_breakpoint]: Save the original insn for the breakpoint before posting the JVMTI notification. From-SVN: r123985
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/interpret-run.cc11
2 files changed, 11 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index eb74cf8..6e916a7 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-19 Keith Seitz <keiths@redhat.com>
+
+ * interpret-run.cc [insn_breakpoint]: Save the original
+ insn for the breakpoint before posting the JVMTI notification.
+
2007-04-19 Tom Tromey <tromey@redhat.com>
* gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.h: Rebuilt.
diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc
index b8c88af..649b1bd 100644
--- a/libjava/interpret-run.cc
+++ b/libjava/interpret-run.cc
@@ -2600,18 +2600,19 @@ details. */
Thread *thread = Thread::currentThread ();
JNIEnv *jni_env = _Jv_GetCurrentJNIEnv ();
- _Jv_JVMTI_PostEvent (JVMTI_EVENT_BREAKPOINT, thread, jni_env,
- method, location);
-
- // Continue execution
+ // Save the insn here since the breakpoint could be removed
+ // before the JVMTI notification returns.
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 ());
+ _Jv_JVMTI_PostEvent (JVMTI_EVENT_BREAKPOINT, thread, jni_env,
+ method, location);
+
+ // Continue execution
#ifdef DIRECT_THREADED
goto *(opc->insn);
#else