diff options
| author | Enrico Granata <egranata@apple.com> | 2013-07-09 20:14:26 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2013-07-09 20:14:26 +0000 |
| commit | eff81a471acdf888e3cf5bc6550bd62b465d4e06 (patch) | |
| tree | dc00802f687af8148091b6a2441f142b3f0f690d /lldb/source/Interpreter/ScriptInterpreterPython.cpp | |
| parent | 61a56d7a3a7813f0961a522f1dc980bcf27fcfbb (diff) | |
| download | bcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.tar.gz bcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.zip | |
Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!
llvm-svn: 185965
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
| -rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index e42ca6807ee..68414972608 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -115,8 +115,7 @@ LLDBSwigPythonCallCommand (const char *python_function_name, const char *session_dictionary_name, lldb::DebuggerSP& debugger, const char* args, - std::string& err_msg, - lldb_private::CommandReturnObject& cmd_retobj); + lldb_private::CommandReturnObject &cmd_retobj); extern "C" bool LLDBSwigPythonCallModuleInit (const char *python_module_name, @@ -2963,25 +2962,25 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function, } lldb::DebuggerSP debugger_sp = m_interpreter.GetDebugger().shared_from_this(); - + if (!debugger_sp.get()) { error.SetErrorString("invalid Debugger pointer"); return false; } - bool ret_val; + bool ret_val = false; std::string err_msg; - + { Locker py_lock(this, Locker::AcquireLock | Locker::InitSession, Locker::FreeLock | Locker::TearDownSession); - + SynchronicityHandler synch_handler(debugger_sp, synchronicity); - + // we need to save the thread state when we first start the command // because we might decide to interrupt it while some action is taking // place outside of Python (e.g. printing to screen, waiting for the network, ...) @@ -2995,12 +2994,11 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function, m_dictionary_name.c_str(), debugger_sp, args, - err_msg, cmd_retobj); } - + if (!ret_val) - error.SetErrorString(err_msg.c_str()); + error.SetErrorString("unable to execute script function"); else error.Clear(); |

