From 60ad0fd3c8bf18dc1a307b97e9e3eb21dd5e4cfb Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 3 May 2021 17:17:51 -0700 Subject: [PATCH] Clarify the help for "breakpoint command add" and "watchpoint command add". 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 | 4 +++- lldb/source/Commands/CommandObjectWatchpointCommand.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 3489b5c..127cde0 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -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), diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index 3df17a0..f22687f 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -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), -- 2.7.4