Skip to content

Commit f21cfd5

Browse files
authored
Merge pull request #5683 from jimingham/modules-list-args
Modules list args
2 parents 71bf37a + 5e4dd88 commit f21cfd5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lldb/source/Commands/CommandObjectTarget.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include "lldb/Utility/LLDBLog.h"
5353
#include "lldb/Utility/State.h"
5454
#include "lldb/Utility/Timer.h"
55+
#include "lldb/lldb-enumerations.h"
5556
#include "lldb/lldb-private-enumerations.h"
5657

5758
#include "clang/CodeGen/ObjectFilePCHContainerOperations.h"
@@ -2945,8 +2946,10 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
29452946
CommandObjectTargetModulesList(CommandInterpreter &interpreter)
29462947
: CommandObjectParsed(
29472948
interpreter, "target modules list",
2948-
"List current executable and dependent shared library images.",
2949-
"target modules list [<cmd-options>]") {}
2949+
"List current executable and dependent shared library images.") {
2950+
CommandArgumentData module_arg{eArgTypeShlibName, eArgRepeatStar};
2951+
m_arguments.push_back({module_arg});
2952+
}
29502953

29512954
~CommandObjectTargetModulesList() override = default;
29522955

lldb/test/API/commands/help/TestHelp.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ def test_help_image_du_line_should_work(self):
103103
self.expect("help image du line", substrs=[
104104
'Dump the line table for one or more compilation units'])
105105

106+
@no_debug_info_test
107+
def test_help_image_list_shows_positional_args(self):
108+
"""Command 'help image list' should describe positional args."""
109+
# 'image' is an alias for 'target modules'.
110+
self.expect("help image list", substrs=[
111+
'<shlib-name> [...]'])
112+
106113
@no_debug_info_test
107114
def test_help_target_variable_syntax(self):
108115
"""Command 'help target variable' should display <variable-name> ..."""

0 commit comments

Comments
 (0)