Added OnStart and OnEnd methods to the tracer.

llvm-svn: 118876
This commit is contained in:
Jim Ingham 2010-11-12 02:30:38 +00:00
parent d4b7fff2e8
commit 929937286b
1 changed files with 23 additions and 0 deletions

View File

@ -24,6 +24,14 @@ class ThreadPlanTracer
friend class ThreadPlan;
public:
typedef enum ThreadPlanTracerStyle
{
eLocation = 0,
eStateChange,
eCheckFrames,
ePython,
} ThreadPlanTracerStyle;
ThreadPlanTracer (Thread &thread, lldb::StreamSP &stream_sp);
ThreadPlanTracer (Thread &thread);
@ -31,11 +39,26 @@ public:
{
}
virtual void TracingStarted ()
{
}
virtual void TracingEnded ()
{
}
bool
EnableTracing(bool value)
{
bool old_value = m_enabled;
m_enabled = value;
if (old_value == false && value == true)
TracingStarted();
else if (old_value == true && value == false)
TracingEnded();
return old_value;
}