aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-10-24 18:39:14 +0000
committerGreg Clayton <gclayton@apple.com>2012-10-24 18:39:14 +0000
commit1c22be69991b1dd9f34f6a9d89129daca0ae3816 (patch)
tree5c4ee9ac1dc3c24481b1ffa9462476d2df7c2110 /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
parentbf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc (diff)
downloadllvm-1c22be69991b1dd9f34f6a9d89129daca0ae3816.zip
llvm-1c22be69991b1dd9f34f6a9d89129daca0ae3816.tar.gz
llvm-1c22be69991b1dd9f34f6a9d89129daca0ae3816.tar.bz2
Added process and thread logging the python OperatingSystem plug-in.
llvm-svn: 166608
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index f139044..6ff4156 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -130,6 +130,11 @@ OperatingSystemPython::GetDynamicRegisterInfo ()
{
if (!m_interpreter || !m_python_object)
return NULL;
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+
+ if (log)
+ log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %llu", m_process->GetID());
+
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterInfo(m_interpreter->MakeScriptObject(m_python_object));
if (!object_sp)
return NULL;
@@ -169,9 +174,14 @@ OperatingSystemPython::GetPluginVersion()
bool
OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)
{
-
if (!m_interpreter || !m_python_object)
return NULL;
+
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+
+ if (log)
+ log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %llu", m_process->GetID());
+
auto object_sp = m_interpreter->OSPlugin_QueryForThreadsInfo(m_interpreter->MakeScriptObject(m_python_object));
if (!object_sp)
return NULL;
@@ -234,6 +244,12 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread)
RegisterContextSP reg_ctx_sp;
if (!m_interpreter || !m_python_object || !thread)
return RegisterContextSP();
+
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
+
+ if (log)
+ log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx) fetching register data from python", thread->GetID());
+
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterContextData (m_interpreter->MakeScriptObject(m_python_object),
thread->GetID());