From b1c73532ee8997fe5dfbeb7d223027bdf99758a0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 9 Dec 2023 14:28:42 +0100 Subject: Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1. --- lldb/source/Commands/CommandObjectRegister.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lldb/source/Commands/CommandObjectRegister.cpp') diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index a0e88f6ab4ba..a4d53e5c8dd5 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -161,7 +161,7 @@ public: } protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { Stream &strm = result.GetOutputStream(); RegisterContext *reg_ctx = m_exe_ctx.GetRegisterContext(); @@ -234,7 +234,6 @@ protected: } } } - return result.Succeeded(); } class CommandOptions : public OptionGroup { @@ -348,7 +347,7 @@ public: } protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { DataExtractor reg_data; RegisterContext *reg_ctx = m_exe_ctx.GetRegisterContext(); @@ -378,7 +377,7 @@ protected: // has been written. m_exe_ctx.GetThreadRef().Flush(); result.SetStatus(eReturnStatusSuccessFinishNoResult); - return true; + return; } } if (error.AsCString()) { @@ -396,7 +395,6 @@ protected: reg_name.str().c_str()); } } - return result.Succeeded(); } }; @@ -406,8 +404,9 @@ public: CommandObjectRegisterInfo(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "register info", "View information about a register.", nullptr, - eCommandRequiresRegContext | - eCommandProcessMustBeLaunched) { + eCommandRequiresFrame | eCommandRequiresRegContext | + eCommandProcessMustBeLaunched | + eCommandProcessMustBePaused) { SetHelpLong(R"( Name The name lldb uses for the register, optionally with an alias. Size The size of the register in bytes and again in bits. @@ -446,10 +445,10 @@ different for the same register when connected to different debug servers.)"); } protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { if (command.GetArgumentCount() != 1) { result.AppendError("register info takes exactly 1 argument: "); - return result.Succeeded(); + return; } llvm::StringRef reg_name = command[0].ref(); @@ -463,8 +462,6 @@ protected: } else result.AppendErrorWithFormat("No register found with name '%s'.\n", reg_name.str().c_str()); - - return result.Succeeded(); } }; -- cgit v1.3