summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-01-24 04:11:25 +0000
committerJim Ingham <jingham@apple.com>2011-01-24 04:11:25 +0000
commitce5798394f523bd895209602b5de1196d88ad290 (patch)
tree06d2c60fc094ccc0e4a511063545bc625c2cf9a9
parent9f35921baa03f55d501d9e7ed26cb80b9fcae8c0 (diff)
downloadbcm5719-llvm-ce5798394f523bd895209602b5de1196d88ad290.tar.gz
bcm5719-llvm-ce5798394f523bd895209602b5de1196d88ad290.zip
Some useful logging. Also don't stuff the temporary thread into a shared pointer for no apparent reason.
llvm-svn: 124108
-rw-r--r--lldb/source/Target/ThreadList.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index fa1758b54da..f217cf6560c 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -316,22 +316,27 @@ ThreadList::ShouldReportRun (Event *event_ptr)
// 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;
OpenPOWER on IntegriCloud