summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2018-12-20 02:01:59 +0000
committerKuba Mracek <mracek@apple.com>2018-12-20 02:01:59 +0000
commitc9e1190a27864868324c20aabd8fa648a8247c5a (patch)
tree9c4c52e8ff57572eb2db84a2ea0a2e6b2869b105 /lldb/source/Commands/CommandObjectThread.cpp
parent17e705129eeffdefe148ecafdd0268ba463ac876 (diff)
downloadbcm5719-llvm-c9e1190a27864868324c20aabd8fa648a8247c5a.tar.gz
bcm5719-llvm-c9e1190a27864868324c20aabd8fa648a8247c5a.zip
[lldb] Retrieve currently handled Obj-C exception via __cxa_current_exception_type and add GetCurrentExceptionBacktrace SB ABI
This builds on https://reviews.llvm.org/D43884 and https://reviews.llvm.org/D43886 and extends LLDB support of Obj-C exceptions to also look for a "current exception" for a thread in the C++ exception handling runtime metadata (via call to __cxa_current_exception_type). We also construct an actual historical SBThread/ThreadSP that contains frames from the backtrace in the Obj-C exception object. The high level goal this achieves is that when we're already crashed (because an unhandled exception occurred), we can still access the exception object and retrieve the backtrace from the throw point. In Obj-C, this is particularly useful because a catch+rethrow is very common and in those cases you currently don't have any access to the throw point backtrace. Differential Revision: https://reviews.llvm.org/D44072 llvm-svn: 349718
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 57dd2a33226..e792887d4ff 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -1552,14 +1552,13 @@ class CommandObjectThreadException : public CommandObjectIterateOverThreads {
exception_object_sp->Dump(strm);
}
- /* TODO(kubamracek)
ThreadSP exception_thread_sp = thread_sp->GetCurrentExceptionBacktrace();
if (exception_thread_sp && exception_thread_sp->IsValid()) {
const uint32_t num_frames_with_source = 0;
const bool stop_format = false;
- exception_thread_sp->GetStatus(strm, m_options.m_start, m_options.m_count,
+ exception_thread_sp->GetStatus(strm, 0, UINT32_MAX,
num_frames_with_source, stop_format);
- }*/
+ }
return true;
}
OpenPOWER on IntegriCloud