diff options
author | Kyle Galloway <kgallowa@redhat.com> | 2007-01-29 22:05:56 +0000 |
---|---|---|
committer | Kyle Galloway <kgallowa@gcc.gnu.org> | 2007-01-29 22:05:56 +0000 |
commit | 392731311776d30b0910e51a5bc2aef070a9fc8b (patch) | |
tree | 832133e3bfa83e14520e76d3a01b7a61b1b3b20e /libjava/jni.cc | |
parent | d75bf843440e5d372411699e81d87b273d398da6 (diff) | |
download | gcc-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/jni.cc')
-rw-r--r-- | libjava/jni.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc index 59c1e5f..07ef713 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -2339,6 +2339,10 @@ _Jv_JNIMethod::call (ffi_cif *, void *ret, ffi_raw *args, void *__this) // Copy over passed-in arguments. memcpy (&real_args[offset], args, _this->args_raw_size); + + // Add a frame to the composite (interpreted + JNI) call stack + java::lang::Thread *thread = java::lang::Thread::currentThread(); + _Jv_NativeFrame nat_frame (_this, thread); // The actual call to the JNI function. #if FFI_NATIVE_RAW_API |