First pass at adding logging capabilities for the API functions.  At the moment
it logs the function calls, their arguments and the return values.  This is not
complete or polished, but I am committing it now, at the request of someone who
really wants to use it, even though it's not really done.  It currently does not
attempt to log all the functions, just the most important ones.  I will be 
making further adjustments to the API logging code over the next few days/weeks.
(Suggestions for improvements are welcome).


Update the Python build scripts to re-build the swig C++ file whenever 
the python-extensions.swig file is modified.

Correct the help for 'log enable' command (give it the correct number & type of
arguments).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117349 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 2df4e8f..9bd7e76 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -1097,3 +1097,39 @@
 {
     return GetStackFrameList().GetStackFrameSPForStackFramePtr (stack_frame_ptr);
 }
+
+const char *
+Thread::StopReasonAsCString (lldb::StopReason reason)
+{
+    switch (reason)
+    {
+    case eStopReasonInvalid:      return "invalid";
+    case eStopReasonNone:         return "none";
+    case eStopReasonTrace:        return "trace";
+    case eStopReasonBreakpoint:   return "breakpoint";
+    case eStopReasonWatchpoint:   return "watchpoint";
+    case eStopReasonSignal:       return "signal";
+    case eStopReasonException:    return "exception";
+    case eStopReasonPlanComplete: return "plan complete";
+    }
+
+
+    static char unknown_state_string[64];
+    snprintf(unknown_state_string, sizeof (unknown_state_string), "StopReason = %i", reason);
+    return unknown_state_string;
+}
+
+const char *
+Thread::RunModeAsCString (lldb::RunMode mode)
+{
+    switch (mode)
+    {
+    case eOnlyThisThread:     return "only this thread";
+    case eAllThreads:         return "all threads";
+    case eOnlyDuringStepping: return "only during stepping";
+    }
+
+    static char unknown_state_string[64];
+    snprintf(unknown_state_string, sizeof (unknown_state_string), "RunMode = %i", mode);
+    return unknown_state_string;
+}