diff options
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 56 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 17 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectDisassemble.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectDisassemble.h | 20 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectPlatform.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectSettings.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 38 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 12 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectType.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpoint.cpp | 20 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpointCommand.cpp | 13 |
15 files changed, 93 insertions, 126 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 0844c56..724eacd 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -242,15 +242,8 @@ public: class CommandOptions : public OptionGroup { public: CommandOptions() - : OptionGroup(), m_condition(), m_filenames(), m_line_num(0), - m_column(0), m_func_names(), - m_func_name_type_mask(eFunctionNameTypeNone), m_func_regexp(), - m_source_text_regexp(), m_modules(), m_load_addr(), m_catch_bp(false), - m_throw_bp(true), m_hardware(false), - m_exception_language(eLanguageTypeUnknown), - m_language(lldb::eLanguageTypeUnknown), - m_skip_prologue(eLazyBoolCalculate), m_all_files(false), - m_move_to_nearest_code(eLazyBoolCalculate) {} + : OptionGroup(), m_condition(), m_filenames(), m_func_names(), + m_func_regexp(), m_source_text_regexp(), m_modules() {} ~CommandOptions() override = default; @@ -500,25 +493,25 @@ public: std::string m_condition; FileSpecList m_filenames; - uint32_t m_line_num; - uint32_t m_column; + uint32_t m_line_num = 0; + uint32_t m_column = 0; std::vector<std::string> m_func_names; std::vector<std::string> m_breakpoint_names; - lldb::FunctionNameType m_func_name_type_mask; + lldb::FunctionNameType m_func_name_type_mask = eFunctionNameTypeNone; std::string m_func_regexp; std::string m_source_text_regexp; FileSpecList m_modules; - lldb::addr_t m_load_addr; + lldb::addr_t m_load_addr = 0; lldb::addr_t m_offset_addr; - bool m_catch_bp; - bool m_throw_bp; - bool m_hardware; // Request to use hardware breakpoints - lldb::LanguageType m_exception_language; - lldb::LanguageType m_language; - LazyBool m_skip_prologue; - bool m_all_files; + bool m_catch_bp = false; + bool m_throw_bp = true; + bool m_hardware = false; // Request to use hardware breakpoints + lldb::LanguageType m_exception_language = eLanguageTypeUnknown; + lldb::LanguageType m_language = lldb::eLanguageTypeUnknown; + LazyBool m_skip_prologue = eLazyBoolCalculate; + bool m_all_files = false; Args m_exception_extra_args; - LazyBool m_move_to_nearest_code; + LazyBool m_move_to_nearest_code = eLazyBoolCalculate; std::unordered_set<std::string> m_source_regex_func_names; std::string m_current_key; }; @@ -1133,9 +1126,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() - : Options(), m_level(lldb::eDescriptionLevelBrief), m_use_dummy(false) { - } + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -1179,10 +1170,10 @@ public: // Instance variables to hold the values for command options. - lldb::DescriptionLevel m_level; + lldb::DescriptionLevel m_level = lldb::eDescriptionLevelBrief; bool m_internal; - bool m_use_dummy; + bool m_use_dummy = false; }; protected: @@ -1268,7 +1259,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_filename(), m_line_num(0) {} + CommandOptions() : Options(), m_filename() {} ~CommandOptions() override = default; @@ -1305,7 +1296,7 @@ public: // Instance variables to hold the values for command options. std::string m_filename; - uint32_t m_line_num; + uint32_t m_line_num = 0; }; protected: @@ -1423,8 +1414,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_use_dummy(false), m_force(false), - m_delete_disabled(false) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -1464,9 +1454,9 @@ public: } // Instance variables to hold the values for command options. - bool m_use_dummy; - bool m_force; - bool m_delete_disabled; + bool m_use_dummy = false; + bool m_force = false; + bool m_delete_disabled = false; }; protected: diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 127cde0..81abc1b 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -283,10 +283,7 @@ are no syntax errors may indicate that a function was declared but never called. class CommandOptions : public OptionGroup { public: - CommandOptions() - : OptionGroup(), m_use_commands(false), m_use_script_language(false), - m_script_language(eScriptLanguageNone), m_use_one_liner(false), - m_one_liner() {} + CommandOptions() : OptionGroup(), m_one_liner() {} ~CommandOptions() override = default; @@ -356,12 +353,12 @@ are no syntax errors may indicate that a function was declared but never called. // Instance variables to hold the values for command options. - bool m_use_commands; - bool m_use_script_language; - lldb::ScriptLanguage m_script_language; + bool m_use_commands = false; + bool m_use_script_language = false; + lldb::ScriptLanguage m_script_language = eScriptLanguageNone; // Instance variables to hold the values for one_liner options. - bool m_use_one_liner; + bool m_use_one_liner = false; std::string m_one_liner; bool m_stop_on_error; bool m_use_dummy; @@ -510,7 +507,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_use_dummy(false) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -540,7 +537,7 @@ public: } // Instance variables to hold the values for command options. - bool m_use_dummy; + bool m_use_dummy = false; }; protected: diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 74b16a6..94e670a 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -1387,8 +1387,7 @@ protected: class CommandOptions : public Options { public: CommandOptions() - : Options(), m_class_name(), m_funct_name(), m_short_help(), - m_synchronicity(eScriptedCommandSynchronicitySynchronous) {} + : Options(), m_class_name(), m_funct_name(), m_short_help() {} ~CommandOptions() override = default; @@ -1442,7 +1441,8 @@ protected: std::string m_class_name; std::string m_funct_name; std::string m_short_help; - ScriptedCommandSynchronicity m_synchronicity; + ScriptedCommandSynchronicity m_synchronicity = + eScriptedCommandSynchronicitySynchronous; }; void IOHandlerActivated(IOHandler &io_handler, bool interactive) override { diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp index 8d2b13a..a6d5ab6 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -31,10 +31,7 @@ using namespace lldb_private; #include "CommandOptions.inc" CommandObjectDisassemble::CommandOptions::CommandOptions() - : Options(), num_lines_context(0), num_instructions(0), func_name(), - current_function(false), start_addr(), end_addr(), at_pc(false), - frame_line(false), plugin_name(), flavor_string(), arch(), - some_location_specified(false), symbol_containing_addr() { + : Options(), func_name(), plugin_name(), flavor_string(), arch() { OptionParsingStarting(nullptr); } diff --git a/lldb/source/Commands/CommandObjectDisassemble.h b/lldb/source/Commands/CommandObjectDisassemble.h index 340bf64..a4b3df8 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.h +++ b/lldb/source/Commands/CommandObjectDisassemble.h @@ -46,22 +46,22 @@ public: bool show_mixed; // Show mixed source/assembly bool show_bytes; - uint32_t num_lines_context; - uint32_t num_instructions; + uint32_t num_lines_context = 0; + uint32_t num_instructions = 0; bool raw; std::string func_name; - bool current_function; - lldb::addr_t start_addr; - lldb::addr_t end_addr; - bool at_pc; - bool frame_line; + bool current_function = false; + lldb::addr_t start_addr = 0; + lldb::addr_t end_addr = 0; + bool at_pc = false; + bool frame_line = false; std::string plugin_name; std::string flavor_string; ArchSpec arch; - bool some_location_specified; // If no location was specified, we'll select - // "at_pc". This should be set + bool some_location_specified = false; // If no location was specified, we'll + // select "at_pc". This should be set // in SetOptionValue if anything the selects a location is set. - lldb::addr_t symbol_containing_addr; + lldb::addr_t symbol_containing_addr = 0; bool force = false; }; diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 4016b07..288ffdb 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -76,7 +76,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), log_file(), log_options(0) {} + CommandOptions() : Options(), log_file() {} ~CommandOptions() override = default; @@ -136,7 +136,7 @@ public: // Instance variables to hold the values for command options. FileSpec log_file; - uint32_t log_options; + uint32_t log_options = 0; }; void diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 19c13c0..e6decf1 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -46,8 +46,8 @@ using namespace lldb_private; class OptionGroupReadMemory : public OptionGroup { public: OptionGroupReadMemory() - : m_num_per_line(1, 1), m_output_as_binary(false), m_view_as_type(), - m_offset(0, 0), m_language_for_type(eLanguageTypeUnknown) {} + : m_num_per_line(1, 1), m_view_as_type(), m_offset(0, 0), + m_language_for_type(eLanguageTypeUnknown) {} ~OptionGroupReadMemory() override = default; @@ -270,7 +270,7 @@ public: } OptionValueUInt64 m_num_per_line; - bool m_output_as_binary; + bool m_output_as_binary = false; OptionValueString m_view_as_type; bool m_force; OptionValueUInt64 m_offset; diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index d0c58ac..b95b1c3 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -1215,8 +1215,7 @@ protected: class CommandOptions : public Options { public: - CommandOptions() - : Options(), match_info(), show_args(false), verbose(false) {} + CommandOptions() : Options(), match_info() {} ~CommandOptions() override = default; @@ -1351,8 +1350,8 @@ protected: // Instance variables to hold the values for command options. ProcessInstanceInfoMatch match_info; - bool show_args; - bool verbose; + bool show_args = false; + bool verbose = false; }; CommandOptions m_options; diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 3e45b71..031b715 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -1250,7 +1250,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_verbose(false) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -1278,7 +1278,7 @@ public: } // Instance variables to hold the values for command options. - bool m_verbose; + bool m_verbose = false; }; protected: diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index d869377..82335f4 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -87,7 +87,7 @@ insert-before or insert-after."); class CommandOptions : public Options { public: - CommandOptions() : Options(), m_global(false) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -120,7 +120,7 @@ insert-before or insert-after."); } // Instance variables to hold the values for command options. - bool m_global; + bool m_global = false; bool m_force; }; diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index bc038e3..1df2bca 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -1969,7 +1969,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_sort_order(eSortOrderNone) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -2005,7 +2005,7 @@ public: return llvm::makeArrayRef(g_target_modules_dump_symtab_options); } - SortOrder m_sort_order; + SortOrder m_sort_order = eSortOrderNone; OptionValueBoolean m_prefer_mangled = {false, false}; }; @@ -2902,9 +2902,7 @@ class CommandObjectTargetModulesList : public CommandObjectParsed { public: class CommandOptions : public Options { public: - CommandOptions() - : Options(), m_format_array(), m_use_global_module_list(false), - m_module_addr(LLDB_INVALID_ADDRESS) {} + CommandOptions() : Options(), m_format_array() {} ~CommandOptions() override = default; @@ -2939,8 +2937,8 @@ public: // Instance variables to hold the values for command options. typedef std::vector<std::pair<char, uint32_t>> FormatWidthCollection; FormatWidthCollection m_format_array; - bool m_use_global_module_list; - lldb::addr_t m_module_addr; + bool m_use_global_module_list = false; + lldb::addr_t m_module_addr = LLDB_INVALID_ADDRESS; }; CommandObjectTargetModulesList(CommandInterpreter &interpreter) @@ -3253,9 +3251,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() - : Options(), m_type(eLookupTypeInvalid), m_str(), - m_addr(LLDB_INVALID_ADDRESS) {} + CommandOptions() : Options(), m_str() {} ~CommandOptions() override = default; @@ -3301,9 +3297,10 @@ public: // Instance variables to hold the values for command options. - int m_type; // Should be a eLookupTypeXXX enum after parsing options + int m_type = eLookupTypeInvalid; // Should be a eLookupTypeXXX enum after + // parsing options std::string m_str; // Holds name lookup - lldb::addr_t m_addr; // Holds the address to lookup + lldb::addr_t m_addr = LLDB_INVALID_ADDRESS; // Holds the address to lookup }; CommandObjectTargetModulesShowUnwind(CommandInterpreter &interpreter) @@ -4424,11 +4421,7 @@ class CommandObjectTargetStopHookAdd : public CommandObjectParsed, public: class CommandOptions : public OptionGroup { public: - CommandOptions() - : OptionGroup(), m_line_start(0), m_line_end(UINT_MAX), - m_func_name_type_mask(eFunctionNameTypeAuto), - m_sym_ctx_specified(false), m_thread_specified(false), - m_use_one_liner(false), m_one_liner() {} + CommandOptions() : OptionGroup(), m_line_end(UINT_MAX), m_one_liner() {} ~CommandOptions() override = default; @@ -4555,20 +4548,21 @@ public: std::string m_class_name; std::string m_function_name; - uint32_t m_line_start; + uint32_t m_line_start = 0; uint32_t m_line_end; std::string m_file_name; std::string m_module_name; - uint32_t m_func_name_type_mask; // A pick from lldb::FunctionNameType. + uint32_t m_func_name_type_mask = + eFunctionNameTypeAuto; // A pick from lldb::FunctionNameType. lldb::tid_t m_thread_id; uint32_t m_thread_index; std::string m_thread_name; std::string m_queue_name; - bool m_sym_ctx_specified; + bool m_sym_ctx_specified = false; bool m_no_inlines; - bool m_thread_specified; + bool m_thread_specified = false; // Instance variables to hold the values for one_liner options. - bool m_use_one_liner; + bool m_use_one_liner = false; std::vector<std::string> m_one_liner; bool m_auto_continue; diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index a88fda9..7e4709b 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -802,12 +802,10 @@ class CommandObjectThreadUntil : public CommandObjectParsed { public: class CommandOptions : public Options { public: - uint32_t m_thread_idx; - uint32_t m_frame_idx; + uint32_t m_thread_idx = LLDB_INVALID_THREAD_ID; + uint32_t m_frame_idx = LLDB_INVALID_FRAME_ID; - CommandOptions() - : Options(), m_thread_idx(LLDB_INVALID_THREAD_ID), - m_frame_idx(LLDB_INVALID_FRAME_ID) { + CommandOptions() : Options() { // Keep default values of all options in one place: OptionParsingStarting // () OptionParsingStarting(nullptr); @@ -1374,7 +1372,7 @@ class CommandObjectThreadReturn : public CommandObjectRaw { public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_from_expression(false) { + CommandOptions() : Options() { // Keep default values of all options in one place: OptionParsingStarting // () OptionParsingStarting(nullptr); @@ -1414,7 +1412,7 @@ public: return llvm::makeArrayRef(g_thread_return_options); } - bool m_from_expression; + bool m_from_expression = false; // Instance variables to hold the values for command options. }; diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp index cc6bca0..025d9ea 100644 --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -2712,8 +2712,7 @@ protected: class CommandOptions : public OptionGroup { public: - CommandOptions() - : OptionGroup(), m_show_help(false), m_language(eLanguageTypeUnknown) {} + CommandOptions() : OptionGroup() {} ~CommandOptions() override = default; @@ -2750,8 +2749,8 @@ protected: // Options table: Required for subclasses of Options. - bool m_show_help; - lldb::LanguageType m_language; + bool m_show_help = false; + lldb::LanguageType m_language = eLanguageTypeUnknown; }; OptionGroupOptions m_option_group; diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index e7b1f31..b8be19f 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -166,11 +166,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() - : Options(), - m_level(lldb::eDescriptionLevelBrief) // Watchpoint List defaults to - // brief descriptions - {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -206,7 +202,7 @@ public: // Instance variables to hold the values for command options. - lldb::DescriptionLevel m_level; + lldb::DescriptionLevel m_level = lldb::eDescriptionLevelBrief; }; protected: @@ -467,7 +463,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_force(false) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -495,7 +491,7 @@ public: } // Instance variables to hold the values for command options. - bool m_force; + bool m_force = false; }; protected: @@ -593,7 +589,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_ignore_count(0) {} + CommandOptions() : Options() {} ~CommandOptions() override = default; @@ -625,7 +621,7 @@ public: // Instance variables to hold the values for command options. - uint32_t m_ignore_count; + uint32_t m_ignore_count = 0; }; protected: @@ -721,7 +717,7 @@ public: class CommandOptions : public Options { public: - CommandOptions() : Options(), m_condition(), m_condition_passed(false) {} + CommandOptions() : Options(), m_condition() {} ~CommandOptions() override = default; @@ -754,7 +750,7 @@ public: // Instance variables to hold the values for command options. std::string m_condition; - bool m_condition_passed; + bool m_condition_passed = false; }; protected: diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index f22687f..432ba44 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -314,10 +314,7 @@ are no syntax errors may indicate that a function was declared but never called. class CommandOptions : public Options { public: - CommandOptions() - : Options(), m_use_commands(false), m_use_script_language(false), - m_script_language(eScriptLanguageNone), m_use_one_liner(false), - m_one_liner(), m_function_name() {} + CommandOptions() : Options(), m_one_liner(), m_function_name() {} ~CommandOptions() override = default; @@ -387,12 +384,12 @@ are no syntax errors may indicate that a function was declared but never called. // Instance variables to hold the values for command options. - bool m_use_commands; - bool m_use_script_language; - lldb::ScriptLanguage m_script_language; + bool m_use_commands = false; + bool m_use_script_language = false; + lldb::ScriptLanguage m_script_language = eScriptLanguageNone; // Instance variables to hold the values for one_liner options. - bool m_use_one_liner; + bool m_use_one_liner = false; std::string m_one_liner; bool m_stop_on_error; std::string m_function_name; |