diff options
| -rw-r--r-- | lldb/scripts/Python/python-wrapper.swig | 4 | ||||
| -rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 3 | 
2 files changed, 6 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 9834f0f2b63..789cf6fae11 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -151,6 +151,10 @@ LLDBSwigPythonBreakpointCallbackFunction                  if (pvalue != NULL)                  { +                    // be very conservative here and only refuse to stop if the user +                    // actually returned False - anything else, just stop +                    if (pvalue == Py_False) +                        stop_at_breakpoint = false;                      Py_DECREF (pvalue);                  }                  else if (PyErr_Occurred ()) diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 0d6a3a7264d..3dbb6e052d5 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -581,7 +581,8 @@ protected:                          // what the user would do manually: make their breakpoint command be a function call                          else if (m_options.m_function_name.size())                          { -                            std::string oneliner(m_options.m_function_name); +                            std::string oneliner("return "); +                            oneliner += m_options.m_function_name;                              oneliner += "(frame, bp_loc, internal_dict)";                              m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (bp_options,                                                                                                  oneliner.c_str());  | 

