summaryrefslogtreecommitdiff
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-01-27 22:06:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-01-27 22:06:42 +0000
commit6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch)
treea1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /lldb/source/Commands
parent77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff)
Vendor import of llvm-project main llvmorg-14-init-17616-g024a1fab5c35.vendor/llvm-project/llvmorg-14-init-17616-g024a1fab5c35
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandCompletions.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp56
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp9
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp34
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp3
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp74
-rw-r--r--lldb/source/Commands/CommandObjectHelp.cpp3
-rw-r--r--lldb/source/Commands/CommandObjectHelp.h2
-rw-r--r--lldb/source/Commands/CommandObjectLog.cpp5
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp47
-rw-r--r--lldb/source/Commands/CommandObjectMemoryTag.cpp28
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp35
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp36
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp45
-rw-r--r--lldb/source/Commands/CommandObjectRegexCommand.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectReproducer.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectScript.h2
-rw-r--r--lldb/source/Commands/CommandObjectSession.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp15
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp12
-rw-r--r--lldb/source/Commands/CommandObjectStats.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp55
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp43
-rw-r--r--lldb/source/Commands/CommandObjectTrace.cpp15
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp44
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp26
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp5
-rw-r--r--lldb/source/Commands/CommandOptionsProcessLaunch.h2
-rw-r--r--lldb/source/Commands/Options.td5
31 files changed, 273 insertions, 360 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp
index 42b0bac717bd..ae1ee1fdd30b 100644
--- a/lldb/source/Commands/CommandCompletions.cpp
+++ b/lldb/source/Commands/CommandCompletions.cpp
@@ -129,7 +129,7 @@ class SourceFileCompleter : public Completer {
public:
SourceFileCompleter(CommandInterpreter &interpreter,
CompletionRequest &request)
- : Completer(interpreter, request), m_matching_files() {
+ : Completer(interpreter, request) {
FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
m_file_name = partial_spec.GetFilename().GetCString();
m_dir_name = partial_spec.GetDirectory().GetCString();
@@ -600,7 +600,7 @@ void CommandCompletions::VariablePath(CommandInterpreter &interpreter,
void CommandCompletions::Registers(CommandInterpreter &interpreter,
CompletionRequest &request,
SearchFilter *searcher) {
- std::string reg_prefix = "";
+ std::string reg_prefix;
if (request.GetCursorArgumentPrefix().startswith("$"))
reg_prefix = "$";
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 3f88a2fa6378..c4e55fdb3b9c 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -49,7 +49,7 @@ static void AddBreakpointDescription(Stream *s, Breakpoint *bp,
class lldb_private::BreakpointOptionGroup : public OptionGroup {
public:
- BreakpointOptionGroup() : OptionGroup(), m_bp_opts(false) {}
+ BreakpointOptionGroup() : m_bp_opts(false) {}
~BreakpointOptionGroup() override = default;
@@ -179,7 +179,7 @@ public:
class BreakpointDummyOptionGroup : public OptionGroup {
public:
- BreakpointDummyOptionGroup() : OptionGroup() {}
+ BreakpointDummyOptionGroup() {}
~BreakpointDummyOptionGroup() override = default;
@@ -234,8 +234,7 @@ public:
interpreter, "breakpoint set",
"Sets a breakpoint or set of breakpoints in the executable.",
"breakpoint set <cmd-options>"),
- m_bp_opts(), m_python_class_options("scripted breakpoint", true, 'P'),
- m_options() {
+ m_python_class_options("scripted breakpoint", true, 'P') {
// We're picking up all the normal options, commands and disable.
m_all_options.Append(&m_python_class_options,
LLDB_OPT_SET_1 | LLDB_OPT_SET_2, LLDB_OPT_SET_11);
@@ -253,9 +252,7 @@ public:
class CommandOptions : public OptionGroup {
public:
- CommandOptions()
- : OptionGroup(), m_condition(), m_filenames(), m_func_names(),
- m_func_regexp(), m_source_text_regexp(), m_modules() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -809,8 +806,7 @@ public:
"created breakpoint. "
"With the exception of -e, -d and -i, passing an "
"empty argument clears the modification.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
@@ -1100,8 +1096,7 @@ public:
: CommandObjectParsed(
interpreter, "breakpoint list",
"List some or all breakpoints at configurable levels of detail.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
@@ -1123,7 +1118,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1246,8 +1241,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint clear",
"Delete or disable breakpoints matching the "
"specified source file and line.",
- "breakpoint clear <cmd-options>"),
- m_options() {}
+ "breakpoint clear <cmd-options>") {}
~CommandObjectBreakpointClear() override = default;
@@ -1255,7 +1249,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_filename() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1384,8 +1378,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint delete",
"Delete the specified breakpoint(s). If no "
"breakpoints are specified, delete them all.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
@@ -1408,7 +1401,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1565,8 +1558,7 @@ private:
class BreakpointNameOptionGroup : public OptionGroup {
public:
BreakpointNameOptionGroup()
- : OptionGroup(), m_breakpoint(LLDB_INVALID_BREAK_ID), m_use_dummy(false) {
- }
+ : m_breakpoint(LLDB_INVALID_BREAK_ID), m_use_dummy(false) {}
~BreakpointNameOptionGroup() override = default;
@@ -1626,7 +1618,7 @@ public:
class BreakpointAccessOptionGroup : public OptionGroup {
public:
- BreakpointAccessOptionGroup() : OptionGroup() {}
+ BreakpointAccessOptionGroup() {}
~BreakpointAccessOptionGroup() override = default;
@@ -1696,8 +1688,7 @@ public:
"the breakpoint, otherwise only the options specified will be set "
"on the name.",
"breakpoint name configure <command-options> "
- "<breakpoint-name-list>"),
- m_bp_opts(), m_option_group() {
+ "<breakpoint-name-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
@@ -1787,8 +1778,7 @@ public:
CommandObjectBreakpointNameAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "add", "Add a name to the breakpoints provided.",
- "breakpoint name add <command-options> <breakpoint-id-list>"),
- m_name_options(), m_option_group() {
+ "breakpoint name add <command-options> <breakpoint-id-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
@@ -1872,8 +1862,7 @@ public:
: CommandObjectParsed(
interpreter, "delete",
"Delete a name from the breakpoints provided.",
- "breakpoint name delete <command-options> <breakpoint-id-list>"),
- m_name_options(), m_option_group() {
+ "breakpoint name delete <command-options> <breakpoint-id-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
@@ -1956,8 +1945,7 @@ public:
"List either the names for a breakpoint or info "
"about a given name. With no arguments, lists all "
"names",
- "breakpoint name list <command-options>"),
- m_name_options(), m_option_group() {
+ "breakpoint name list <command-options>") {
m_option_group.Append(&m_name_options, LLDB_OPT_SET_3, LLDB_OPT_SET_ALL);
m_option_group.Finalize();
}
@@ -2063,8 +2051,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint read",
"Read and set the breakpoints previously saved to "
"a file with \"breakpoint write\". ",
- nullptr),
- m_options() {}
+ nullptr) {}
~CommandObjectBreakpointRead() override = default;
@@ -2072,7 +2059,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2245,8 +2232,7 @@ public:
"Write the breakpoints listed to a file that can "
"be read in with \"breakpoint read\". "
"If given no arguments, writes all breakpoints.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
@@ -2269,7 +2255,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 26d35c82f57d..637e8b8bd578 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -69,7 +69,7 @@ public:
nullptr),
IOHandlerDelegateMultiline("DONE",
IOHandlerDelegate::Completion::LLDBCommand),
- m_options(), m_func_options("breakpoint command", false, 'F') {
+ m_func_options("breakpoint command", false, 'F') {
SetHelpLong(
R"(
General information about entering breakpoint commands
@@ -281,7 +281,7 @@ are no syntax errors may indicate that a function was declared but never called.
class CommandOptions : public OptionGroup {
public:
- CommandOptions() : OptionGroup(), m_one_liner() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -479,8 +479,7 @@ public:
CommandObjectBreakpointCommandDelete(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "delete",
"Delete the set of commands from a breakpoint.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
@@ -502,7 +501,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 1ec54cf7eded..4b4932dd367b 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -38,8 +38,7 @@ public:
: CommandObjectParsed(
interpreter, "command source",
"Read and execute LLDB commands from the file <filename>.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg;
CommandArgumentData file_arg;
@@ -76,8 +75,8 @@ protected:
class CommandOptions : public Options {
public:
CommandOptions()
- : Options(), m_stop_on_error(true), m_silent_run(false),
- m_stop_on_continue(true), m_cmd_relative_to_command_file(false) {}
+ : m_stop_on_error(true), m_silent_run(false), m_stop_on_continue(true),
+ m_cmd_relative_to_command_file(false) {}
~CommandOptions() override = default;
@@ -207,7 +206,7 @@ class CommandObjectCommandsAlias : public CommandObjectRaw {
protected:
class CommandOptions : public OptionGroup {
public:
- CommandOptions() : OptionGroup(), m_help(), m_long_help() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -258,8 +257,7 @@ public:
CommandObjectCommandsAlias(CommandInterpreter &interpreter)
: CommandObjectRaw(
interpreter, "command alias",
- "Define a custom command in terms of an existing command."),
- m_option_group(), m_command_options() {
+ "Define a custom command in terms of an existing command.") {
m_option_group.Append(&m_command_options);
m_option_group.Finalize();
@@ -485,8 +483,9 @@ protected:
OptionArgVectorSP option_arg_vector_sp =
OptionArgVectorSP(new OptionArgVector);
- if (CommandObjectSP cmd_obj_sp =
- m_interpreter.GetCommandSPExact(cmd_obj.GetCommandName())) {
+ const bool include_aliases = true;
+ if (CommandObjectSP cmd_obj_sp = m_interpreter.GetCommandSPExact(
+ cmd_obj.GetCommandName(), include_aliases)) {
if (m_interpreter.AliasExists(alias_command) ||
m_interpreter.UserCommandExists(alias_command)) {
result.AppendWarningWithFormat(
@@ -792,8 +791,7 @@ public:
"regular expressions.",
"command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
IOHandlerDelegateMultiline("",
- IOHandlerDelegate::Completion::LLDBCommand),
- m_options() {
+ IOHandlerDelegate::Completion::LLDBCommand) {
SetHelpLong(
R"(
)"
@@ -1024,7 +1022,7 @@ private:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1238,8 +1236,7 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
public:
CommandObjectCommandsScriptImport(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "command script import",
- "Import a scripting module in LLDB.", nullptr),
- m_options() {
+ "Import a scripting module in LLDB.", nullptr) {
CommandArgumentEntry arg1;
CommandArgumentData cmd_arg;
@@ -1270,7 +1267,7 @@ public:
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1394,7 +1391,7 @@ public:
"must be a path to a user-added container "
"command, and the last element will be the new "
"command name."),
- IOHandlerDelegateMultiline("DONE"), m_options() {
+ IOHandlerDelegateMultiline("DONE") {
CommandArgumentEntry arg1;
CommandArgumentData cmd_arg;
@@ -1425,8 +1422,7 @@ public:
protected:
class CommandOptions : public Options {
public:
- CommandOptions()
- : Options(), m_class_name(), m_funct_name(), m_short_help() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1883,7 +1879,7 @@ public:
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_short_help(), m_long_help() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 02a16622c76b..e3c40ed73cf6 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -30,8 +30,7 @@ using namespace lldb_private;
#define LLDB_OPTIONS_disassemble
#include "CommandOptions.inc"
-CommandObjectDisassemble::CommandOptions::CommandOptions()
- : Options(), func_name(), plugin_name(), flavor_string(), arch() {
+CommandObjectDisassemble::CommandOptions::CommandOptions() {
OptionParsingStarting(nullptr);
}
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 9d13ccab6d3e..e1a289b219c3 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -24,7 +24,7 @@
using namespace lldb;
using namespace lldb_private;
-CommandObjectExpression::CommandOptions::CommandOptions() : OptionGroup() {}
+CommandObjectExpression::CommandOptions::CommandOptions() {}
CommandObjectExpression::CommandOptions::~CommandOptions() = default;
@@ -200,10 +200,10 @@ CommandObjectExpression::CommandObjectExpression(
"",
eCommandProcessMustBePaused | eCommandTryTargetAPILock),
IOHandlerDelegate(IOHandlerDelegate::Completion::Expression),
- m_option_group(), m_format_options(eFormatDefault),
+ m_format_options(eFormatDefault),
m_repl_option(LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false,
true),
- m_command_options(), m_expr_line_count(0), m_expr_lines() {
+ m_command_options(), m_expr_line_count(0) {
SetHelpLong(
R"(
Single and multi-line expressions:
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 2b9f5316409f..70881f2d0061 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -49,7 +49,7 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -110,8 +110,7 @@ public:
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {
+ eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
@@ -222,7 +221,7 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -267,8 +266,7 @@ public:
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {
+ eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
@@ -394,27 +392,26 @@ public:
interpreter, "frame variable",
"Show variables for the current stack frame. Defaults to all "
"arguments and local variables in scope. Names of argument, "
- "local, file static and file global variables can be specified. "
- "Children of aggregate variables can be specified such as "
- "'var->child.x'. The -> and [] operators in 'frame variable' do "
- "not invoke operator overloads if they exist, but directly access "
- "the specified element. If you want to trigger operator overloads "
- "use the expression command to print the variable instead."
- "\nIt is worth noting that except for overloaded "
- "operators, when printing local variables 'expr local_var' and "
- "'frame var local_var' produce the same "
- "results. However, 'frame variable' is more efficient, since it "
- "uses debug information and memory reads directly, rather than "
- "parsing and evaluating an expression, which may even involve "
- "JITing and running code in the target program.",
+ "local, file static and file global variables can be specified.",
nullptr,
eCommandRequiresFrame | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
eCommandRequiresProcess),
- m_option_group(),
m_option_variable(
true), // Include the frame specific options by passing "true"
- m_option_format(eFormatDefault), m_varobj_options() {
+ m_option_format(eFormatDefault) {
+ SetHelpLong(R"(
+Children of aggregate variables can be specified such as 'var->child.x'. In
+'frame variable', the operators -> and [] do not invoke operator overloads if
+they exist, but directly access the specified element. If you want to trigger
+operator overloads use the expression command to print the variable instead.
+
+It is worth noting that except for overloaded operators, when printing local
+variables 'expr local_var' and 'frame var local_var' produce the same results.
+However, 'frame variable' is more efficient, since it uses debug information and
+memory reads directly, rather than parsing and evaluating an expression, which
+may even involve JITing and running code in the target program.)");
+
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
@@ -558,18 +555,16 @@ protected:
}
}
} else if (num_matches == 0) {
- result.GetErrorStream().Printf("error: no variables matched "
- "the regular expression '%s'.\n",
- entry.c_str());
+ result.AppendErrorWithFormat(
+ "no variables matched the regular expression '%s'.",
+ entry.c_str());
}
} else {
if (llvm::Error err = regex.GetError())
- result.GetErrorStream().Printf(
- "error: %s\n", llvm::toString(std::move(err)).c_str());
+ result.AppendError(llvm::toString(std::move(err)));
else
- result.GetErrorStream().Printf(
- "error: unknown regex error when compiling '%s'\n",
- entry.c_str());
+ result.AppendErrorWithFormat(
+ "unknown regex error when compiling '%s'", entry.c_str());
}
} else // No regex, either exact variable names or variable
// expressions.
@@ -605,14 +600,13 @@ protected:
valobj_sp->GetParent() ? entry.c_str() : nullptr);
valobj_sp->Dump(output_stream, options);
} else {
- const char *error_cstr = error.AsCString(nullptr);
- if (error_cstr)
- result.GetErrorStream().Printf("error: %s\n", error_cstr);
+ if (auto error_cstr = error.AsCString(nullptr))
+ result.AppendError(error_cstr);
else
- result.GetErrorStream().Printf("error: unable to find any "
- "variable expression path that "
- "matches '%s'.\n",
- entry.c_str());
+ result.AppendErrorWithFormat(
+ "unable to find any variable expression path that matches "
+ "'%s'.",
+ entry.c_str());
}
}
}
@@ -680,7 +674,8 @@ protected:
}
}
}
- result.SetStatus(eReturnStatusSuccessFinishResult);
+ if (result.GetStatus() != eReturnStatusFailed)
+ result.SetStatus(eReturnStatusSuccessFinishResult);
}
if (m_option_variable.show_recognized_args) {
@@ -731,7 +726,7 @@ class CommandObjectFrameRecognizerAdd : public CommandObjectParsed {
private:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
@@ -800,8 +795,7 @@ protected:
public:
CommandObjectFrameRecognizerAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "frame recognizer add",
- "Add a new frame recognizer.", nullptr),
- m_options() {
+ "Add a new frame recognizer.", nullptr) {
SetHelpLong(R"(
Frame recognizers allow for retrieving information about special frames based on
ABI, arguments or other special properties of that frame, even without source
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index 8c24efaa08ee..a2f682049ae0 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -46,8 +46,7 @@ CommandObjectHelp::CommandObjectHelp(CommandInterpreter &interpreter)
"Show a list of all debugger "
"commands, or give details "
"about a specific command.",
- "help [<cmd-name>]"),
- m_options() {
+ "help [<cmd-name>]") {
CommandArgumentEntry arg;
CommandArgumentData command_arg;
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h
index c924dda7c6d4..71799ebb3121 100644
--- a/lldb/source/Commands/CommandObjectHelp.h
+++ b/lldb/source/Commands/CommandObjectHelp.h
@@ -32,7 +32,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index 05ffba27e65f..d432ab244805 100644
--- a/lldb/source/Commands/CommandObjectLog.cpp
+++ b/lldb/source/Commands/CommandObjectLog.cpp
@@ -45,8 +45,7 @@ public:
CommandObjectLogEnable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log enable",
"Enable logging for a single log channel.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData channel_arg;
@@ -76,7 +75,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), log_file() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 9df42f36fafd..1b44a1bd709a 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -23,6 +23,7 @@
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeList.h"
+#include "lldb/Target/ABI.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/MemoryHistory.h"
#include "lldb/Target/MemoryRegionInfo.h"
@@ -47,7 +48,7 @@ using namespace lldb_private;
class OptionGroupReadMemory : public OptionGroup {
public:
OptionGroupReadMemory()
- : m_num_per_line(1, 1), m_view_as_type(), m_offset(0, 0),
+ : m_num_per_line(1, 1), m_offset(0, 0),
m_language_for_type(eLanguageTypeUnknown) {}
~OptionGroupReadMemory() override = default;
@@ -90,6 +91,10 @@ public:
error = m_offset.SetValueFromString(option_value);
break;
+ case '\x01':
+ m_show_tags = true;
+ break;
+
default:
llvm_unreachable("Unimplemented option");
}
@@ -103,6 +108,7 @@ public:
m_force = false;
m_offset.Clear();
m_language_for_type.Clear();
+ m_show_tags = false;
}
Status FinalizeSettings(Target *target, OptionGroupFormat &format_options) {
@@ -276,6 +282,7 @@ public:
bool m_force;
OptionValueUInt64 m_offset;
OptionValueLanguage m_language_for_type;
+ bool m_show_tags = false;
};
// Read memory from the inferior process
@@ -286,12 +293,10 @@ public:
interpreter, "memory read",
"Read from the memory of the current target process.", nullptr,
eCommandRequiresTarget | eCommandProcessMustBePaused),
- m_option_group(), m_format_options(eFormatBytesWithASCII, 1, 8),
- m_memory_options(), m_outfile_options(), m_varobj_options(),
+ m_format_options(eFormatBytesWithASCII, 1, 8),
+
m_next_addr(LLDB_INVALID_ADDRESS), m_prev_byte_size(0),
- m_prev_format_options(eFormatBytesWithASCII, 1, 8),
- m_prev_memory_options(), m_prev_outfile_options(),
- m_prev_varobj_options() {
+ m_prev_format_options(eFormatBytesWithASCII, 1, 8) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData start_addr_arg;
@@ -590,9 +595,16 @@ protected:
return false;
}
+ ABISP abi = m_exe_ctx.GetProcessPtr()->GetABI();
+ if (abi)
+ addr = abi->FixDataAddress(addr);
+
if (argc == 2) {
lldb::addr_t end_addr = OptionArgParser::ToAddress(
&m_exe_ctx, command[1].ref(), LLDB_INVALID_ADDRESS, nullptr);
+ if (end_addr != LLDB_INVALID_ADDRESS && abi)
+ end_addr = abi->FixDataAddress(end_addr);
+
if (end_addr == LLDB_INVALID_ADDRESS) {
result.AppendError("invalid end address expression.");
result.AppendError(error.AsCString());
@@ -854,7 +866,7 @@ protected:
size_t bytes_dumped = DumpDataExtractor(
data, output_stream_p, 0, format, item_byte_size, item_count,
num_per_line / target->GetArchitecture().GetDataByteSize(), addr, 0, 0,
- exe_scope);
+ exe_scope, m_memory_options.m_show_tags);
m_next_addr = addr + bytes_dumped;
output_stream_p->EOL();
return true;
@@ -882,7 +894,7 @@ class CommandObjectMemoryFind : public CommandObjectParsed {
public:
class OptionGroupFindMemory : public OptionGroup {
public:
- OptionGroupFindMemory() : OptionGroup(), m_count(1), m_offset(0) {}
+ OptionGroupFindMemory() : m_count(1), m_offset(0) {}
~OptionGroupFindMemory() override = default;
@@ -936,8 +948,7 @@ public:
: CommandObjectParsed(
interpreter, "memory find",
"Find a value in the memory of the current target process.",
- nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched),
- m_option_group(), m_memory_options() {
+ nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData addr_arg;
@@ -1027,6 +1038,12 @@ protected:
return false;
}
+ ABISP abi = m_exe_ctx.GetProcessPtr()->GetABI();
+ if (abi) {
+ low_addr = abi->FixDataAddress(low_addr);
+ high_addr = abi->FixDataAddress(high_addr);
+ }
+
if (high_addr <= low_addr) {
result.AppendError(
"starting address must be smaller than ending address");
@@ -1170,7 +1187,7 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
public:
class OptionGroupWriteMemory : public OptionGroup {
public:
- OptionGroupWriteMemory() : OptionGroup() {}
+ OptionGroupWriteMemory() {}
~OptionGroupWriteMemory() override = default;
@@ -1222,16 +1239,14 @@ public:
interpreter, "memory write",
"Write to the memory of the current target process.", nullptr,
eCommandRequiresProcess | eCommandProcessMustBeLaunched),
- m_option_group(),
m_format_options(
eFormatBytes, 1, UINT64_MAX,
{std::make_tuple(
eArgTypeFormat,
"The format to use for each of the value to be written."),
- std::make_tuple(
- eArgTypeByteSize,
- "The size in bytes to write from input file or each value.")}),
- m_memory_options() {
+ std::make_tuple(eArgTypeByteSize,
+ "The size in bytes to write from input file or "
+ "each value.")}) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData addr_arg;
diff --git a/lldb/source/Commands/CommandObjectMemoryTag.cpp b/lldb/source/Commands/CommandObjectMemoryTag.cpp
index 840f81719d7d..d108cf58b18c 100644
--- a/lldb/source/Commands/CommandObjectMemoryTag.cpp
+++ b/lldb/source/Commands/CommandObjectMemoryTag.cpp
@@ -12,6 +12,7 @@
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionGroupFormat.h"
#include "lldb/Interpreter/OptionValueString.h"
+#include "lldb/Target/ABI.h"
#include "lldb/Target/Process.h"
using namespace lldb;
@@ -85,6 +86,17 @@ protected:
// If this fails the list of regions is cleared, so we don't need to read
// the return status here.
process->GetMemoryRegions(memory_regions);
+
+ lldb::addr_t logical_tag = tag_manager->GetLogicalTag(start_addr);
+
+ // The tag manager only removes tag bits. These addresses may include other
+ // non-address bits that must also be ignored.
+ ABISP abi = process->GetABI();
+ if (abi) {
+ start_addr = abi->FixDataAddress(start_addr);
+ end_addr = abi->FixDataAddress(end_addr);
+ }
+
llvm::Expected<MemoryTagManager::TagRange> tagged_range =
tag_manager->MakeTaggedRange(start_addr, end_addr, memory_regions);
@@ -101,7 +113,6 @@ protected:
return false;
}
- lldb::addr_t logical_tag = tag_manager->GetLogicalTag(start_addr);
result.AppendMessageWithFormatv("Logical tag: {0:x}", logical_tag);
result.AppendMessage("Allocation tags:");
@@ -127,7 +138,7 @@ class CommandObjectMemoryTagWrite : public CommandObjectParsed {
public:
class OptionGroupTagWrite : public OptionGroup {
public:
- OptionGroupTagWrite() : OptionGroup(), m_end_addr(LLDB_INVALID_ADDRESS) {}
+ OptionGroupTagWrite() : m_end_addr(LLDB_INVALID_ADDRESS) {}
~OptionGroupTagWrite() override = default;
@@ -166,8 +177,7 @@ public:
"contains the given address.",
nullptr,
eCommandRequiresTarget | eCommandRequiresProcess |
- eCommandProcessMustBePaused),
- m_option_group(), m_tag_write_options() {
+ eCommandProcessMustBePaused) {
// Address
m_arguments.push_back(
CommandArgumentEntry{CommandArgumentData(eArgTypeAddressOrExpression)});
@@ -231,6 +241,12 @@ protected:
// the return status here.
process->GetMemoryRegions(memory_regions);
+ // The tag manager only removes tag bits. These addresses may include other
+ // non-address bits that must also be ignored.
+ ABISP abi = process->GetABI();
+ if (abi)
+ start_addr = abi->FixDataAddress(start_addr);
+
// We have to assume start_addr is not granule aligned.
// So if we simply made a range:
// (start_addr, start_addr + (N * granule_size))
@@ -254,6 +270,10 @@ protected:
end_addr =
aligned_start_addr + (tags.size() * tag_manager->GetGranuleSize());
+ // Remove non-address bits that aren't memory tags
+ if (abi)
+ end_addr = abi->FixDataAddress(end_addr);
+
// Now we've aligned the start address so if we ask for another range
// using the number of tags N, we'll get back a range that is also N
// granules in size.
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index e800bcc12bd3..0629342748aa 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -302,31 +302,6 @@ const char *CommandObjectMultiword::GetRepeatCommand(Args &current_command_args,
return sub_command_object->GetRepeatCommand(current_command_args, index);
}
-void CommandObjectMultiword::AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) {
- CommandObject::CommandMap::const_iterator pos;
-
- for (pos = m_subcommand_dict.begin(); pos != m_subcommand_dict.end(); ++pos) {
- const char *command_name = pos->first.c_str();
- CommandObject *sub_cmd_obj = pos->second.get();
- StreamString complete_command_name;
-
- complete_command_name << prefix << " " << command_name;
-
- if (sub_cmd_obj->HelpTextContainsWord(search_word)) {
- commands_found.AppendString(complete_command_name.GetString());
- commands_help.AppendString(sub_cmd_obj->GetHelp());
- }
-
- if (sub_cmd_obj->IsMultiwordObject())
- sub_cmd_obj->AproposAllSubCommands(complete_command_name.GetString(),
- search_word, commands_found,
- commands_help);
- }
-}
-
CommandObjectProxy::CommandObjectProxy(CommandInterpreter &interpreter,
const char *name, const char *help,
const char *syntax, uint32_t flags)
@@ -409,16 +384,6 @@ CommandObject *CommandObjectProxy::GetSubcommandObject(llvm::StringRef sub_cmd,
return nullptr;
}
-void CommandObjectProxy::AproposAllSubCommands(llvm::StringRef prefix,
- llvm::StringRef search_word,
- StringList &commands_found,
- StringList &commands_help) {
- CommandObject *proxy_command = GetProxyCommandObject();
- if (proxy_command)
- return proxy_command->AproposAllSubCommands(prefix, search_word,
- commands_found, commands_help);
-}
-
bool CommandObjectProxy::LoadSubCommand(
llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_sp) {
CommandObject *proxy_command = GetProxyCommandObject();
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index 10dd87824911..4c18465c868a 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -145,7 +145,6 @@ public:
"Create a platform if needed and select it as the "
"current platform.",
"platform select <platform-name>", 0),
- m_option_group(),
m_platform_options(
false) // Don't include the "--platform" option by passing false
{
@@ -377,7 +376,6 @@ public:
"Set settings for the current target's platform, "
"or for a platform by name.",
"platform settings", 0),
- m_options(),
m_option_working_dir(LLDB_OPT_SET_1, false, "working-dir", 'w',
CommandCompletions::eRemoteDiskDirectoryCompletion,
eArgTypePath,
@@ -417,8 +415,7 @@ public:
CommandObjectPlatformMkDir(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform mkdir",
"Make a new directory on the remote end.", nullptr,
- 0),
- m_options() {}
+ 0) {}
~CommandObjectPlatformMkDir() override = default;
@@ -464,8 +461,7 @@ class CommandObjectPlatformFOpen : public CommandObjectParsed {
public:
CommandObjectPlatformFOpen(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform file open",
- "Open a file on the remote end.", nullptr, 0),
- m_options() {}
+ "Open a file on the remote end.", nullptr, 0) {}
~CommandObjectPlatformFOpen() override = default;
@@ -566,8 +562,7 @@ public:
CommandObjectPlatformFRead(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform file read",
"Read data from a file on the remote end.", nullptr,
- 0),
- m_options() {}
+ 0) {}
~CommandObjectPlatformFRead() override = default;
@@ -605,7 +600,7 @@ public:
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -660,8 +655,7 @@ public:
CommandObjectPlatformFWrite(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform file write",
"Write data to a file on the remote end.", nullptr,
- 0),
- m_options() {}
+ 0) {}
~CommandObjectPlatformFWrite() override = default;
@@ -698,7 +692,7 @@ public:
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1124,8 +1118,7 @@ public:
: CommandObjectParsed(interpreter, "platform process launch",
"Launch a new process on a remote platform.",
"platform process launch program",
- eCommandRequiresTarget | eCommandTryTargetAPILock),
- m_options(), m_all_options() {
+ eCommandRequiresTarget | eCommandTryTargetAPILock) {
m_all_options.Append(&m_options);
m_all_options.Finalize();
}
@@ -1217,8 +1210,7 @@ public:
: CommandObjectParsed(interpreter, "platform process list",
"List processes on a remote platform by name, pid, "
"or many other matching attributes.",
- "platform process list", 0),
- m_options() {}
+ "platform process list", 0) {}
~CommandObjectPlatformProcessList() override = default;
@@ -1324,7 +1316,7 @@ protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), match_info() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1560,7 +1552,7 @@ class CommandObjectPlatformProcessAttach : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -1622,8 +1614,7 @@ public:
CommandObjectPlatformProcessAttach(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform process attach",
"Attach to a process.",
- "platform process attach <cmd-options>"),
- m_options() {}
+ "platform process attach <cmd-options>") {}
~CommandObjectPlatformProcessAttach() override = default;
@@ -1689,7 +1680,7 @@ class CommandObjectPlatformShell : public CommandObjectRaw {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1747,8 +1738,7 @@ public:
CommandObjectPlatformShell(CommandInterpreter &interpreter)
: CommandObjectRaw(interpreter, "platform shell",
"Run a shell command on the current platform.",
- "platform shell <shell-command>", 0),
- m_options() {}
+ "platform shell <shell-command>", 0) {}
~CommandObjectPlatformShell() override = default;
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 5fd1718e8484..c73f0df0aaf2 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -110,9 +110,8 @@ public:
interpreter, "process launch",
"Launch the executable in the debugger.", nullptr,
eCommandRequiresTarget, "restart"),
- m_options(),
- m_class_options("scripted process", true, 'C', 'k', 'v', 0),
- m_all_options() {
+
+ m_class_options("scripted process", true, 'C', 'k', 'v', 0) {
m_all_options.Append(&m_options);
m_all_options.Append(&m_class_options, LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
LLDB_OPT_SET_ALL);
@@ -300,7 +299,7 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -364,8 +363,7 @@ public:
CommandObjectProcessAttach(CommandInterpreter &interpreter)
: CommandObjectProcessLaunchOrAttach(
interpreter, "process attach", "Attach to a process.",
- "process attach <cmd-options>", 0, "attach"),
- m_options() {}
+ "process attach <cmd-options>", 0, "attach") {}
~CommandObjectProcessAttach() override = default;
@@ -502,15 +500,14 @@ public:
"Continue execution of all threads in the current process.",
"process continue",
eCommandRequiresProcess | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
~CommandObjectProcessContinue() override = default;
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -651,7 +648,7 @@ class CommandObjectProcessDetach : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -698,8 +695,7 @@ public:
"Detach from the current target process.",
"process detach",
eCommandRequiresProcess | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched),
- m_options() {}
+ eCommandProcessMustBeLaunched) {}
~CommandObjectProcessDetach() override = default;
@@ -741,7 +737,7 @@ class CommandObjectProcessConnect : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -781,8 +777,7 @@ public:
CommandObjectProcessConnect(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "process connect",
"Connect to a remote debug service.",
- "process connect <remote-url>", 0),
- m_options() {}
+ "process connect <remote-url>", 0) {}
~CommandObjectProcessConnect() override = default;
@@ -863,7 +858,7 @@ class CommandObjectProcessLoad : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -907,8 +902,7 @@ public:
"process load <filename> [<filename> ...]",
eCommandRequiresProcess | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBePaused) {}
~CommandObjectProcessLoad() override = default;
@@ -1220,8 +1214,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions()
- : Options(), m_requested_save_core_style(eSaveCoreUnspecified) {}
+ CommandOptions() : m_requested_save_core_style(eSaveCoreUnspecified) {}
~CommandOptions() override = default;
@@ -1316,8 +1309,7 @@ public:
interpreter, "process status",
"Show status and stop location for the current target process.",
"process status",
- eCommandRequiresProcess | eCommandTryTargetAPILock),
- m_options() {}
+ eCommandRequiresProcess | eCommandTryTargetAPILock) {}
~CommandObjectProcessStatus() override = default;
@@ -1325,7 +1317,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1430,7 +1422,7 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -1477,8 +1469,7 @@ public:
"Manage LLDB handling of OS signals for the "
"current target process. Defaults to showing "
"current policy.",
- nullptr, eCommandRequiresTarget),
- m_options() {
+ nullptr, eCommandRequiresTarget) {
SetHelpLong("\nIf no signals are specified, update them all. If no update "
"option is specified, list the current values.");
CommandArgumentEntry arg;
@@ -1687,7 +1678,7 @@ class CommandObjectProcessTraceSave : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
diff --git a/lldb/source/Commands/CommandObjectRegexCommand.cpp b/lldb/source/Commands/CommandObjectRegexCommand.cpp
index 46295421834a..7ddc5c0c7e08 100644
--- a/lldb/source/Commands/CommandObjectRegexCommand.cpp
+++ b/lldb/source/Commands/CommandObjectRegexCommand.cpp
@@ -20,7 +20,7 @@ CommandObjectRegexCommand::CommandObjectRegexCommand(
bool is_removable)
: CommandObjectRaw(interpreter, name, help, syntax),
m_max_matches(max_matches), m_completion_type_mask(completion_type_mask),
- m_entries(), m_is_removable(is_removable) {}
+ m_is_removable(is_removable) {}
// Destructor
CommandObjectRegexCommand::~CommandObjectRegexCommand() = default;
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index 6fd71c90c327..933c243dedd5 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -43,8 +43,7 @@ public:
nullptr,
eCommandRequiresFrame | eCommandRequiresRegContext |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_option_group(), m_format_options(eFormatDefault),
- m_command_options() {
+ m_format_options(eFormatDefault) {
CommandArgumentEntry arg;
CommandArgumentData register_arg;
@@ -232,8 +231,7 @@ protected:
class CommandOptions : public OptionGroup {
public:
CommandOptions()
- : OptionGroup(),
- set_indexes(OptionValue::ConvertTypeToMask(OptionValue::eTypeUInt64)),
+ : set_indexes(OptionValue::ConvertTypeToMask(OptionValue::eTypeUInt64)),
dump_all_sets(false, false), // Initial and default values are false
alternate_name(false, false) {}
diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp
index 4db3e070df3c..7e0ea65e148e 100644
--- a/lldb/source/Commands/CommandObjectReproducer.cpp
+++ b/lldb/source/Commands/CommandObjectReproducer.cpp
@@ -227,7 +227,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -355,7 +355,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), file() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -602,7 +602,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), file() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectScript.h b/lldb/source/Commands/CommandObjectScript.h
index b9fee7124818..97fc05421bd0 100644
--- a/lldb/source/Commands/CommandObjectScript.h
+++ b/lldb/source/Commands/CommandObjectScript.h
@@ -21,7 +21,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override;
diff --git a/lldb/source/Commands/CommandObjectSession.cpp b/lldb/source/Commands/CommandObjectSession.cpp
index c2cdfa29a3f6..c11839a48de0 100644
--- a/lldb/source/Commands/CommandObjectSession.cpp
+++ b/lldb/source/Commands/CommandObjectSession.cpp
@@ -62,8 +62,7 @@ public:
"using \"!<INDEX>\". \"!-<OFFSET>\" will re-run "
"the command that is <OFFSET> commands from the end"
" of the list (counting the current command).",
- nullptr),
- m_options() {}
+ nullptr) {}
~CommandObjectSessionHistory() override = default;
@@ -73,8 +72,7 @@ protected:
class CommandOptions : public Options {
public:
CommandOptions()
- : Options(), m_start_idx(0), m_stop_idx(0), m_count(0), m_clear(false) {
- }
+ : m_start_idx(0), m_stop_idx(0), m_count(0), m_clear(false) {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 13ff27c78dea..391e728d9d8a 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -27,8 +27,7 @@ class CommandObjectSettingsSet : public CommandObjectRaw {
public:
CommandObjectSettingsSet(CommandInterpreter &interpreter)
: CommandObjectRaw(interpreter, "settings set",
- "Set the value of the specified debugger setting."),
- m_options() {
+ "Set the value of the specified debugger setting.") {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData var_name_arg;
@@ -87,7 +86,7 @@ insert-before or insert-after.");
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -304,8 +303,7 @@ public:
"Write matching debugger settings and their "
"current values to a file that can be read in with "
"\"settings read\". Defaults to writing all settings.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry arg1;
CommandArgumentData var_name_arg;
@@ -327,7 +325,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -417,8 +415,7 @@ public:
: CommandObjectParsed(
interpreter, "settings read",
"Read settings previously saved to a file with \"settings write\".",
- nullptr),
- m_options() {}
+ nullptr) {}
~CommandObjectSettingsRead() override = default;
@@ -426,7 +423,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index fb33f41b8ef9..6c6706f4a98b 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -36,7 +36,7 @@ using namespace lldb_private;
class CommandObjectSourceInfo : public CommandObjectParsed {
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -118,8 +118,7 @@ public:
"Display source line information for the current target "
"process. Defaults to instruction pointer in current stack "
"frame.",
- nullptr, eCommandRequiresTarget),
- m_options() {}
+ nullptr, eCommandRequiresTarget) {}
~CommandObjectSourceInfo() override = default;
@@ -624,7 +623,7 @@ protected:
class CommandObjectSourceList : public CommandObjectParsed {
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -723,8 +722,7 @@ public:
: CommandObjectParsed(interpreter, "source list",
"Display source code for the current target "
"process as specified by options.",
- nullptr, eCommandRequiresTarget),
- m_options() {}
+ nullptr, eCommandRequiresTarget) {}
~CommandObjectSourceList() override = default;
@@ -757,7 +755,7 @@ protected:
SourceInfo(ConstString name, const LineEntry &line_entry)
: function(name), line_entry(line_entry) {}
- SourceInfo() : function(), line_entry() {}
+ SourceInfo() {}
bool IsValid() const { return (bool)function && line_entry.IsValid(); }
diff --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp
index f32d559ca039..63aa36b39f4d 100644
--- a/lldb/source/Commands/CommandObjectStats.cpp
+++ b/lldb/source/Commands/CommandObjectStats.cpp
@@ -65,7 +65,7 @@ protected:
class CommandObjectStatsDump : public CommandObjectParsed {
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 2a42eb22938d..157065bde10e 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -216,7 +216,6 @@ public:
interpreter, "target create",
"Create a target using the argument as the main executable.",
nullptr),
- m_option_group(), m_arch_option(),
m_platform_options(true), // Include the --platform option.
m_core_file(LLDB_OPT_SET_1, false, "core", 'c', 0, eArgTypeFilename,
"Fullpath to a core file to use for this target."),
@@ -227,8 +226,7 @@ public:
"are not in the executable."),
m_remote_file(
LLDB_OPT_SET_1, false, "remote-file", 'r', 0, eArgTypeFilename,
- "Fullpath to the file on the remote host if debugging remotely."),
- m_add_dependents() {
+ "Fullpath to the file on the remote host if debugging remotely.") {
CommandArgumentEntry arg;
CommandArgumentData file_arg;
@@ -534,8 +532,8 @@ public:
: CommandObjectParsed(interpreter, "target delete",
"Delete one or more targets by target index.",
nullptr),
- m_option_group(), m_all_option(LLDB_OPT_SET_1, false, "all", 'a',
- "Delete all targets.", false, true),
+ m_all_option(LLDB_OPT_SET_1, false, "all", 'a', "Delete all targets.",
+ false, true),
m_cleanup_option(
LLDB_OPT_SET_1, false, "clean", 'c',
"Perform extra cleanup to minimize memory consumption after "
@@ -678,7 +676,6 @@ public:
"Read global variables for the current target, "
"before or while running a process.",
nullptr, eCommandRequiresTarget),
- m_option_group(),
m_option_variable(false), // Don't include frame options
m_option_format(eFormatDefault),
m_option_compile_units(LLDB_OPT_SET_1, false, "file", SHORT_OPTION_FILE,
@@ -691,8 +688,7 @@ public:
eArgTypeFilename,
"A basename or fullpath to a shared library to use in the search "
"for global "
- "variables. This option can be specified multiple times."),
- m_varobj_options() {
+ "variables. This option can be specified multiple times.") {
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
@@ -1605,7 +1601,6 @@ static size_t LookupTypeInModule(Target *target,
TypeList type_list;
if (module && name_cstr && name_cstr[0]) {
const uint32_t max_num_matches = UINT32_MAX;
- size_t num_matches = 0;
bool name_is_fully_qualified = false;
ConstString name(name_cstr);
@@ -1616,8 +1611,10 @@ static size_t LookupTypeInModule(Target *target,
if (type_list.Empty())
return 0;
+ const uint64_t num_matches = type_list.GetSize();
+
strm.Indent();
- strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches,
+ strm.Printf("%" PRIu64 " match%s found in ", num_matches,
num_matches > 1 ? "es" : "");
DumpFullpath(strm, &module->GetFileSpec(), 0);
strm.PutCString(":\n");
@@ -1927,8 +1924,7 @@ public:
: CommandObjectTargetModulesModuleAutoComplete(
interpreter, "target modules dump symtab",
"Dump the symbol table from one or more target modules.", nullptr,
- eCommandRequiresTarget),
- m_options() {}
+ eCommandRequiresTarget) {}
~CommandObjectTargetModulesDumpSymtab() override = default;
@@ -1936,7 +1932,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2353,7 +2349,7 @@ protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
@@ -2422,11 +2418,11 @@ public:
"Add a new module to the current target's modules.",
"target modules add [<module>]",
eCommandRequiresTarget),
- m_option_group(), m_symbol_file(LLDB_OPT_SET_1, false, "symfile", 's',
- 0, eArgTypeFilename,
- "Fullpath to a stand alone debug "
- "symbols file for when debug symbols "
- "are not in the executable.") {
+ m_symbol_file(LLDB_OPT_SET_1, false, "symfile", 's', 0,
+ eArgTypeFilename,
+ "Fullpath to a stand alone debug "
+ "symbols file for when debug symbols "
+ "are not in the executable.") {
m_option_group.Append(&m_uuid_option_group, LLDB_OPT_SET_ALL,
LLDB_OPT_SET_1);
m_option_group.Append(&m_symbol_file, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
@@ -2574,7 +2570,6 @@ public:
"target modules load [--file <module> --uuid <uuid>] <sect-name> "
"<address> [<sect-name> <address> ....]",
eCommandRequiresTarget),
- m_option_group(),
m_file_option(LLDB_OPT_SET_1, false, "file", 'f', 0, eArgTypeName,
"Fullpath or basename for module to load.", ""),
m_load_option(LLDB_OPT_SET_1, false, "load", 'l',
@@ -2842,7 +2837,7 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_format_array() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2885,8 +2880,7 @@ public:
: CommandObjectParsed(
interpreter, "target modules list",
"List current executable and dependent shared library images.",
- "target modules list [<cmd-options>]"),
- m_options() {}
+ "target modules list [<cmd-options>]") {}
~CommandObjectTargetModulesList() override = default;
@@ -3185,7 +3179,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_str() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -3242,8 +3236,7 @@ public:
interpreter, "target modules show-unwind",
"Show synthesized unwind instructions for a function.", nullptr,
eCommandRequiresTarget | eCommandRequiresProcess |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
~CommandObjectTargetModulesShowUnwind() override = default;
@@ -3532,7 +3525,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -3647,8 +3640,7 @@ public:
: CommandObjectParsed(interpreter, "target modules lookup",
"Look up information within executable and "
"dependent shared library images.",
- nullptr, eCommandRequiresTarget),
- m_options() {
+ nullptr, eCommandRequiresTarget) {
CommandArgumentEntry arg;
CommandArgumentData file_arg;
@@ -3954,7 +3946,6 @@ public:
"to specify a module.",
"target symbols add <cmd-options> [<symfile>]",
eCommandRequiresTarget),
- m_option_group(),
m_file_option(
LLDB_OPT_SET_1, false, "shlib", 's',
CommandCompletions::eModuleCompletion, eArgTypeShlibName,
@@ -4441,7 +4432,7 @@ class CommandObjectTargetStopHookAdd : public CommandObjectParsed,
public:
class CommandOptions : public OptionGroup {
public:
- CommandOptions() : OptionGroup(), m_line_end(UINT_MAX), m_one_liner() {}
+ CommandOptions() : m_line_end(UINT_MAX) {}
~CommandOptions() override = default;
@@ -4598,7 +4589,7 @@ public:
"target stop-hook add"),
IOHandlerDelegateMultiline("DONE",
IOHandlerDelegate::Completion::LLDBCommand),
- m_options(), m_python_class_options("scripted stop-hook", true, 'P') {
+ m_python_class_options("scripted stop-hook", true, 'P') {
SetHelpLong(
R"(
Command Based stop-hooks:
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 71e67f6ba208..137aaa81c61a 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -47,7 +47,7 @@ class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -119,8 +119,7 @@ public:
nullptr,
eCommandRequiresProcess | eCommandRequiresThread |
eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBePaused) {}
~CommandObjectThreadBacktrace() override = default;
@@ -203,7 +202,7 @@ static constexpr OptionEnumValues TriRunningModes() {
class ThreadStepScopeOptionGroup : public OptionGroup {
public:
- ThreadStepScopeOptionGroup() : OptionGroup() {
+ ThreadStepScopeOptionGroup() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -327,7 +326,7 @@ public:
eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
eCommandProcessMustBePaused),
- m_step_type(step_type), m_step_scope(step_scope), m_options(),
+ m_step_type(step_type), m_step_scope(step_scope),
m_class_options("scripted step") {
CommandArgumentEntry arg;
CommandArgumentData thread_id_arg;
@@ -780,7 +779,7 @@ public:
uint32_t m_thread_idx = LLDB_INVALID_THREAD_ID;
uint32_t m_frame_idx = LLDB_INVALID_FRAME_ID;
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -861,8 +860,7 @@ public:
" is provided, stepping will stop when the first one is hit.",
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_options() {
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData line_num_arg;
@@ -1186,7 +1184,7 @@ class CommandObjectThreadInfo : public CommandObjectIterateOverThreads {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -1231,8 +1229,7 @@ public:
"current thread.",
"thread info",
eCommandRequiresProcess | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_options() {
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
m_add_return = false;
}
@@ -1331,7 +1328,7 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -1386,8 +1383,7 @@ public:
"thread return",
eCommandRequiresFrame | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {
+ eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData expression_arg;
@@ -1496,7 +1492,7 @@ class CommandObjectThreadJump : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -1556,8 +1552,7 @@ public:
interpreter, "thread jump",
"Sets the program counter to a new address.", "thread jump",
eCommandRequiresFrame | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
~CommandObjectThreadJump() override = default;
@@ -1633,7 +1628,7 @@ class CommandObjectThreadPlanList : public CommandObjectIterateOverThreads {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {
+ CommandOptions() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
@@ -1695,8 +1690,7 @@ public:
nullptr,
eCommandRequiresProcess | eCommandRequiresThread |
eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options() {}
+ eCommandProcessMustBePaused) {}
~CommandObjectThreadPlanList() override = default;
@@ -2004,7 +1998,7 @@ class CommandObjectTraceDumpInstructions
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -2085,7 +2079,7 @@ public:
eCommandRequiresProcess | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
eCommandProcessMustBeTraced),
- m_options(), m_create_repeat_command_just_invoked(false) {}
+ m_create_repeat_command_just_invoked(false) {}
~CommandObjectTraceDumpInstructions() override = default;
@@ -2165,7 +2159,7 @@ class CommandObjectTraceDumpInfo : public CommandObjectIterateOverThreads {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -2213,8 +2207,7 @@ public:
nullptr,
eCommandRequiresProcess | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
- eCommandProcessMustBeTraced),
- m_options() {}
+ eCommandProcessMustBeTraced) {}
~CommandObjectTraceDumpInfo() override = default;
diff --git a/lldb/source/Commands/CommandObjectTrace.cpp b/lldb/source/Commands/CommandObjectTrace.cpp
index 62ee48ca0546..53f1b0a32e60 100644
--- a/lldb/source/Commands/CommandObjectTrace.cpp
+++ b/lldb/source/Commands/CommandObjectTrace.cpp
@@ -40,7 +40,7 @@ class CommandObjectTraceLoad : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -74,8 +74,7 @@ public:
CommandObjectTraceLoad(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "trace load",
"Load a processor trace session from a JSON file.",
- "trace load"),
- m_options() {}
+ "trace load") {}
~CommandObjectTraceLoad() override = default;
@@ -139,7 +138,7 @@ class CommandObjectTraceDump : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -173,8 +172,7 @@ public:
CommandObjectTraceDump(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "trace dump",
"Dump the loaded processor trace data.",
- "trace dump"),
- m_options() {}
+ "trace dump") {}
~CommandObjectTraceDump() override = default;
@@ -205,7 +203,7 @@ class CommandObjectTraceSchema : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() { OptionParsingStarting(nullptr); }
+ CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
@@ -240,8 +238,7 @@ public:
: CommandObjectParsed(interpreter, "trace schema",
"Show the schema of the given trace plugin.",
"trace schema <plug-in>. Use the plug-in name "
- "\"all\" to see all schemas.\n"),
- m_options() {}
+ "\"all\" to see all schemas.\n") {}
~CommandObjectTraceSchema() override = default;
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 0562b6be3cb5..f9e1d0f91fb7 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -69,7 +69,7 @@ public:
SynthAddOptions(bool sptr, bool sref, bool casc, bool regx, std::string catg)
: m_skip_pointers(sptr), m_skip_references(sref), m_cascade(casc),
- m_regex(regx), m_target_types(), m_category(catg) {}
+ m_regex(regx), m_category(catg) {}
typedef std::shared_ptr<SynthAddOptions> SharedPointer;
};
@@ -103,7 +103,7 @@ class CommandObjectTypeSummaryAdd : public CommandObjectParsed,
private:
class CommandOptions : public Options {
public:
- CommandOptions(CommandInterpreter &interpreter) : Options() {}
+ CommandOptions(CommandInterpreter &interpreter) {}
~CommandOptions() override = default;
@@ -286,7 +286,7 @@ class CommandObjectTypeSynthAdd : public CommandObjectParsed,
private:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -498,7 +498,7 @@ class CommandObjectTypeFormatAdd : public CommandObjectParsed {
private:
class CommandOptions : public OptionGroup {
public:
- CommandOptions() : OptionGroup() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -571,8 +571,7 @@ public:
CommandObjectTypeFormatAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "type format add",
"Add a new formatting style for a type.", nullptr),
- m_option_group(), m_format_options(eFormatInvalid),
- m_command_options() {
+ m_format_options(eFormatInvalid) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -708,7 +707,7 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
protected:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -760,7 +759,7 @@ public:
CommandObjectTypeFormatterDelete(CommandInterpreter &interpreter,
uint32_t formatter_kind_mask,
const char *name, const char *help)
- : CommandObjectParsed(interpreter, name, help, nullptr), m_options(),
+ : CommandObjectParsed(interpreter, name, help, nullptr),
m_formatter_kind_mask(formatter_kind_mask) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -873,7 +872,7 @@ class CommandObjectTypeFormatterClear : public CommandObjectParsed {
private:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -914,7 +913,7 @@ public:
CommandObjectTypeFormatterClear(CommandInterpreter &interpreter,
uint32_t formatter_kind_mask,
const char *name, const char *help)
- : CommandObjectParsed(interpreter, name, help, nullptr), m_options(),
+ : CommandObjectParsed(interpreter, name, help, nullptr),
m_formatter_kind_mask(formatter_kind_mask) {}
~CommandObjectTypeFormatterClear() override = default;
@@ -1713,7 +1712,7 @@ class CommandObjectTypeCategoryDefine : public CommandObjectParsed {
class CommandOptions : public Options {
public:
CommandOptions()
- : Options(), m_define_enabled(false, false),
+ : m_define_enabled(false, false),
m_cate_language(eLanguageTypeUnknown, eLanguageTypeUnknown) {}
~CommandOptions() override = default;
@@ -1760,8 +1759,7 @@ public:
CommandObjectTypeCategoryDefine(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "type category define",
"Define a new category as a source of formatters.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -1817,7 +1815,7 @@ protected:
class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -1863,8 +1861,7 @@ public:
CommandObjectTypeCategoryEnable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "type category enable",
"Enable a category as a source of formatters.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -1995,7 +1992,7 @@ protected:
class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2041,8 +2038,7 @@ public:
CommandObjectTypeCategoryDisable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "type category disable",
"Disable a category as a source of formatters.",
- nullptr),
- m_options() {
+ nullptr) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -2409,7 +2405,7 @@ private:
typedef std::vector<std::string> option_vector;
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2528,8 +2524,7 @@ private:
public:
CommandObjectTypeFilterAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "type filter add",
- "Add a new filter for a type.", nullptr),
- m_options() {
+ "Add a new filter for a type.", nullptr) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;
@@ -2666,7 +2661,7 @@ protected:
class CommandOptions : public OptionGroup {
public:
- CommandOptions() : OptionGroup() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -2716,8 +2711,7 @@ public:
"Lookup types and declarations in the current target, "
"following language-specific naming conventions.",
"type lookup <type-specifier>",
- eCommandRequiresTarget),
- m_option_group(), m_command_options() {
+ eCommandRequiresTarget) {
m_option_group.Append(&m_command_options);
m_option_group.Finalize();
}
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 9fbf036a19d1..9701553bdda9 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -149,8 +149,7 @@ public:
: CommandObjectParsed(
interpreter, "watchpoint list",
"List all watchpoints at configurable levels of detail.", nullptr,
- eCommandRequiresTarget),
- m_options() {
+ eCommandRequiresTarget) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
eArgTypeWatchpointIDRange);
@@ -165,7 +164,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -432,8 +431,7 @@ public:
: CommandObjectParsed(interpreter, "watchpoint delete",
"Delete the specified watchpoint(s). If no "
"watchpoints are specified, delete them all.",
- nullptr, eCommandRequiresTarget),
- m_options() {
+ nullptr, eCommandRequiresTarget) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
eArgTypeWatchpointIDRange);
@@ -456,7 +454,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -556,8 +554,7 @@ public:
: CommandObjectParsed(interpreter, "watchpoint ignore",
"Set ignore count on the specified watchpoint(s). "
"If no watchpoints are specified, set them all.",
- nullptr, eCommandRequiresTarget),
- m_options() {
+ nullptr, eCommandRequiresTarget) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
eArgTypeWatchpointIDRange);
@@ -580,7 +577,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -682,8 +679,7 @@ public:
"If no watchpoint is specified, act on the last created "
"watchpoint. "
"Passing an empty argument clears the modification.",
- nullptr, eCommandRequiresTarget),
- m_options() {
+ nullptr, eCommandRequiresTarget) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
eArgTypeWatchpointIDRange);
@@ -706,7 +702,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_condition() {}
+ CommandOptions() {}
~CommandOptions() override = default;
@@ -813,8 +809,7 @@ public:
"to free up resources.",
nullptr,
eCommandRequiresFrame | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_option_group(), m_option_watchpoint() {
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
SetHelpLong(
R"(
Examples:
@@ -1006,8 +1001,7 @@ public:
"to free up resources.",
"",
eCommandRequiresFrame | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
- m_option_group(), m_option_watchpoint() {
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
SetHelpLong(
R"(
Examples:
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 1f4e95366385..a429e568c61a 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -66,8 +66,7 @@ public:
"commands previously added to it.",
nullptr, eCommandRequiresTarget),
IOHandlerDelegateMultiline("DONE",
- IOHandlerDelegate::Completion::LLDBCommand),
- m_options() {
+ IOHandlerDelegate::Completion::LLDBCommand) {
SetHelpLong(
R"(
General information about entering watchpoint commands
@@ -314,7 +313,7 @@ are no syntax errors may indicate that a function was declared but never called.
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_one_liner(), m_function_name() {}
+ CommandOptions() {}
~CommandOptions() override = default;
diff --git a/lldb/source/Commands/CommandOptionsProcessLaunch.h b/lldb/source/Commands/CommandOptionsProcessLaunch.h
index d18a23245080..7ab7fabe1050 100644
--- a/lldb/source/Commands/CommandOptionsProcessLaunch.h
+++ b/lldb/source/Commands/CommandOptionsProcessLaunch.h
@@ -18,7 +18,7 @@ namespace lldb_private {
class CommandOptionsProcessLaunch : public lldb_private::OptionGroup {
public:
- CommandOptionsProcessLaunch() : lldb_private::OptionGroup() {
+ CommandOptionsProcessLaunch() {
// Keep default values of all options in one place: OptionParsingStarting
// ()
OptionParsingStarting(nullptr);
diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td
index 3e89eb0f6bda..269c937296d5 100644
--- a/lldb/source/Commands/Options.td
+++ b/lldb/source/Commands/Options.td
@@ -18,8 +18,7 @@ let Command = "help" in {
}
let Command = "settings set" in {
- def setset_global : Option<"global", "g">, Arg<"Filename">,
- Completion<"DiskFile">,
+ def setset_global : Option<"global", "g">,
Desc<"Apply the new value to the global default value.">;
def setset_force : Option<"force", "f">,
Desc<"Force an empty value to be accepted as the default.">;
@@ -489,6 +488,8 @@ let Command = "memory read" in {
"display data.">;
def memory_read_force : Option<"force", "r">, Groups<[1,2,3]>,
Desc<"Necessary if reading over target.max-memory-read-size bytes.">;
+ def memory_read_show_tags : Option<"show-tags", "\\x01">, Group<1>,
+ Desc<"Include memory tags in output (does not apply to binary output).">;
}
let Command = "memory find" in {