diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-02-26 10:56:09 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-03 17:50:49 +0000 |
commit | 7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0 (patch) | |
tree | 807b3c797483310ac23954c5eddb7441b91749c5 /runtime/thread.h | |
parent | dc47e986941b1a3754447fabea272485f3f0f382 (diff) | |
download | android_art-7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0.tar.gz android_art-7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0.tar.bz2 android_art-7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0.zip |
Change how we report exceptions to the debugger.
This is only a refactoring/cleanup. Bug fixes with respect
to catch location, and more cleanups will follow.
Change-Id: I30d3c6260b0c8f8115a811621397225b88f2063a
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_; |