summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-05-15 02:46:08 +0000
committerEnrico Granata <egranata@apple.com>2013-05-15 02:46:08 +0000
commitc8fcaab6ce13232258f10c4a1a76dfed0b03fde7 (patch)
tree896266f06c99b1d9af4db1c03892238dcd85cfb1 /lldb/source/Commands/CommandObjectBreakpointCommand.cpp
parentd10f1c04aad0a845f4fb54bb7ec0c6568bd56753 (diff)
downloadbcm5719-llvm-c8fcaab6ce13232258f10c4a1a76dfed0b03fde7.tar.gz
bcm5719-llvm-c8fcaab6ce13232258f10c4a1a76dfed0b03fde7.zip
<rdar://problem/13883385>
Python breakpoint actions can return False to say that they don't want to stop at the breakpoint to which they are associated Almost all of the work to support this notion of a breakpoint callback was in place, but two small moving parts were missing: a) the SWIG wrapper was not checking the return value of the script b) when passing a Python function by name, the call statement was dropping the return value of the function This checkin addresses both concerns and makes this work Care has been taken that you only keep running when an actual value of False has been returned, and that any other value (None included) means Stop! llvm-svn: 181866
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp3
1 files changed, 2 insertions, 1 deletions
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());
OpenPOWER on IntegriCloud