More useful STEP logging.
Be sure to clear out the base plan's m_report_run and m_report_stop each time we resume so we don't use stale values.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124113 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 2c544a2..232bf28 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -351,17 +351,35 @@
Thread::ShouldReportRun (Event* event_ptr)
{
StateType thread_state = GetResumeState ();
+
if (thread_state == eStateSuspended
|| thread_state == eStateInvalid)
+ {
return eVoteNoOpinion;
-
+ }
+
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (m_completed_plan_stack.size() > 0)
{
// Don't use GetCompletedPlan here, since that suppresses private plans.
+ if (log)
+ log->Printf ("Current Plan for thread %d (0x%4.4x): %s being asked whether we should report run.",
+ GetIndexID(),
+ GetID(),
+ m_completed_plan_stack.back()->GetName());
+
return m_completed_plan_stack.back()->ShouldReportRun (event_ptr);
}
else
+ {
+ if (log)
+ log->Printf ("Current Plan for thread %d (0x%4.4x): %s being asked whether we should report run.",
+ GetIndexID(),
+ GetID(),
+ GetCurrentPlan()->GetName());
+
return GetCurrentPlan()->ShouldReportRun (event_ptr);
+ }
}
bool