[Lldb-commits] [lldb] 60ad0fd - Clarify the help for "breakpoint command add" and "watchpoint command add".
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Mon May 3 17:22:57 PDT 2021
Author: Jim Ingham
Date: 2021-05-03T17:22:43-07:00
New Revision: 60ad0fd3c8bf18dc1a307b97e9e3eb21dd5e4cfb
URL: https://github.com/llvm/llvm-project/commit/60ad0fd3c8bf18dc1a307b97e9e3eb21dd5e4cfb
DIFF: https://github.com/llvm/llvm-project/commit/60ad0fd3c8bf18dc1a307b97e9e3eb21dd5e4cfb.diff
LOG: 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.
Added:
Modified:
lldb/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/source/Commands/CommandObjectWatchpointCommand.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 3489b5cffb9f3..127cde061120d 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -61,7 +61,9 @@ class CommandObjectBreakpointCommandAdd : public CommandObjectParsed,
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 3df17a0c17f3d..f22687ff4bd87 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -61,7 +61,9 @@ class CommandObjectWatchpointCommandAdd : public CommandObjectParsed,
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),
More information about the lldb-commits
mailing list