summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/OperatingSystem/Python
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-05-22 23:04:27 +0000
committerGreg Clayton <gclayton@apple.com>2013-05-22 23:04:27 +0000
commit62f80036be3806401adb059a92857d6a35bb87aa (patch)
treeda182d68d61076945e008bae23374f7916cd7393 /lldb/source/Plugins/OperatingSystem/Python
parente86321865a03f52b4833fb7aa5f6645de1bf8759 (diff)
downloadbcm5719-llvm-62f80036be3806401adb059a92857d6a35bb87aa.tar.gz
bcm5719-llvm-62f80036be3806401adb059a92857d6a35bb87aa.zip
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')
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp11
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 67b5c4f7088..9979a02a80e 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)
OpenPOWER on IntegriCloud