Don't create a new stop info if we've already calculated one and it is still valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 267f1fc..6d03b2f 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -93,13 +93,22 @@
if (plan_sp)
return StopInfo::CreateStopReasonWithPlan (plan_sp);
else
- return GetPrivateStopReason ();
+ {
+ if (m_actual_stop_info_sp
+ && m_actual_stop_info_sp->IsValid()
+ && m_thread_stop_reason_stop_id == m_process.GetStopID())
+ return m_actual_stop_info_sp;
+ else
+ return GetPrivateStopReason ();
+ }
}
void
Thread::SetStopInfo (const lldb::StopInfoSP &stop_info_sp)
{
m_actual_stop_info_sp = stop_info_sp;
+ if (m_actual_stop_info_sp)
+ m_actual_stop_info_sp->MakeStopInfoValid();
m_thread_stop_reason_stop_id = GetProcess().GetStopID();
}