[Lldb-commits] [lldb] [lldb] Give every command a single-line short description (PR #207381)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 3 05:11:10 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Raphael Isemann (Teemperor)
<details>
<summary>Changes</summary>
This patch gives every command a short single-line description on its first line. In combination with #<!-- -->207379, this makes the tab-completion of a large set of commands far less verbose.
assisted-by: claude
---
Patch is 38.75 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/207381.diff
19 Files Affected:
- (modified) lldb/source/Commands/CommandObjectBreakpoint.cpp (+10-8)
- (modified) lldb/source/Commands/CommandObjectBreakpointCommand.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectCommands.cpp (+3-2)
- (modified) lldb/source/Commands/CommandObjectDisassemble.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectExpression.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectFrame.cpp (+2-1)
- (modified) lldb/source/Commands/CommandObjectLog.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectMemoryTag.cpp (+2-2)
- (modified) lldb/source/Commands/CommandObjectProcess.cpp (+6-3)
- (modified) lldb/source/Commands/CommandObjectRegister.cpp (+2-1)
- (modified) lldb/source/Commands/CommandObjectScripting.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectSettings.cpp (+5-4)
- (modified) lldb/source/Commands/CommandObjectSource.cpp (+3-2)
- (modified) lldb/source/Commands/CommandObjectTarget.cpp (+4-3)
- (modified) lldb/source/Commands/CommandObjectThread.cpp (+34-20)
- (modified) lldb/source/Commands/CommandObjectTrace.cpp (+1-1)
- (modified) lldb/source/Commands/CommandObjectWatchpoint.cpp (+8-7)
- (modified) lldb/source/Commands/CommandObjectWatchpointCommand.cpp (+1-1)
- (modified) lldb/source/Interpreter/CommandInterpreter.cpp (+6-3)
``````````diff
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 38b79d6c33922..dc48820029708 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -536,7 +536,8 @@ class CommandObjectBreakpointAddException : public CommandObjectParsed {
CommandObjectBreakpointAddException(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "breakpoint add exception",
- "Add breakpoints on language exceptions. If no language is "
+ "Add breakpoints on language exceptions.\n"
+ "If no language is "
"specified, break on exceptions for all supported languages",
nullptr, eCommandAllowsDummyTarget) {
// Define the first (and only) variant of this arg.
@@ -2041,7 +2042,7 @@ class CommandObjectBreakpointModify : public CommandObjectParsed {
CommandObjectBreakpointModify(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "breakpoint modify",
"Modify the options on a breakpoint or set of "
- "breakpoints in the executable. "
+ "breakpoints in the executable.\n"
"If no breakpoint is specified, acts on the last "
"created breakpoint. "
"With the exception of -e, -d and -i, passing an "
@@ -2116,7 +2117,8 @@ class CommandObjectBreakpointEnable : public CommandObjectParsed {
public:
CommandObjectBreakpointEnable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "enable",
- "Enable the specified disabled breakpoint(s). If "
+ "Enable the specified disabled breakpoint(s).\n"
+ "If "
"no breakpoints are specified, enable all of them.",
nullptr, eCommandAllowsDummyTarget) {
CommandObject::AddIDsArgumentData(eBreakpointArgs);
@@ -2203,7 +2205,7 @@ class CommandObjectBreakpointDisable : public CommandObjectParsed {
: CommandObjectParsed(
interpreter, "breakpoint disable",
"Disable the specified breakpoint(s) without deleting "
- "them. If none are specified, disable all "
+ "them.\nIf none are specified, disable all "
"breakpoints.",
nullptr, eCommandAllowsDummyTarget) {
SetHelpLong(
@@ -2584,7 +2586,7 @@ class CommandObjectBreakpointDelete : public CommandObjectParsed {
public:
CommandObjectBreakpointDelete(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "breakpoint delete",
- "Delete the specified breakpoint(s). If no "
+ "Delete the specified breakpoint(s).\nIf no "
"breakpoints are specified, delete them all.",
nullptr, eCommandAllowsDummyTarget) {
CommandObject::AddIDsArgumentData(eBreakpointArgs);
@@ -2890,7 +2892,7 @@ class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
: CommandObjectParsed(
interpreter, "configure",
"Configure the options for the breakpoint"
- " name provided. "
+ " name provided.\n"
"If you provide a breakpoint id, the options will be copied from "
"the breakpoint, otherwise only the options specified will be set "
"on the name.",
@@ -3130,7 +3132,7 @@ class CommandObjectBreakpointNameList : public CommandObjectParsed {
CommandObjectBreakpointNameList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "list",
"List either the names for a breakpoint or info "
- "about a given name. With no arguments, lists all "
+ "about a given name.\nWith no arguments, lists all "
"names",
"breakpoint name list <command-options>",
eCommandAllowsDummyTarget) {
@@ -3507,7 +3509,7 @@ class CommandObjectBreakpointWrite : public CommandObjectParsed {
CommandObjectBreakpointWrite(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "breakpoint write",
"Write the breakpoints listed to a file that can "
- "be read in with \"breakpoint read\". "
+ "be read in with \"breakpoint read\".\n"
"If given no arguments, writes all breakpoints.",
nullptr, eCommandAllowsDummyTarget) {
CommandObject::AddIDsArgumentData(eBreakpointArgs);
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 67cdc8e232781..da37ef18ae841 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -32,7 +32,7 @@ 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.\n"
"The commands added to the breakpoint replace any "
"commands previously added to it."
" If no breakpoint is specified, adds the "
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 8f006768ecc9a..cd4c9f7bc1335 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -2738,7 +2738,8 @@ class CommandObjectCommandsContainerAdd : public CommandObjectParsed {
CommandObjectCommandsContainerAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "command container add",
- "Add a container command to lldb. Adding to built-"
+ "Add a container command to lldb.\n"
+ "Adding to built-"
"in container commands is not allowed.",
"command container add [[path1]...] container-name") {
AddSimpleArgumentList(eArgTypeCommand, eArgRepeatPlus);
@@ -2951,7 +2952,7 @@ class CommandObjectCommandContainer : public CommandObjectMultiword {
CommandObjectCommandContainer(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "command container",
- "Commands for adding container commands to lldb. "
+ "Commands for adding container commands to lldb.\n"
"Container commands are containers for other commands. You can "
"add nested container commands by specifying a command path, "
"but you can't add commands into the built-in command hierarchy.",
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 4a6e8ab47af8f..82675859caa92 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -235,7 +235,7 @@ CommandObjectDisassemble::CommandObjectDisassemble(
CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "disassemble",
- "Disassemble specified instructions in the current target. "
+ "Disassemble specified instructions in the current target.\n"
"Defaults to the current function for the current thread and "
"stack frame.",
"disassemble [<cmd-options>]", eCommandRequiresTarget) {}
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 9b2a51cbabfcc..666279facc2a6 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -258,7 +258,7 @@ CommandObjectExpression::CommandObjectExpression(
CommandInterpreter &interpreter)
: CommandObjectRaw(interpreter, "expression",
"Evaluate an expression on the current "
- "thread. Displays any returned value "
+ "thread.\nDisplays any returned value "
"with LLDB's default formatting.",
"",
eCommandProcessMustBePaused | eCommandTryTargetAPILock |
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 5c79d758bafd7..79e948d7a1a0e 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -402,7 +402,8 @@ class CommandObjectFrameVariable : public CommandObjectParsed {
CommandObjectFrameVariable(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "frame variable",
- "Show variables for the current stack frame. Defaults to all "
+ "Show variables for the current stack frame.\n"
+ "Defaults to all "
"arguments and local variables in scope. Names of argument, "
"local, file static and file global variables can be specified.",
nullptr,
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index e51a85e9f0308..254e545ae7d61 100644
--- a/lldb/source/Commands/CommandObjectLog.cpp
+++ b/lldb/source/Commands/CommandObjectLog.cpp
@@ -285,7 +285,7 @@ class CommandObjectLogList : public CommandObjectParsed {
CommandObjectLogList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log list",
"List the log categories for one or more log "
- "channels. If none specified, lists them all.",
+ "channels.\nIf none specified, lists them all.",
nullptr) {
AddSimpleArgumentList(eArgTypeLogChannel, eArgRepeatStar);
}
diff --git a/lldb/source/Commands/CommandObjectMemoryTag.cpp b/lldb/source/Commands/CommandObjectMemoryTag.cpp
index 2f1f12f3fa9a6..096cc443f94f3 100644
--- a/lldb/source/Commands/CommandObjectMemoryTag.cpp
+++ b/lldb/source/Commands/CommandObjectMemoryTag.cpp
@@ -26,8 +26,8 @@ class CommandObjectMemoryTagRead : public CommandObjectParsed {
public:
CommandObjectMemoryTagRead(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "tag",
- "Read memory tags for the given range of memory."
- " Mismatched tags will be marked.",
+ "Read memory tags for the given range of memory.\n"
+ "Mismatched tags will be marked.",
nullptr,
eCommandRequiresTarget | eCommandRequiresProcess |
eCommandProcessMustBePaused) {
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 90a6b9a30cba0..41f22b07313e8 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -118,7 +118,8 @@ class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach {
CommandObjectProcessLaunch(CommandInterpreter &interpreter)
: CommandObjectProcessLaunchOrAttach(
interpreter, "process launch",
- "Launch the executable in the debugger. If no run-args are "
+ "Launch the executable in the debugger.\n"
+ "If no run-args are "
"specified, the arguments from target.run-args are used.",
nullptr, eCommandRequiresTarget, "restart"),
@@ -1587,7 +1588,8 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
CommandObjectProcessHandle(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "process handle",
"Manage LLDB handling of OS signals for the "
- "current target process. Defaults to showing "
+ "current target process.\n"
+ "Defaults to showing "
"current policy.",
nullptr, eCommandAllowsDummyTarget) {
SetHelpLong("\nIf no signals are specified but one or more actions are, "
@@ -1857,7 +1859,8 @@ class CommandObjectProcessTraceStop : public CommandObjectParsed {
public:
CommandObjectProcessTraceStop(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "process trace stop",
- "Stop tracing this process. This does not affect "
+ "Stop tracing this process.\n"
+ "This does not affect "
"traces started with the "
"\"thread trace start\" command.",
"process trace stop",
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index c86fd11d4d9e3..2c7740399eac0 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -42,7 +42,8 @@ class CommandObjectRegisterRead : public CommandObjectParsed {
: CommandObjectParsed(
interpreter, "register read",
"Dump the contents of one or more register values from the current "
- "frame. If no register is specified, dumps them all.",
+ "frame.\n"
+ "If no register is specified, dumps them all.",
nullptr,
eCommandRequiresFrame | eCommandRequiresRegContext |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
diff --git a/lldb/source/Commands/CommandObjectScripting.cpp b/lldb/source/Commands/CommandObjectScripting.cpp
index 21400a62d697f..8c6154307b2fe 100644
--- a/lldb/source/Commands/CommandObjectScripting.cpp
+++ b/lldb/source/Commands/CommandObjectScripting.cpp
@@ -32,7 +32,7 @@ class CommandObjectScriptingRun : public CommandObjectRaw {
: CommandObjectRaw(
interpreter, "scripting run",
"Invoke the script interpreter with provided code and display any "
- "results. Start the interactive interpreter if no code is "
+ "results.\nStart the interactive interpreter if no code is "
"supplied.",
"scripting run [--language <scripting-language> --] "
"[<script-code>]") {}
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 2c854cb05ce12..cf045944b75d7 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -248,7 +248,8 @@ class CommandObjectSettingsShow : public CommandObjectParsed {
CommandObjectSettingsShow(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "settings show",
"Show matching debugger settings and their current "
- "values. Defaults to showing all settings.") {
+ "values.\n"
+ "Defaults to showing all settings.") {
AddSimpleArgumentList(eArgTypeSettingVariableName, eArgRepeatOptional);
}
@@ -339,7 +340,7 @@ class CommandObjectSettingsWrite : public CommandObjectParsed {
interpreter, "settings export",
"Write matching debugger settings and their "
"current values to a file that can be read in with "
- "\"settings read\". Defaults to writing all settings.",
+ "\"settings read\".\nDefaults to writing all settings.",
nullptr) {
AddSimpleArgumentList(eArgTypeSettingVariableName, eArgRepeatOptional);
}
@@ -504,7 +505,7 @@ class CommandObjectSettingsList : public CommandObjectParsed {
public:
CommandObjectSettingsList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "settings list",
- "List and describe matching debugger settings. "
+ "List and describe matching debugger settings.\n"
"Defaults to all listing all settings.",
nullptr) {
CommandArgumentEntry arg;
@@ -1030,7 +1031,7 @@ class CommandObjectSettingsClear : public CommandObjectParsed {
CommandObjectSettingsClear(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "settings clear",
- "Clear a debugger setting array, dictionary, or string. "
+ "Clear a debugger setting array, dictionary, or string.\n"
"If '-a' option is specified, it clears all settings.", nullptr) {
AddSimpleArgumentList(eArgTypeSettingVariableName);
}
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index e03df0364805e..178041febe4c4 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -119,7 +119,7 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
: CommandObjectParsed(
interpreter, "source info",
"Display source line information for the current target "
- "process. Defaults to instruction pointer in current stack "
+ "process.\nDefaults to instruction pointer in current stack "
"frame.",
nullptr, eCommandRequiresTarget) {}
@@ -1221,7 +1221,8 @@ class CommandObjectSourceCacheDump : public CommandObjectParsed {
public:
CommandObjectSourceCacheDump(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "source cache dump",
- "Dump the state of the source code cache. Intended "
+ "Dump the state of the source code cache.\n"
+ "Intended "
"to be used for debugging LLDB itself.",
nullptr) {}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 97cfe98a00ccc..778e1dc981f8b 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4885,7 +4885,7 @@ class CommandObjectTargetStopHookAdd : public CommandObjectParsed,
CommandObjectTargetStopHookAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "target stop-hook add",
- "Add a hook to be executed when the target stops."
+ "Add a hook to be executed when the target stops.\n"
"The hook can either be a list of commands or an "
"appropriately defined Python class. You can also "
"add filters so the hook only runs a certain stop "
@@ -6053,7 +6053,8 @@ class CommandObjectTargetDumpTypesystem : public CommandObjectParsed {
CommandObjectTargetDumpTypesystem(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "target dump typesystem",
- "Dump the state of the target's internal type system. Intended to "
+ "Dump the state of the target's internal type system.\n"
+ "Intended to "
"be used for debugging LLDB itself.",
nullptr, eCommandRequiresTarget) {}
@@ -6079,7 +6080,7 @@ class CommandObjectTargetDumpSectionLoadList : public CommandObjectParsed {
CommandObjectTargetDumpSectionLoadList(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "target dump section-load-list",
- "Dump the state of the target's internal section load list. "
+ "Dump the state of the target's internal section load list.\n"
"Intended to be used for debugging LLDB itself.",
nullptr, eCommandRequiresTarget) {}
diff --git a/lldb/source/Commands/CommandObject...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/207381
More information about the lldb-commits
mailing list