diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
| commit | 6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch) | |
| tree | a1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /lldb/source/Commands/CommandObjectTarget.cpp | |
| parent | 77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff) | |
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 55 |
1 files changed, 23 insertions, 32 deletions
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: |
