diff options
author | kgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-23 17:30:29 +0000 |
---|---|---|
committer | kgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-23 17:30:29 +0000 |
commit | ca42112c32f3a96e8ef382fdfac01aae8f9a102e (patch) | |
tree | 81048b7fa6e216d50f6149770c8a5fe429e8072d /libjava/interpret-run.cc | |
parent | 5be46544c62f8b3bfc70a6689ccf58a37deaef39 (diff) | |
download | gcc-ca42112c32f3a96e8ef382fdfac01aae8f9a102e.tar.gz |
2007-04-23 Kyle Galloway <kgallowa@redhat.com>
* include/java-interp.h (_Jv_InterpFrame): Add pointer to the
interpreter PC.
(<init>): Add a pointer to the interpreter PC as a parameter with
default value NULL.
(get_pc): New method.
* interpret-run.cc: If debugging, pass a pointer to the PC when
creating the stack frame.
* jvmti.cc (_Jv_JVMTI_GetStackTrace): Call _Jv_InterpFrame::get_pc
to get the PC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret-run.cc')
-rw-r--r-- | libjava/interpret-run.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc index 649b1bd2486..9e1ed2e9c4e 100644 --- a/libjava/interpret-run.cc +++ b/libjava/interpret-run.cc @@ -12,6 +12,8 @@ details. */ * compiled directly. */ using namespace java::lang::reflect; + + pc_t pc = NULL; // FRAME_DESC registers this particular invocation as the top-most // interpreter frame. This lets the stack tracing code (for @@ -20,7 +22,12 @@ details. */ // destructor so it cleans up automatically when the interpreter // returns. java::lang::Thread *thread = java::lang::Thread::currentThread(); + +#ifdef DEBUG + _Jv_InterpFrame frame_desc (meth, thread, NULL, &pc); +#else _Jv_InterpFrame frame_desc (meth, thread); +#endif _Jv_word stack[meth->max_stack]; _Jv_word *sp = stack; @@ -334,8 +341,6 @@ details. */ #endif }; - pc_t pc; - #ifdef DIRECT_THREADED #ifdef DEBUG |