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/include/java-interp.h | |
| parent | 5be46544c62f8b3bfc70a6689ccf58a37deaef39 (diff) | |
| download | ppe42-gcc-ca42112c32f3a96e8ef382fdfac01aae8f9a102e.tar.gz ppe42-gcc-ca42112c32f3a96e8ef382fdfac01aae8f9a102e.zip | |
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/include/java-interp.h')
| -rw-r--r-- | libjava/include/java-interp.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index ee45faa18d8..8da0584af8e 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -422,6 +422,9 @@ public: pc_t pc; jclass proxyClass; }; + + // Pointer to the actual pc value. + pc_t *pc_ptr; //Debug info for local variables. _Jv_word *locals; @@ -430,7 +433,8 @@ public: // Object pointer for this frame ("this") jobject obj_ptr; - _Jv_InterpFrame (void *meth, java::lang::Thread *thr, jclass proxyCls = NULL) + _Jv_InterpFrame (void *meth, java::lang::Thread *thr, jclass proxyCls = NULL, + pc_t *pc = NULL) : _Jv_Frame (reinterpret_cast<_Jv_MethodBase *> (meth), thr, frame_interpreter) { @@ -438,6 +442,7 @@ public: proxyClass = proxyCls; thr->interp_frame = (gnu::gcj::RawData *) this; obj_ptr = NULL; + pc_ptr = pc; } ~_Jv_InterpFrame () @@ -448,7 +453,20 @@ public: jobject get_this_ptr () { return obj_ptr; - } + } + + pc_t get_pc () + { + pc_t pc; + + // If the PC_PTR is NULL, we are not debugging. + if (pc_ptr == NULL) + pc = 0; + else + pc = *pc_ptr; + + return pc; + } }; // A native frame in the call stack really just a placeholder |

