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/ThreadPlanTracer.cpp b/source/Target/ThreadPlanTracer.cpp
new file mode 100644
index 0000000..632cfe6
--- /dev/null
+++ b/source/Target/ThreadPlanTracer.cpp
@@ -0,0 +1,77 @@
+//===-- ThreadPlan.cpp ------------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/ThreadPlan.h"
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/Log.h"
+#include "lldb/Core/State.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+ThreadPlanTracer::ThreadPlanTracer (Thread &thread, lldb::StreamSP &stream_sp) :
+    m_single_step(true),
+    m_enabled (false),
+    m_thread (thread),
+    m_stream_sp (stream_sp)
+{
+}
+
+ThreadPlanTracer::ThreadPlanTracer (Thread &thread) :
+    m_single_step(true),
+    m_enabled (false),
+    m_thread (thread),
+    m_stream_sp ()
+{
+}
+
+Stream *
+ThreadPlanTracer::GetLogStream ()
+{
+    
+    if (m_stream_sp.get())
+        return m_stream_sp.get();
+    else
+        return &(m_thread.GetProcess().GetTarget().GetDebugger().GetOutputStream());
+}
+
+void 
+ThreadPlanTracer::Log()
+{
+    SymbolContext sc;
+    bool show_frame_index = false;
+    bool show_fullpaths = false;
+    
+    m_thread.GetStackFrameAtIndex(0)->Dump (GetLogStream(), show_frame_index, show_fullpaths);
+    GetLogStream()->Printf("\n");
+}
+
+bool
+ThreadPlanTracer::TracerExplainsStop ()
+{
+    if (m_enabled && m_single_step)
+    {
+        lldb::StopInfoSP stop_info = m_thread.GetStopInfo();
+        if (stop_info->GetStopReason() == eStopReasonTrace)
+            return true;
+        else 
+            return false;
+    }
+    else
+        return false;
+}