aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2007-05-01 02:50:02 +0000
committerKeith Seitz <kseitz@gcc.gnu.org>2007-05-01 02:50:02 +0000
commit8e48985493cd4ce6ce910dc03a6cda69365ef73a (patch)
treee543ef00b8fa24ac5e6abb57bd1297c25a7db7d0
parent147199b48699eae6c92a78b7475cb38574804381 (diff)
downloadgcc-8e48985493cd4ce6ce910dc03a6cda69365ef73a.zip
gcc-8e48985493cd4ce6ce910dc03a6cda69365ef73a.tar.gz
gcc-8e48985493cd4ce6ce910dc03a6cda69365ef73a.tar.bz2
interpret-run.cc (NEXT_INSN): Advance PC before executing the instruction.
* interpret-run.cc (NEXT_INSN)[DEBUG]: Advance PC before executing the instruction. * include/java-interp.h (_Jv_InterpFrame::get_pc): Subtract one insn from the frame's PC. _Jv_InterpMethod::run et al will advance the PC before executing the instruction. From-SVN: r124313
-rw-r--r--libjava/ChangeLog8
-rw-r--r--libjava/include/java-interp.h2
-rw-r--r--libjava/interpret-run.cc5
3 files changed, 12 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index a66338c..c8c9aa5 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,11 @@
+2007-04-30 Keith Seitz <keiths@redhat.com>
+
+ * interpret-run.cc (NEXT_INSN)[DEBUG]: Advance PC before
+ executing the instruction.
+ * include/java-interp.h (_Jv_InterpFrame::get_pc): Subtract
+ one insn from the frame's PC. _Jv_InterpMethod::run et al
+ will advance the PC before executing the instruction.
+
2007-04-27 Keith Seitz <keiths@redhat.com>
* classpath/lib/gnu/classpath/jdwp/Jdwp.class: Regenerated.
diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h
index 8da0584..4bded04 100644
--- a/libjava/include/java-interp.h
+++ b/libjava/include/java-interp.h
@@ -465,7 +465,7 @@ public:
else
pc = *pc_ptr;
- return pc;
+ return pc - 1;
}
};
diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc
index f99ff5c..f951981 100644
--- a/libjava/interpret-run.cc
+++ b/libjava/interpret-run.cc
@@ -348,15 +348,16 @@ details. */
#define NEXT_INSN \
do \
{ \
+ pc_t insn = pc++; \
if (JVMTI_REQUESTED_EVENT (SingleStep)) \
{ \
JNIEnv *env = _Jv_GetCurrentJNIEnv (); \
jmethodID method = meth->self; \
- jlocation loc = meth->insn_index (pc); \
+ jlocation loc = meth->insn_index (insn); \
_Jv_JVMTI_PostEvent (JVMTI_EVENT_SINGLE_STEP, thread, \
env, method, loc); \
} \
- goto *((pc++)->insn); \
+ goto *(insn->insn); \
} \
while (0)