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:
Jim Ingham 2011-08-09 00:32:52 +00:00
parent 4c9a2fb044
commit 79c35da776
1 changed files with 10 additions and 1 deletions

View File

@ -93,13 +93,22 @@ Thread::GetStopInfo ()
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();
}