Added [-o <one-liner>] to the "breakpoint command add" lldb command to be able
to specify a one-liner (either scripting or lldb command) inline.
Refactored CommandObjectBreakpointCommandAdd::Execute() a little bit and added
some comments.
Sn now, we use:
breakpoint command add -p 1 -o "conditional_break.stop_if_called_from_a()"
to specify a Python one-liner as the callback for breakpoint #1.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113672 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectBreakpointCommand.h b/source/Commands/CommandObjectBreakpointCommand.h
index fc59c77..262ef1f 100644
--- a/source/Commands/CommandObjectBreakpointCommand.h
+++ b/source/Commands/CommandObjectBreakpointCommand.h
@@ -74,6 +74,11 @@
BreakpointOptions *bp_options,
CommandReturnObject &result);
+ void
+ SetBreakpointCommandCallback (CommandInterpreter &interpreter,
+ BreakpointOptions *bp_options,
+ const char *oneliner);
+
static size_t
GenerateBreakpointCommandCallback (void *baton,
InputReader &reader,
@@ -115,6 +120,10 @@
bool m_use_commands;
bool m_use_script_language;
lldb::ScriptLanguage m_script_language;
+
+ // Instance variables to hold the values for one_liner options.
+ bool m_use_one_liner;
+ std::string m_one_liner;
};
private: