From 1c22be69991b1dd9f34f6a9d89129daca0ae3816 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 24 Oct 2012 18:39:14 +0000 Subject: [PATCH] Added process and thread logging the python OperatingSystem plug-in. llvm-svn: 166608 --- .../OperatingSystem/Python/OperatingSystemPython.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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()); -- 2.7.4