summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index a7e03a2a60d..5096a91cf1f 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -357,18 +357,24 @@ lldb::StopInfoSP
Thread::GetStopInfo ()
{
ThreadPlanSP plan_sp (GetCompletedPlan());
+ ProcessSP process_sp (GetProcess());
+ const uint32_t stop_id = process_sp ? process_sp->GetStopID() : UINT32_MAX;
if (plan_sp && plan_sp->PlanSucceeded())
+ {
return StopInfo::CreateStopReasonWithPlan (plan_sp, GetReturnValueObject());
+ }
else
{
- ProcessSP process_sp (GetProcess());
- if (process_sp
- && m_actual_stop_info_sp
- && m_actual_stop_info_sp->IsValid()
- && m_thread_stop_reason_stop_id == process_sp->GetStopID())
+ if ((m_thread_stop_reason_stop_id == stop_id) || // Stop info is valid, just return what we have (even if empty)
+ (m_actual_stop_info_sp && m_actual_stop_info_sp->IsValid())) // Stop info is valid, just return what we have
+ {
return m_actual_stop_info_sp;
+ }
else
- return GetPrivateStopReason ();
+ {
+ GetPrivateStopReason ();
+ return m_actual_stop_info_sp;
+ }
}
}
OpenPOWER on IntegriCloud