diff options
author | 2015-03-04 11:13:16 +0000 | |
---|---|---|
committer | 2015-03-04 11:13:17 +0000 | |
commit | 3d7d2af4c6502b771b032ee9bf3ab30e78f9c60d (patch) | |
tree | cc15416fa8208661fe98a19055fa4c98010a0e53 /runtime/thread.h | |
parent | 87896b3a1f97c815fe02c7490c1f27951c58bbbf (diff) | |
parent | 7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0 (diff) |
Merge "Change how we report exceptions to the debugger."
Diffstat (limited to 'runtime/thread.h')
-rw-r--r-- | runtime/thread.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/runtime/thread.h b/runtime/thread.h index 83cedbb7f2..e4c91b72b2 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -349,7 +349,6 @@ class Thread { void ClearException() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { tlsPtr_.exception = nullptr; tlsPtr_.throw_location.Clear(); - SetExceptionReportedToInstrumentation(false); } // Find catch block and perform long jump to appropriate exception handle @@ -366,6 +365,11 @@ class Thread { mirror::ArtMethod* GetCurrentMethod(uint32_t* dex_pc, bool abort_on_error = true) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + // Returns whether the given exception was thrown by the current Java method being executed + // (Note that this includes native Java methods). + bool IsExceptionThrownByCurrentMethod(mirror::Throwable* exception) const + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + ThrowLocation GetCurrentLocationForThrow() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void SetTopOfStack(StackReference<mirror::ArtMethod>* top_method) { @@ -842,14 +846,6 @@ class Thread { tlsPtr_.rosalloc_runs[index] = run; } - bool IsExceptionReportedToInstrumentation() const { - return tls32_.is_exception_reported_to_instrumentation_; - } - - void SetExceptionReportedToInstrumentation(bool reported) { - tls32_.is_exception_reported_to_instrumentation_ = reported; - } - void ProtectStack(); bool UnprotectStack(); @@ -976,8 +972,7 @@ class Thread { explicit tls_32bit_sized_values(bool is_daemon) : suspend_count(0), debug_suspend_count(0), thin_lock_thread_id(0), tid(0), daemon(is_daemon), throwing_OutOfMemoryError(false), no_thread_suspension(0), - thread_exit_check_count(0), is_exception_reported_to_instrumentation_(false), - handling_signal_(false), suspended_at_suspend_check(false) { + thread_exit_check_count(0), handling_signal_(false), suspended_at_suspend_check(false) { } union StateAndFlags state_and_flags; @@ -1014,10 +1009,6 @@ class Thread { // How many times has our pthread key's destructor been called? uint32_t thread_exit_check_count; - // When true this field indicates that the exception associated with this thread has already - // been reported to instrumentation. - bool32_t is_exception_reported_to_instrumentation_; - // True if signal is being handled by this thread. bool32_t handling_signal_; |