diff options
author | Kyle Galloway <kgallowa@redhat.com> | 2007-04-23 17:30:29 +0000 |
---|---|---|
committer | Kyle Galloway <kgallowa@gcc.gnu.org> | 2007-04-23 17:30:29 +0000 |
commit | d76473618c43c7a073359a300113fa5cf21fd999 (patch) | |
tree | 81048b7fa6e216d50f6149770c8a5fe429e8072d /libjava/interpret-run.cc | |
parent | 34a7526e36dae962cea221b99fb4124b79895fce (diff) | |
download | gcc-d76473618c43c7a073359a300113fa5cf21fd999.zip gcc-d76473618c43c7a073359a300113fa5cf21fd999.tar.gz gcc-d76473618c43c7a073359a300113fa5cf21fd999.tar.bz2 |
java-interp.h (_Jv_InterpFrame): Add pointer to the interpreter PC.
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.
From-SVN: r124076
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 649b1bd..9e1ed2e 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 |