Clarify the help for "breakpoint command add" and "watchpoint command add".
authorJim Ingham <jingham@apple.com>
Tue, 4 May 2021 00:17:51 +0000 (17:17 -0700)
committerJim Ingham <jingham@apple.com>
Tue, 4 May 2021 00:22:43 +0000 (17:22 -0700)
These two commands add a list of commands to the breakpoint/watchpoint. The current
implementation only supports replacing the current command list.  I started with
that as overwrite seems to be the most common operation.  But using "add" will
allow us to later offer other add-modes: "prepend", "append" and "insert".
That and "overwrite" then make up a useful set of options for this operation.

lldb/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/source/Commands/CommandObjectWatchpointCommand.cpp

index 3489b5c..127cde0 100644 (file)
@@ -61,7 +61,9 @@ public:
   CommandObjectBreakpointCommandAdd(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "add",
                             "Add LLDB commands to a breakpoint, to be executed "
-                            "whenever the breakpoint is hit."
+                            "whenever the breakpoint is hit.  "
+                            "The commands added to the breakpoint replace any "
+                            "commands previously added to it."
                             "  If no breakpoint is specified, adds the "
                             "commands to the last created breakpoint.",
                             nullptr),
index 3df17a0..f22687f 100644 (file)
@@ -61,7 +61,9 @@ public:
   CommandObjectWatchpointCommandAdd(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "add",
                             "Add a set of LLDB commands to a watchpoint, to be "
-                            "executed whenever the watchpoint is hit.",
+                            "executed whenever the watchpoint is hit.  "
+                            "The commands added to the watchpoint replace any "
+                            "commands previously added to it.",
                             nullptr, eCommandRequiresTarget),
         IOHandlerDelegateMultiline("DONE",
                                    IOHandlerDelegate::Completion::LLDBCommand),