[Lldb-commits] [lldb] r166608 - /lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp

Greg Clayton gclayton at apple.com
Wed Oct 24 11:39:14 PDT 2012


Author: gclayton
Date: Wed Oct 24 13:39:14 2012
New Revision: 166608

URL: http://llvm.org/viewvc/llvm-project?rev=166608&view=rev
Log:
Added process and thread logging the python OperatingSystem plug-in.


Modified:
    lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp

Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=166608&r1=166607&r2=166608&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Wed Oct 24 13:39:14 2012
@@ -130,6 +130,11 @@
     {
         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 @@
 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 @@
     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());
     





More information about the lldb-commits mailing list