[Lldb-commits] [lldb] r162527 - in /lldb/trunk: scripts/Python/python-wrapper.swig source/Interpreter/ScriptInterpreterPython.cpp source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp

Enrico Granata egranata at apple.com
Thu Aug 23 18:34:39 PDT 2012


Author: enrico
Date: Thu Aug 23 20:34:39 2012
New Revision: 162527

URL: http://llvm.org/viewvc/llvm-project?rev=162527&view=rev
Log:
Fixing a bunch of issues with the OS plugin code

Modified:
    lldb/trunk/scripts/Python/python-wrapper.swig
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
    lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp

Modified: lldb/trunk/scripts/Python/python-wrapper.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-wrapper.swig?rev=162527&r1=162526&r2=162527&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/python-wrapper.swig (original)
+++ lldb/trunk/scripts/Python/python-wrapper.swig Thu Aug 23 20:34:39 2012
@@ -779,7 +779,7 @@
                 
             if (PyCallable_Check (pfunc))
             {
-                PyObject *argList = Py_BuildValue("S", SBProc_PyObj);
+                PyObject *argList = Py_BuildValue("(O)", SBProc_PyObj);
 
                 if (PyErr_Occurred ())
                 {

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=162527&r1=162526&r2=162527&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Thu Aug 23 20:34:39 2012
@@ -1717,7 +1717,7 @@
     void* ret_val;
     
     {
-        Locker py_lock(this);
+        Locker py_lock(this,Locker::AcquireLock,Locker::FreeLock);
         ret_val = g_swig_create_os_plugin    (class_name,
                                               m_dictionary_name.c_str(),
                                               process_sp);
@@ -1729,6 +1729,8 @@
 lldb::ScriptInterpreterObjectSP
 ScriptInterpreterPython::OSPlugin_QueryForRegisterInfo (lldb::ScriptInterpreterObjectSP object)
 {
+    Locker py_lock(this,Locker::AcquireLock,Locker::FreeLock);
+    
     static char callee_name[] = "get_register_info";
     
     if (!object)
@@ -1786,6 +1788,8 @@
 lldb::ScriptInterpreterObjectSP
 ScriptInterpreterPython::OSPlugin_QueryForThreadsInfo (lldb::ScriptInterpreterObjectSP object)
 {
+    Locker py_lock(this,Locker::AcquireLock,Locker::FreeLock);
+
     static char callee_name[] = "get_thread_info";
     
     if (!object)
@@ -1844,6 +1848,8 @@
 ScriptInterpreterPython::OSPlugin_QueryForThreadInfo (lldb::ScriptInterpreterObjectSP object,
                                                       lldb::tid_t thread_id)
 {
+    Locker py_lock(this,Locker::AcquireLock,Locker::FreeLock);
+
     static char callee_name[] = "get_register_data";
     static char param_format[] = "l";
     

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=162527&r1=162526&r2=162527&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Thu Aug 23 20:34:39 2012
@@ -56,7 +56,7 @@
 OperatingSystemPython::CreateInstance (Process *process, bool force)
 {
     // Python OperatingSystem plug-ins must be requested by name, so force must be true
-    if (force)
+    //if (force)
         return new OperatingSystemPython (process);
     return NULL;
 }





More information about the lldb-commits mailing list