aboutsummaryrefslogtreecommitdiff
path: root/libjava/interpret.cc
diff options
context:
space:
mode:
authorKyle Galloway <kgallowa@redhat.com>2007-02-16 18:32:07 +0000
committerKyle Galloway <kgallowa@gcc.gnu.org>2007-02-16 18:32:07 +0000
commitce359ed91662f2c14f882613a094f75110a0eba2 (patch)
tree25c074e797a8dd7b18f07433e5fa8036c2a79334 /libjava/interpret.cc
parent2c39a2b1e9fde76363467f8e7552e9244c7c6485 (diff)
downloadgcc-ce359ed91662f2c14f882613a094f75110a0eba2.zip
gcc-ce359ed91662f2c14f882613a094f75110a0eba2.tar.gz
gcc-ce359ed91662f2c14f882613a094f75110a0eba2.tar.bz2
interpret.cc: Add extra DEBUG_LOCALS_INSN calls for multi-slot variables to maintain type info.
2007-02-16 Kyle Galloway <kgallowa@redhat.com> * interpret.cc: Add extra DEBUG_LOCALS_INSN calls for multi-slot variables to maintain type info. * interpret-run.cc: Add local variable info to frame in the debug interpreter. * jvmti.cc (getLocalFrame): New method. (_Jv_JVMTI_GetLocalObject): New method. (_Jv_JVMTI_GetLocallInt): New method. (_Jv_JVMTI_GetLocalFloat): New method. (_Jv_JVMTI_GetLocalLong): New method. (_Jv_JVMTI_GetLocalDouble): New method. (_Jv_JVMTI_SetLocalObject): New method. (_Jv_JVMTI_SetLocalInt): New method. (_Jv_JVMTI_SetLocalFloat): New method. (_Jv_JVMTI_SetLocalLong): New method. (_Jv_JVMTI_SetLocalDouble): New method. From-SVN: r122048
Diffstat (limited to 'libjava/interpret.cc')
-rw-r--r--libjava/interpret.cc77
1 files changed, 43 insertions, 34 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc
index dbd5323..7927625 100644
--- a/libjava/interpret.cc
+++ b/libjava/interpret.cc
@@ -172,47 +172,51 @@ convert (FROM val, TO min, TO max)
# define LOADD(I) LOADL(I)
#endif
-#define STOREA(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'o'); \
- locals[I].o = (--sp)->o; \
+#define STOREA(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'o'); \
+ locals[I].o = (--sp)->o; \
} while (0)
-#define STOREI(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'i'); \
- locals[I].i = (--sp)->i; \
+#define STOREI(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'i'); \
+ locals[I].i = (--sp)->i; \
} while (0)
-#define STOREF(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'f'); \
- locals[I].f = (--sp)->f; \
+#define STOREF(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'f'); \
+ locals[I].f = (--sp)->f; \
} while (0)
#if SIZEOF_VOID_P == 8
-# define STOREL(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'l'); \
- (sp -= 2, locals[I].l = sp->l); \
+# define STOREL(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'l'); \
+ DEBUG_LOCALS_INSN (I + 1, 'x'); \
+ (sp -= 2, locals[I].l = sp->l); \
} while (0)
-# define STORED(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'd'); \
- (sp -= 2, locals[I].d = sp->d); \
+# define STORED(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'd'); \
+ DEBUG_LOCALS_INSN (I + 1, 'x'); \
+ (sp -= 2, locals[I].d = sp->d); \
} while (0)
#else
-# define STOREL(I) \
- do { \
- DEBUG_LOCALS_INSN (I, 'l'); \
- jint __idx = (I); \
- locals[__idx+1].ia[0] = (--sp)->ia[0]; \
- locals[__idx].ia[0] = (--sp)->ia[0]; \
+# define STOREL(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'l'); \
+ DEBUG_LOCALS_INSN (I + 1, 'x'); \
+ jint __idx = (I); \
+ locals[__idx+1].ia[0] = (--sp)->ia[0]; \
+ locals[__idx].ia[0] = (--sp)->ia[0]; \
} while (0)
-# define STORED(I) \
- do { \
- DEBUG_LOCALS_INSN(I, 'd'); \
- jint __idx = (I); \
- locals[__idx+1].ia[0] = (--sp)->ia[0]; \
- locals[__idx].ia[0] = (--sp)->ia[0]; \
+# define STORED(I) \
+ do { \
+ DEBUG_LOCALS_INSN (I, 'd'); \
+ DEBUG_LOCALS_INSN (I + 1, 'x'); \
+ jint __idx = (I); \
+ locals[__idx+1].ia[0] = (--sp)->ia[0]; \
+ locals[__idx].ia[0] = (--sp)->ia[0]; \
} while (0)
#endif
@@ -929,7 +933,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args, _Jv_InterpMethod *meth)
{
#undef DEBUG
#undef DEBUG_LOCALS_INSN
-#define DEBUG_LOCALS_INSN(s, t) do {} while(0)
+#define DEBUG_LOCALS_INSN(s, t) do {} while (0)
#include "interpret-run.cc"
}
@@ -939,7 +943,12 @@ _Jv_InterpMethod::run_debug (void *retp, ffi_raw *args, _Jv_InterpMethod *meth)
{
#define DEBUG
#undef DEBUG_LOCALS_INSN
-#define DEBUG_LOCALS_INSN(s, t) do {} while(0)
+#define DEBUG_LOCALS_INSN(s, t) \
+ do \
+ { \
+ frame_desc.locals_type[s] = t; \
+ } \
+ while (0)
#include "interpret-run.cc"
}