Skip to content

Modules list args #5683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lldb/source/Commands/CommandObjectTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Timer.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-private-enumerations.h"

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

~CommandObjectTargetModulesList() override = default;

Expand Down
7 changes: 7 additions & 0 deletions lldb/test/API/commands/help/TestHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ def test_help_image_du_line_should_work(self):
self.expect("help image du line", substrs=[
'Dump the line table for one or more compilation units'])

@no_debug_info_test
def test_help_image_list_shows_positional_args(self):
"""Command 'help image list' should describe positional args."""
# 'image' is an alias for 'target modules'.
self.expect("help image list", substrs=[
'<shlib-name> [...]'])

@no_debug_info_test
def test_help_target_variable_syntax(self):
"""Command 'help target variable' should display <variable-name> ..."""
Expand Down