[Lldb-commits] [lldb] r137084 - /lldb/trunk/source/Target/Thread.cpp

Jim Ingham jingham at apple.com
Mon Aug 8 17:32:53 PDT 2011


Author: jingham
Date: Mon Aug  8 19:32:52 2011
New Revision: 137084

URL: http://llvm.org/viewvc/llvm-project?rev=137084&view=rev
Log:
Don't create a new stop info if we've already calculated one and it is still valid.

Modified:
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=137084&r1=137083&r2=137084&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Mon Aug  8 19:32:52 2011
@@ -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();
 }
 





More information about the lldb-commits mailing list