diff options
author | Jim Ingham <jingham@apple.com> | 2011-08-09 00:32:52 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-08-09 00:32:52 +0000 |
commit | 79c35da776f1d3d5e4edbd8ee9b141c5c2f7f2fc (patch) | |
tree | bd48db10bda33b0052ccd997d87cd62e0a28f6ad /lldb/source/Target/Thread.cpp | |
parent | 4c9a2fb04499b90686df1f0c6b5dd3f4f73b1000 (diff) | |
download | bcm5719-llvm-79c35da776f1d3d5e4edbd8ee9b141c5c2f7f2fc.tar.gz bcm5719-llvm-79c35da776f1d3d5e4edbd8ee9b141c5c2f7f2fc.zip |
Don't create a new stop info if we've already calculated one and it is still valid.
llvm-svn: 137084
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 267f1fc8999..6d03b2f3282 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -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(); } |