From 6564ca188a122c79c36ad7e4b3d362fb22fbd0b5 Mon Sep 17 00:00:00 2001 From: Walter Erquinigo Date: Tue, 28 Jun 2022 17:38:17 -0700 Subject: [trace] Fix errors when handling command arguments https://reviews.llvm.org/D128453 recently added some safety checks for command arguments. Unfortunately, some few commands started failing due to that, and this diff fixes it. But fortunately, the fix is trivial, which is simply declaring the argument that these commands will receive. Differential Revision: https://reviews.llvm.org/D128775 --- lldb/source/Commands/CommandObjectThread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectThread.cpp') diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 65512a05..7dd89e6 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -2219,7 +2219,10 @@ public: nullptr, eCommandRequiresProcess | eCommandRequiresThread | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched | - eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {} + eCommandProcessMustBePaused | eCommandProcessMustBeTraced) { + CommandArgumentData thread_arg{eArgTypeThreadIndex, eArgRepeatOptional}; + m_arguments.push_back({thread_arg}); + } ~CommandObjectTraceDumpInstructions() override = default; -- cgit v1.1