diff options
author | Jim Ingham <jingham@apple.com> | 2014-04-02 01:04:55 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2014-04-02 01:04:55 +0000 |
commit | d80102e4203691c31314fb3f65c5f91d86dbf06e (patch) | |
tree | 47bf527eebc2300e2d86f96c3c85a1a021f3eac9 /lldb/source/Commands/CommandObjectBreakpointCommand.cpp | |
parent | 3c2b13b25825d0e8cd798e2e1e78b31f2f516d32 (diff) | |
download | llvm-d80102e4203691c31314fb3f65c5f91d86dbf06e.zip llvm-d80102e4203691c31314fb3f65c5f91d86dbf06e.tar.gz llvm-d80102e4203691c31314fb3f65c5f91d86dbf06e.tar.bz2 |
Add the ability to set python breakpoint commands from the SBBreakpoint & SBBreakpointLocation API's.
You can either provide the function name, or function body text.
Also propagate the compilation error up from where it is checked so we can report compilation errors.
<rdar://problem/9898371>
llvm-svn: 205380
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 532d6ce..0b28cc3 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -504,16 +504,10 @@ protected: m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (bp_options, m_options.m_one_liner.c_str()); } - // Special handling for using a Python function by name - // instead of extending the breakpoint callback data structures, we just automatize - // 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("return "); - oneliner += m_options.m_function_name; - oneliner += "(frame, bp_loc, internal_dict)"; - m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (bp_options, - oneliner.c_str()); + m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallbackFunction (bp_options, + m_options.m_function_name.c_str()); } else { |