diff options
author | Jim Ingham <jingham@apple.com> | 2021-10-12 10:55:24 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2021-10-18 15:29:24 -0700 |
commit | c5011aed9c297d6ddd8ee4f77453b215aa27554a (patch) | |
tree | 00de36742573e43acf012de23eef1d9c43fd53e0 /lldb/source/Commands/CommandObjectHelp.cpp | |
parent | 41f814589f20eb82093107ec4d3875aa0ed74cd4 (diff) | |
download | llvm-c5011aed9c297d6ddd8ee4f77453b215aa27554a.zip llvm-c5011aed9c297d6ddd8ee4f77453b215aa27554a.tar.gz llvm-c5011aed9c297d6ddd8ee4f77453b215aa27554a.tar.bz2 |
Add a "command container" hierarchy to allow users to add container nodes.
The point is to allow users with a related set of script based commands
to organize their commands in a hierarchy in the command set, rather than
having to have only top-level commands.
Differential Revision: https://reviews.llvm.org/D110298
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index 4643ee3..8c24efa 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -51,8 +51,9 @@ CommandObjectHelp::CommandObjectHelp(CommandInterpreter &interpreter) CommandArgumentEntry arg; CommandArgumentData command_arg; - // Define the first (and only) variant of this arg. - command_arg.arg_type = eArgTypeCommandName; + // A list of command names forming a path to the command we want help on. + // No names is allowed - in which case we dump the top-level help. + command_arg.arg_type = eArgTypeCommand; command_arg.arg_repetition = eArgRepeatStar; // There is only one variant this argument could be; put it into the argument @@ -85,8 +86,10 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) { uint32_t cmd_types = CommandInterpreter::eCommandTypesBuiltin; if (m_options.m_show_aliases) cmd_types |= CommandInterpreter::eCommandTypesAliases; - if (m_options.m_show_user_defined) + if (m_options.m_show_user_defined) { cmd_types |= CommandInterpreter::eCommandTypesUserDef; + cmd_types |= CommandInterpreter::eCommandTypesUserMW; + } if (m_options.m_show_hidden) cmd_types |= CommandInterpreter::eCommandTypesHidden; |