< prev index next >
src/share/vm/prims/jvmtiExport.cpp
Print this page
*** 128,139 ****
class JvmtiEventMark : public StackObj {
private:
JavaThread *_thread;
JNIEnv* _jni_env;
! bool _exception_detected;
! bool _exception_caught;
#if 0
JNIHandleBlock* _hblock;
#endif
public:
--- 128,138 ----
class JvmtiEventMark : public StackObj {
private:
JavaThread *_thread;
JNIEnv* _jni_env;
! JvmtiThreadState::ExceptionState _exception_state;
#if 0
JNIHandleBlock* _hblock;
#endif
public:
*** 147,161 ****
// for now, steal JNI push local frame code
JvmtiThreadState *state = thread->jvmti_thread_state();
// we are before an event.
// Save current jvmti thread exception state.
if (state != NULL) {
! _exception_detected = state->is_exception_detected();
! _exception_caught = state->is_exception_caught();
! } else {
! _exception_detected = false;
! _exception_caught = false;
}
JNIHandleBlock* old_handles = thread->active_handles();
JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
assert(new_handles != NULL, "should not be NULL");
--- 146,160 ----
// for now, steal JNI push local frame code
JvmtiThreadState *state = thread->jvmti_thread_state();
// we are before an event.
// Save current jvmti thread exception state.
if (state != NULL) {
! state->save_exception_state(&_exception_state);
! }
! else {
! // For safety ...
! _exception_state = JvmtiThreadState::ES_CLEARED;
}
JNIHandleBlock* old_handles = thread->active_handles();
JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
assert(new_handles != NULL, "should not be NULL");
*** 184,199 ****
JvmtiThreadState* state = _thread->jvmti_thread_state();
// we are continuing after an event.
if (state != NULL) {
// Restore the jvmti thread exception state.
! if (_exception_detected) {
! state->set_exception_detected();
! }
! if (_exception_caught) {
! state->set_exception_caught();
! }
}
}
#if 0
jobject to_jobject(oop obj) { return obj == NULL? NULL : _hblock->allocate_handle_fast(obj); }
--- 183,193 ----
JvmtiThreadState* state = _thread->jvmti_thread_state();
// we are continuing after an event.
if (state != NULL) {
// Restore the jvmti thread exception state.
! state->restore_exception_state(_exception_state);
}
}
#if 0
jobject to_jobject(oop obj) { return obj == NULL? NULL : _hblock->allocate_handle_fast(obj); }
*** 1385,1395 ****
ets->set_single_stepping_posted();
}
}
}
-
void JvmtiExport::post_exception_throw(JavaThread *thread, Method* method, address location, oop exception) {
HandleMark hm(thread);
methodHandle mh(thread, method);
Handle exception_handle(thread, exception);
--- 1379,1388 ----
*** 2287,2297 ****
void JvmtiExport::clear_detected_exception(JavaThread* thread) {
assert(JavaThread::current() == thread, "thread is not current");
JvmtiThreadState* state = thread->jvmti_thread_state();
if (state != NULL) {
! state->clear_exception_detected();
}
}
void JvmtiExport::oops_do(OopClosure* f) {
JvmtiCurrentBreakpoints::oops_do(f);
--- 2280,2290 ----
void JvmtiExport::clear_detected_exception(JavaThread* thread) {
assert(JavaThread::current() == thread, "thread is not current");
JvmtiThreadState* state = thread->jvmti_thread_state();
if (state != NULL) {
! state->clear_exception_state();
}
}
void JvmtiExport::oops_do(OopClosure* f) {
JvmtiCurrentBreakpoints::oops_do(f);
< prev index next >