Add ThreadPlanTracer class to allow instruction step tracing of execution.
Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118824 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanBase.cpp b/source/Target/ThreadPlanBase.cpp
index 393a3dd..55ef2f7 100644
--- a/source/Target/ThreadPlanBase.cpp
+++ b/source/Target/ThreadPlanBase.cpp
@@ -35,7 +35,10 @@
ThreadPlanBase::ThreadPlanBase (Thread &thread) :
ThreadPlan(ThreadPlan::eKindBase, "base plan", thread, eVoteYes, eVoteNoOpinion)
{
-
+ // Set the tracer to a default tracer.
+ ThreadPlanTracerSP new_tracer_sp (new ThreadPlanTracer (m_thread));
+ new_tracer_sp->EnableTracing (m_thread.GetTraceEnabledState());
+ SetThreadPlanTracer(new_tracer_sp);
}
ThreadPlanBase::~ThreadPlanBase ()
@@ -58,7 +61,12 @@
bool
ThreadPlanBase::PlanExplainsStop ()
{
- return true;
+ // The base plan should defer to its tracer, since by default it
+ // always handles the stop.
+ if (TracerExplainsStop())
+ return false;
+ else
+ return true;
}
bool
@@ -153,7 +161,7 @@
}
StateType
-ThreadPlanBase::RunState ()
+ThreadPlanBase::GetPlanRunState ()
{
return eStateRunning;
}