diff options
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(); |

