forked from OSchip/llvm-project
Don't create a new stop info if we've already calculated one and it is still valid.
llvm-svn: 137084
This commit is contained in:
parent
4c9a2fb044
commit
79c35da776
|
@ -92,14 +92,23 @@ Thread::GetStopInfo ()
|
|||
ThreadPlanSP plan_sp (GetCompletedPlan());
|
||||
if (plan_sp)
|
||||
return StopInfo::CreateStopReasonWithPlan (plan_sp);
|
||||
else
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue