diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -2219,7 +2219,10 @@ nullptr, eCommandRequiresProcess | eCommandRequiresThread | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched | - eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {} + eCommandProcessMustBePaused | eCommandProcessMustBeTraced) { + CommandArgumentData thread_arg{eArgTypeThreadIndex, eArgRepeatOptional}; + m_arguments.push_back({thread_arg}); + } ~CommandObjectTraceDumpInstructions() override = default; diff --git a/lldb/source/Commands/CommandObjectThreadUtil.h b/lldb/source/Commands/CommandObjectThreadUtil.h --- a/lldb/source/Commands/CommandObjectThreadUtil.h +++ b/lldb/source/Commands/CommandObjectThreadUtil.h @@ -80,7 +80,9 @@ /// an action on multiple threads at once instead of iterating over each thread. class CommandObjectMultipleThreads : public CommandObjectParsed { public: - using CommandObjectParsed::CommandObjectParsed; + CommandObjectMultipleThreads(CommandInterpreter &interpreter, + const char *name, const char *help, + const char *syntax, uint32_t flags); bool DoExecute(Args &command, CommandReturnObject &result) override; diff --git a/lldb/source/Commands/CommandObjectThreadUtil.cpp b/lldb/source/Commands/CommandObjectThreadUtil.cpp --- a/lldb/source/Commands/CommandObjectThreadUtil.cpp +++ b/lldb/source/Commands/CommandObjectThreadUtil.cpp @@ -25,6 +25,15 @@ m_arguments.push_back({thread_arg}); } +CommandObjectMultipleThreads::CommandObjectMultipleThreads( + CommandInterpreter &interpreter, const char *name, const char *help, + const char *syntax, uint32_t flags) + : CommandObjectParsed(interpreter, name, help, syntax, flags) { + // These commands all take thread ID's as arguments. + CommandArgumentData thread_arg{eArgTypeThreadIndex, eArgRepeatStar}; + m_arguments.push_back({thread_arg}); +} + bool CommandObjectIterateOverThreads::DoExecute(Args &command, CommandReturnObject &result) { result.SetStatus(m_success_return);