aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 60c7d8f..396933a 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -258,9 +258,15 @@ CommandObjectBreakpointCommandAdd::Execute
{
if (m_options.m_use_script_language)
{
- interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
- bp_loc_sp->GetLocationOptions(),
- result);
+ // Special handling for one-liner.
+ if (command.GetArgumentCount() == 2)
+ interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (interpreter,
+ bp_loc_sp->GetLocationOptions(),
+ command.GetArgumentAtIndex(1));
+ else
+ interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
+ bp_loc_sp->GetLocationOptions(),
+ result);
}
else
{
@@ -274,9 +280,15 @@ CommandObjectBreakpointCommandAdd::Execute
{
if (m_options.m_use_script_language)
{
- interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
- bp->GetOptions(),
- result);
+ // Special handling for one-liner.
+ if (command.GetArgumentCount() == 2)
+ interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (interpreter,
+ bp->GetOptions(),
+ command.GetArgumentAtIndex(1));
+ else
+ interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
+ bp->GetOptions(),
+ result);
}
else
{