[Lldb-commits] [lldb] r124108 - /lldb/trunk/source/Target/ThreadList.cpp

Jim Ingham jingham at apple.com
Sun Jan 23 20:11:25 PST 2011


Author: jingham
Date: Sun Jan 23 22:11:25 2011
New Revision: 124108

URL: http://llvm.org/viewvc/llvm-project?rev=124108&view=rev
Log:
Some useful logging.  Also don't stuff the temporary thread into a shared pointer for no apparent reason.

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

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=124108&r1=124107&r2=124108&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Sun Jan 23 22:11:25 2011
@@ -316,22 +316,27 @@
     // Run through the threads and ask whether we should report this event.
     // The rule is NO vote wins over everything, a YES vote wins over no opinion.
 
+    LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
+    
     for (pos = m_threads.begin(); pos != end; ++pos)
     {
-        ThreadSP thread_sp(*pos);
-        if (thread_sp->GetResumeState () != eStateSuspended)
-
-        switch (thread_sp->ShouldReportRun (event_ptr))
+        if ((*pos)->GetResumeState () != eStateSuspended)
         {
-            case eVoteNoOpinion:
-                continue;
-            case eVoteYes:
-                if (result == eVoteNoOpinion)
-                    result = eVoteYes;
-                break;
-            case eVoteNo:
-                result = eVoteNo;
-                break;
+            switch ((*pos)->ShouldReportRun (event_ptr))
+            {
+                case eVoteNoOpinion:
+                    continue;
+                case eVoteYes:
+                    if (result == eVoteNoOpinion)
+                        result = eVoteYes;
+                    break;
+                case eVoteNo:
+                    log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4x) says don't report.", 
+                                 (*pos)->GetIndexID(), 
+                                 (*pos)->GetID());
+                    result = eVoteNo;
+                    break;
+            }
         }
     }
     return result;





More information about the lldb-commits mailing list