[Lldb-commits] [PATCH] D142067: Remove the "help" subcommand - its undocumented, undiscoverable and doesn't work....
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 18 17:56:45 PST 2023
jingham created this revision.
jingham added reviewers: JDevlieghere, jasonmolenda.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
For some reason (lost in the mists of time) CommandObjectMultiword will check to see if you've passed it an argument with the text value "help" and if it sees that, it will print help.
That's not how the lldb help system works, and this is nowhere documented. It's not terribly discoverable, and doesn't behave like the rest of the lldb command system - doesn't auto-complete, doesn't do shortest unique match, etc... It also doesn't work for anything but the first level in the hierarchy:
(lldb) break help
Commands for operating on breakpoints (see 'help b' for shorthand.)
Syntax: breakpoint <subcommand> [<command-options>]
...
But:
(lldb) break set help
error: invalid combination of options for the given command
It is also confusing if you happen across it because then you think that's the way the help system works which it isn't.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142067
Files:
lldb/source/Commands/CommandObjectMultiword.cpp
Index: lldb/source/Commands/CommandObjectMultiword.cpp
===================================================================
--- lldb/source/Commands/CommandObjectMultiword.cpp
+++ lldb/source/Commands/CommandObjectMultiword.cpp
@@ -174,11 +174,6 @@
return result.Succeeded();
}
- if (sub_command.equals_insensitive("help")) {
- this->CommandObject::GenerateHelpText(result);
- return result.Succeeded();
- }
-
if (m_subcommand_dict.empty()) {
result.AppendErrorWithFormat("'%s' does not have any subcommands.\n",
GetCommandName().str().c_str());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142067.490340.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230119/1efd2f37/attachment.bin>
More information about the lldb-commits
mailing list