summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index f5f8660a122..b40502995b6 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1150,6 +1150,7 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp,
}
else
{
+ StopInfoSP curr_thread_stop_info_sp;
// Lock the thread list so it doesn't change on us, this is the scope for the locker:
{
ThreadList &thread_list = process_sp->GetThreadList();
@@ -1159,7 +1160,10 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp,
ThreadSP thread;
StopReason curr_thread_stop_reason = eStopReasonInvalid;
if (curr_thread)
+ {
curr_thread_stop_reason = curr_thread->GetStopReason();
+ curr_thread_stop_info_sp = curr_thread->GetStopInfo();
+ }
if (!curr_thread ||
!curr_thread->IsValid() ||
curr_thread_stop_reason == eStopReasonInvalid ||
@@ -1244,6 +1248,20 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp,
start_frame,
num_frames,
num_frames_with_source);
+ if (curr_thread_stop_info_sp)
+ {
+ lldb::addr_t crashing_address;
+ ValueObjectSP valobj_sp = StopInfo::GetCrashingDereference(curr_thread_stop_info_sp, &crashing_address);
+ if (valobj_sp)
+ {
+ const bool qualify_cxx_base_classes = false;
+
+ const ValueObject::GetExpressionPathFormat format = ValueObject::GetExpressionPathFormat::eGetExpressionPathFormatHonorPointers;
+ stream->PutCString("Likely cause: ");
+ valobj_sp->GetExpressionPath(*stream, qualify_cxx_base_classes, format);
+ stream->Printf(" accessed 0x%llx\n", crashing_address);
+ }
+ }
}
else
{
OpenPOWER on IntegriCloud