diff options
author | Greg Clayton <gclayton@apple.com> | 2013-05-22 23:04:27 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-05-22 23:04:27 +0000 |
commit | 62f80036be3806401adb059a92857d6a35bb87aa (patch) | |
tree | da182d68d61076945e008bae23374f7916cd7393 /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | |
parent | e86321865a03f52b4833fb7aa5f6645de1bf8759 (diff) | |
download | llvm-62f80036be3806401adb059a92857d6a35bb87aa.zip llvm-62f80036be3806401adb059a92857d6a35bb87aa.tar.gz llvm-62f80036be3806401adb059a92857d6a35bb87aa.tar.bz2 |
Added a new "lldb" log channel named "os" for the OperatingSystem plug-ins to use.
Added logging for the OS plug-in python objects in OperatingSystemPython so we can see the python dictionary returned from the plug-in when logging is enabled.
llvm-svn: 182530
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index 67b5c4f..9979a02 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -21,6 +21,7 @@ #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" +#include "lldb/Core/StreamString.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/PythonDataObjects.h" @@ -134,7 +135,7 @@ OperatingSystemPython::GetDynamicRegisterInfo () { if (!m_interpreter || !m_python_object_sp) return NULL; - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OS)); if (log) log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID()); @@ -173,7 +174,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, if (!m_interpreter || !m_python_object_sp) return false; - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OS)); // First thing we have to do is get the API lock, and the run lock. We're going to change the thread // content of the process, and we're going to use python, which requires the API lock to do it. @@ -191,6 +192,12 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, PythonList threads_list(m_interpreter->OSPlugin_ThreadsInfo(m_python_object_sp)); if (threads_list) { + if (log) + { + StreamString strm; + threads_list.Dump(strm); + log->Printf("threads_list = %s", strm.GetString().c_str()); + } uint32_t i; const uint32_t num_threads = threads_list.GetSize(); if (num_threads > 0) |