aboutsummaryrefslogtreecommitdiff
path: root/libjava/stacktrace.cc
diff options
context:
space:
mode:
authorKyle Galloway <kgallowa@redhat.com>2007-01-29 22:05:56 +0000
committerKyle Galloway <kgallowa@gcc.gnu.org>2007-01-29 22:05:56 +0000
commit392731311776d30b0910e51a5bc2aef070a9fc8b (patch)
tree832133e3bfa83e14520e76d3a01b7a61b1b3b20e /libjava/stacktrace.cc
parentd75bf843440e5d372411699e81d87b273d398da6 (diff)
downloadgcc-392731311776d30b0910e51a5bc2aef070a9fc8b.zip
gcc-392731311776d30b0910e51a5bc2aef070a9fc8b.tar.gz
gcc-392731311776d30b0910e51a5bc2aef070a9fc8b.tar.bz2
java-interp.h: Added _Jv_Frame class and its two subclasses _Jv_InterpFrame and _Jv_NativeFrame.
2007-01-29 Kyle Galloway <kgallowa@redhat.com> * include/java-interp.h: Added _Jv_Frame class and its two subclasses _Jv_InterpFrame and _Jv_NativeFrame. Also moved _Jv_FrameType from java-stack.h. * include/java-stack.h: Removed _Jv_FrameType. * java/lang/Thread.java: Added frame member to hold new composite frame stack. * java/lang/Thread.h: Regenerated. * java/lang/Thread.class: Rebuilt. * jni.cc (_Jv_JNIMethod::call): Push a frame onto the stack when calling a JNI method. * jvmti.cc (_Jv_JVMTI_GetStackTrace): New Method. (_Jv_JVMTI_GetFrameCount): New method. * stacktrace.cc (UnwindTraceFn): Modified to use new _Jv_Frame classes. * testsuite/libjava.jvmti/interp/getstacktrace.jar: New test. * testsuite/libjava.jvmti/interp/natgetstacktrace.cc: New test. * testsuite/libjava.jvmti/interp/getstacktrace.h: New test. * testsuite/libjava.jvmti/interp/getstacktrace.jar: New test. * testsuite/libjava.jvmti/interp/getstacktrace.out: Output file for test. From-SVN: r121314
Diffstat (limited to 'libjava/stacktrace.cc')
-rw-r--r--libjava/stacktrace.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libjava/stacktrace.cc b/libjava/stacktrace.cc
index 5751e29..c3fbdf4 100644
--- a/libjava/stacktrace.cc
+++ b/libjava/stacktrace.cc
@@ -131,9 +131,11 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr)
if (func_addr == UNWRAP_FUNCTION_DESCRIPTOR (interp_run))
{
state->frames[pos].type = frame_interpreter;
- state->frames[pos].interp.meth = state->interp_frame->self;
+ _Jv_Frame *frame = static_cast<_Jv_Frame *> (state->interp_frame);
+ state->frames[pos].interp.meth
+ = static_cast<_Jv_InterpMethod *> (frame->self);
state->frames[pos].interp.pc = state->interp_frame->pc;
- state->interp_frame = state->interp_frame->next;
+ state->interp_frame = state->interp_frame->next_interp;
}
else
#endif
@@ -143,7 +145,7 @@ _Jv_StackTrace::UnwindTraceFn (struct _Unwind_Context *context, void *state_ptr)
state->frames[pos].type = frame_proxy;
state->frames[pos].proxyClass = state->interp_frame->proxyClass;
state->frames[pos].proxyMethod = state->interp_frame->proxyMethod;
- state->interp_frame = state->interp_frame->next;
+ state->interp_frame = state->interp_frame->next_interp;
}
else
{