diff options
| author | Enrico Granata <egranata@apple.com> | 2012-08-24 01:34:39 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-08-24 01:34:39 +0000 |
| commit | 4300fab2d4ac7d04035779b509b8e38219386096 (patch) | |
| tree | 60fb774c75945cc985ab4bd8e96591e14f639d3a | |
| parent | bb69a27dbc86667a3d1dc3389a2c2bd086cffb2c (diff) | |
| download | bcm5719-llvm-4300fab2d4ac7d04035779b509b8e38219386096.tar.gz bcm5719-llvm-4300fab2d4ac7d04035779b509b8e38219386096.zip | |
Fixing a bunch of issues with the OS plugin code
llvm-svn: 162527
| -rw-r--r-- | lldb/scripts/Python/python-wrapper.swig | 2 | ||||
| -rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 8 | ||||
| -rw-r--r-- | lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index a2c7a48f14d..1acbe277d3d 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -779,7 +779,7 @@ LLDBSWIGPythonCreateOSPlugin if (PyCallable_Check (pfunc)) { - PyObject *argList = Py_BuildValue("S", SBProc_PyObj); + PyObject *argList = Py_BuildValue("(O)", SBProc_PyObj); if (PyErr_Occurred ()) { diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index faf362b5005..2c406271bbb 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -1717,7 +1717,7 @@ ScriptInterpreterPython::CreateOSPlugin (std::string class_name, 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 @@ ScriptInterpreterPython::CreateOSPlugin (std::string class_name, 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 @@ ScriptInterpreterPython::OSPlugin_QueryForRegisterInfo (lldb::ScriptInterpreterO 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 @@ lldb::ScriptInterpreterObjectSP 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"; diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index ba57c731eb9..4a782c6feca 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -56,7 +56,7 @@ OperatingSystem * 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; } |

