SBBroadcaster::SBBroadcaster() { LLDB_INSTRUMENT_VA(this); }
SBBroadcaster::SBBroadcaster(const char *name)
- : m_opaque_sp(new Broadcaster(nullptr, name)), m_opaque_ptr(nullptr) {
+ : m_opaque_sp(new Broadcaster(nullptr, name)) {
LLDB_INSTRUMENT_VA(this, name);
m_opaque_ptr = m_opaque_sp.get();
SBListener::SBListener() { LLDB_INSTRUMENT_VA(this); }
SBListener::SBListener(const char *name)
- : m_opaque_sp(Listener::MakeListener(name)), m_unused_ptr(nullptr) {
+ : m_opaque_sp(Listener::MakeListener(name)) {
LLDB_INSTRUMENT_VA(this, name);
}
-SBListener::SBListener(const SBListener &rhs)
- : m_opaque_sp(rhs.m_opaque_sp), m_unused_ptr(nullptr) {
+SBListener::SBListener(const SBListener &rhs) : m_opaque_sp(rhs.m_opaque_sp) {
LLDB_INSTRUMENT_VA(this, rhs);
}
}
SBListener::SBListener(const lldb::ListenerSP &listener_sp)
- : m_opaque_sp(listener_sp), m_unused_ptr(nullptr) {}
+ : m_opaque_sp(listener_sp) {}
SBListener::~SBListener() = default;
// PlatformShellCommand
struct PlatformShellCommand {
PlatformShellCommand(llvm::StringRef shell_interpreter,
- llvm::StringRef shell_command)
- : m_status(0), m_signo(0) {
+ llvm::StringRef shell_command) {
if (!shell_interpreter.empty())
m_shell = shell_interpreter.str();
public:
QueueImpl() {}
- QueueImpl(const lldb::QueueSP &queue_sp)
- : m_thread_list_fetched(false), m_pending_items_fetched(false) {
- m_queue_wp = queue_sp;
- }
+ QueueImpl(const lldb::QueueSP &queue_sp) { m_queue_wp = queue_sp; }
QueueImpl(const QueueImpl &rhs) {
if (&rhs == this)
std::string funct, std::string help,
ScriptedCommandSynchronicity synch)
: CommandObjectRaw(interpreter, name), m_function_name(funct),
- m_synchro(synch), m_fetched_help_long(false) {
+ m_synchro(synch) {
if (!help.empty())
SetHelp(help);
else {
private:
std::string m_function_name;
ScriptedCommandSynchronicity m_synchro;
- bool m_fetched_help_long;
+ bool m_fetched_help_long = false;
};
class CommandObjectScriptingObject : public CommandObjectRaw {
eCommandRequiresTarget | eCommandProcessMustBePaused),
m_format_options(eFormatBytesWithASCII, 1, 8),
- m_next_addr(LLDB_INVALID_ADDRESS), m_prev_byte_size(0),
m_prev_format_options(eFormatBytesWithASCII, 1, 8) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
OptionGroupReadMemory m_memory_options;
OptionGroupOutputFile m_outfile_options;
OptionGroupValueObjectDisplay m_varobj_options;
- lldb::addr_t m_next_addr;
- lldb::addr_t m_prev_byte_size;
+ lldb::addr_t m_next_addr = LLDB_INVALID_ADDRESS;
+ lldb::addr_t m_prev_byte_size = 0;
OptionGroupFormat m_prev_format_options;
OptionGroupReadMemory m_prev_memory_options;
OptionGroupOutputFile m_prev_outfile_options;
class ProcessMemoryIterator {
public:
ProcessMemoryIterator(ProcessSP process_sp, lldb::addr_t base)
- : m_process_sp(process_sp), m_base_addr(base), m_is_valid(true) {
+ : m_process_sp(process_sp), m_base_addr(base) {
lldbassert(process_sp.get() != nullptr);
}
private:
ProcessSP m_process_sp;
lldb::addr_t m_base_addr;
- bool m_is_valid;
+ bool m_is_valid = true;
};
bool DoExecute(Args &command, CommandReturnObject &result) override {
// No need to check "process" for validity as eCommandRequiresProcess
"an address in the current target process.",
"memory region ADDR",
eCommandRequiresProcess | eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched),
- m_prev_end_addr(LLDB_INVALID_ADDRESS) {}
+ eCommandProcessMustBeLaunched) {}
~CommandObjectMemoryRegion() override = default;
return m_cmd_name;
}
- lldb::addr_t m_prev_end_addr;
+ lldb::addr_t m_prev_end_addr = LLDB_INVALID_ADDRESS;
};
// CommandObjectMemory
public:
class OptionGroupTagWrite : public OptionGroup {
public:
- OptionGroupTagWrite() : m_end_addr(LLDB_INVALID_ADDRESS) {}
+ OptionGroupTagWrite() {}
~OptionGroupTagWrite() override = default;
m_end_addr = LLDB_INVALID_ADDRESS;
}
- lldb::addr_t m_end_addr;
+ lldb::addr_t m_end_addr = LLDB_INVALID_ADDRESS;
};
CommandObjectMemoryTagWrite(CommandInterpreter &interpreter)
class CommandOptions : public Options {
public:
- CommandOptions() : m_requested_save_core_style(eSaveCoreUnspecified) {}
+ CommandOptions() {}
~CommandOptions() override = default;
}
// Instance variables to hold the values for command options.
- SaveCoreStyle m_requested_save_core_style;
+ SaveCoreStyle m_requested_save_core_style = eSaveCoreUnspecified;
std::string m_requested_plugin_name;
};
nullptr,
eCommandRequiresProcess | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
- eCommandProcessMustBeTraced),
- m_create_repeat_command_just_invoked(false) {}
+ eCommandProcessMustBeTraced) {}
~CommandObjectTraceDumpInstructions() override = default;
// Repeat command helpers
std::string m_repeat_command;
- bool m_create_repeat_command_just_invoked;
+ bool m_create_repeat_command_just_invoked = false;
std::map<lldb::tid_t, std::unique_ptr<TraceInstructionDumper>> m_dumpers;
};
Address::Address(lldb::addr_t abs_addr) : m_section_wp(), m_offset(abs_addr) {}
Address::Address(addr_t address, const SectionList *section_list)
- : m_section_wp(), m_offset(LLDB_INVALID_ADDRESS) {
+ : m_section_wp() {
ResolveAddressUsingFileSections(address, section_list);
}
FormatEntity::Entry::Entry(llvm::StringRef s)
: string(s.data(), s.size()), printf_format(), children(),
- type(Type::String), fmt(lldb::eFormatDefault), number(0), deref(false) {}
+ type(Type::String) {}
FormatEntity::Entry::Entry(char ch)
- : string(1, ch), printf_format(), children(), type(Type::String),
- fmt(lldb::eFormatDefault), number(0), deref(false) {}
+ : string(1, ch), printf_format(), children(), type(Type::String) {}
void FormatEntity::Entry::AppendChar(char ch) {
if (children.empty() || children.back().type != Entry::Type::String)
protected:
StringList m_text;
- int m_first_visible_line;
+ int m_first_visible_line = 0;
};
// A surface is an abstraction for something than can be drawn on. The surface
public:
enum class Type { Window, Pad };
- Surface(Surface::Type type) : m_type(type), m_window(nullptr) {}
+ Surface(Surface::Type type) : m_type(type) {}
WINDOW *get() { return m_window; }
protected:
Type m_type;
- WINDOW *m_window;
+ WINDOW *m_window = nullptr;
};
class Pad : public Surface {
class TextFieldDelegate : public FieldDelegate {
public:
TextFieldDelegate(const char *label, const char *content, bool required)
- : m_label(label), m_required(required), m_cursor_position(0),
- m_first_visibile_char(0) {
+ : m_label(label), m_required(required) {
if (content)
m_content = content;
}
std::string m_content;
// The cursor position in the content string itself. Can be in the range
// [0, GetContentLength()].
- int m_cursor_position;
+ int m_cursor_position = 0;
// The index of the first visible character in the content.
- int m_first_visibile_char;
+ int m_first_visibile_char = 0;
// Optional error message. If empty, field is considered to have no error.
std::string m_error;
};
ChoicesFieldDelegate(const char *label, int number_of_visible_choices,
std::vector<std::string> choices)
: m_label(label), m_number_of_visible_choices(number_of_visible_choices),
- m_choices(choices), m_choice(0), m_first_visibile_choice(0) {}
+ m_choices(choices) {}
// Choices fields are drawn as titles boxses of a number of visible choices.
// The rest of the choices become visible as the user scroll. The selected
int m_number_of_visible_choices;
std::vector<std::string> m_choices;
// The index of the selected choice.
- int m_choice;
+ int m_choice = 0;
// The index of the first visible choice in the field.
- int m_first_visibile_choice;
+ int m_first_visibile_choice = 0;
};
class PlatformPluginFieldDelegate : public ChoicesFieldDelegate {
template <class T> class ListFieldDelegate : public FieldDelegate {
public:
ListFieldDelegate(const char *label, T default_field)
- : m_label(label), m_default_field(default_field), m_selection_index(0),
+ : m_label(label), m_default_field(default_field),
m_selection_type(SelectionType::NewButton) {}
// Signify which element is selected. If a field or a remove button is
// created though a copy.
T m_default_field;
std::vector<T> m_fields;
- int m_selection_index;
+ int m_selection_index = 0;
// See SelectionType class enum.
SelectionType m_selection_type;
};
class FormWindowDelegate : public WindowDelegate {
public:
- FormWindowDelegate(FormDelegateSP &delegate_sp)
- : m_delegate_sp(delegate_sp), m_selection_index(0),
- m_first_visible_line(0) {
+ FormWindowDelegate(FormDelegateSP &delegate_sp) : m_delegate_sp(delegate_sp) {
assert(m_delegate_sp->GetNumberOfActions() > 0);
if (m_delegate_sp->GetNumberOfFields() > 0)
m_selection_type = SelectionType::Field;
protected:
FormDelegateSP m_delegate_sp;
// The index of the currently selected SelectionType.
- int m_selection_index;
+ int m_selection_index = 0;
// See SelectionType class enum.
SelectionType m_selection_type;
// The first visible line from the pad.
- int m_first_visible_line;
+ int m_first_visible_line = 0;
};
///////////////////////////
class SearcherWindowDelegate : public WindowDelegate {
public:
SearcherWindowDelegate(SearcherDelegateSP &delegate_sp)
- : m_delegate_sp(delegate_sp), m_text_field("Search", "", false),
- m_selected_match(0), m_first_visible_match(0) {
+ : m_delegate_sp(delegate_sp), m_text_field("Search", "", false) {
;
}
SearcherDelegateSP m_delegate_sp;
TextFieldDelegate m_text_field;
// The index of the currently selected match.
- int m_selected_match;
+ int m_selected_match = 0;
// The index of the first visible match.
- int m_first_visible_match;
+ int m_first_visible_match = 0;
};
//////////////////////////////
class Application {
public:
- Application(FILE *in, FILE *out)
- : m_window_sp(), m_screen(nullptr), m_in(in), m_out(out) {}
+ Application(FILE *in, FILE *out) : m_window_sp(), m_in(in), m_out(out) {}
~Application() {
m_window_delegates.clear();
protected:
WindowSP m_window_sp;
WindowDelegates m_window_delegates;
- SCREEN *m_screen;
+ SCREEN *m_screen = nullptr;
FILE *m_in;
FILE *m_out;
bool m_update_screen = false;
class TreeItem {
public:
TreeItem(TreeItem *parent, TreeDelegate &delegate, bool might_have_children)
- : m_parent(parent), m_delegate(delegate), m_user_data(nullptr),
- m_identifier(0), m_row_idx(-1), m_children(),
- m_might_have_children(might_have_children), m_is_expanded(false) {
+ : m_parent(parent), m_delegate(delegate), m_children(),
+ m_might_have_children(might_have_children) {
if (m_parent == nullptr)
m_is_expanded = m_delegate.TreeDelegateExpandRootByDefault();
}
protected:
TreeItem *m_parent;
TreeDelegate &m_delegate;
- void *m_user_data;
- uint64_t m_identifier;
+ void *m_user_data = nullptr;
+ uint64_t m_identifier = 0;
std::string m_text;
- int m_row_idx; // Zero based visible row index, -1 if not visible or for the
- // root item
+ int m_row_idx = -1; // Zero based visible row index, -1 if not visible or for
+ // the root item
std::vector<TreeItem> m_children;
bool m_might_have_children;
- bool m_is_expanded;
+ bool m_is_expanded = false;
};
class TreeWindowDelegate : public WindowDelegate {
public:
TreeWindowDelegate(Debugger &debugger, const TreeDelegateSP &delegate_sp)
: m_debugger(debugger), m_delegate_sp(delegate_sp),
- m_root(nullptr, *delegate_sp, true), m_selected_item(nullptr),
- m_num_rows(0), m_selected_row_idx(0), m_first_visible_row(0),
- m_min_x(0), m_min_y(0), m_max_x(0), m_max_y(0) {}
+ m_root(nullptr, *delegate_sp, true) {}
int NumVisibleRows() const { return m_max_y - m_min_y; }
Debugger &m_debugger;
TreeDelegateSP m_delegate_sp;
TreeItem m_root;
- TreeItem *m_selected_item;
- int m_num_rows;
- int m_selected_row_idx;
- int m_first_visible_row;
- int m_min_x;
- int m_min_y;
- int m_max_x;
- int m_max_y;
+ TreeItem *m_selected_item = nullptr;
+ int m_num_rows = 0;
+ int m_selected_row_idx = 0;
+ int m_first_visible_row = 0;
+ int m_min_x = 0;
+ int m_min_y = 0;
+ int m_max_x = 0;
+ int m_max_y = 0;
};
// A tree delegate that just draws the text member of the tree item, it doesn't
class ThreadTreeDelegate : public TreeDelegate {
public:
ThreadTreeDelegate(Debugger &debugger)
- : TreeDelegate(), m_debugger(debugger), m_tid(LLDB_INVALID_THREAD_ID),
- m_stop_id(UINT32_MAX) {
+ : TreeDelegate(), m_debugger(debugger) {
FormatEntity::Parse("thread #${thread.index}: tid = ${thread.id}{, stop "
"reason = ${thread.stop-reason}}",
m_format);
protected:
Debugger &m_debugger;
std::shared_ptr<FrameTreeDelegate> m_frame_delegate_sp;
- lldb::user_id_t m_tid;
- uint32_t m_stop_id;
+ lldb::user_id_t m_tid = LLDB_INVALID_THREAD_ID;
+ uint32_t m_stop_id = UINT32_MAX;
FormatEntity::Entry m_format;
};
class ThreadsTreeDelegate : public TreeDelegate {
public:
ThreadsTreeDelegate(Debugger &debugger)
- : TreeDelegate(), m_thread_delegate_sp(), m_debugger(debugger),
- m_stop_id(UINT32_MAX), m_update_selection(false) {
+ : TreeDelegate(), m_thread_delegate_sp(), m_debugger(debugger) {
FormatEntity::Parse("process ${process.id}{, name = ${process.name}}",
m_format);
}
protected:
std::shared_ptr<ThreadTreeDelegate> m_thread_delegate_sp;
Debugger &m_debugger;
- uint32_t m_stop_id;
- bool m_update_selection;
+ uint32_t m_stop_id = UINT32_MAX;
+ bool m_update_selection = false;
FormatEntity::Entry m_format;
};
public:
ValueObjectListDelegate() : m_rows() {}
- ValueObjectListDelegate(ValueObjectList &valobj_list)
- : m_rows(), m_selected_row(nullptr), m_selected_row_idx(0),
- m_first_visible_row(0), m_num_rows(0), m_max_x(0), m_max_y(0) {
+ ValueObjectListDelegate(ValueObjectList &valobj_list) : m_rows() {
SetValues(valobj_list);
}
class FrameVariablesWindowDelegate : public ValueObjectListDelegate {
public:
FrameVariablesWindowDelegate(Debugger &debugger)
- : ValueObjectListDelegate(), m_debugger(debugger),
- m_frame_block(nullptr) {}
+ : ValueObjectListDelegate(), m_debugger(debugger) {}
~FrameVariablesWindowDelegate() override = default;
protected:
Debugger &m_debugger;
- Block *m_frame_block;
+ Block *m_frame_block = nullptr;
};
class RegistersWindowDelegate : public ValueObjectListDelegate {
HelpDialogDelegate::HelpDialogDelegate(const char *text,
KeyHelp *key_help_array)
- : m_text(), m_first_visible_line(0) {
+ : m_text() {
if (text && text[0]) {
m_text.SplitIntoLines(text);
m_text.AppendString("");
public:
SourceFileWindowDelegate(Debugger &debugger)
: WindowDelegate(), m_debugger(debugger), m_sc(), m_file_sp(),
- m_disassembly_scope(nullptr), m_disassembly_sp(), m_disassembly_range(),
- m_title(), m_tid(LLDB_INVALID_THREAD_ID), m_line_width(4),
- m_selected_line(0), m_pc_line(0), m_stop_id(0), m_frame_idx(UINT32_MAX),
- m_first_visible_line(0), m_first_visible_column(0), m_min_x(0),
- m_min_y(0), m_max_x(0), m_max_y(0) {}
+ m_disassembly_sp(), m_disassembly_range(), m_title() {}
~SourceFileWindowDelegate() override = default;
Debugger &m_debugger;
SymbolContext m_sc;
SourceManager::FileSP m_file_sp;
- SymbolContextScope *m_disassembly_scope;
+ SymbolContextScope *m_disassembly_scope = nullptr;
lldb::DisassemblerSP m_disassembly_sp;
AddressRange m_disassembly_range;
StreamString m_title;
- lldb::user_id_t m_tid;
- int m_line_width;
- uint32_t m_selected_line; // The selected line
- uint32_t m_pc_line; // The line with the PC
- uint32_t m_stop_id;
- uint32_t m_frame_idx;
- int m_first_visible_line;
- int m_first_visible_column;
- int m_min_x;
- int m_min_y;
- int m_max_x;
- int m_max_y;
+ lldb::user_id_t m_tid = LLDB_INVALID_THREAD_ID;
+ int m_line_width = 4;
+ uint32_t m_selected_line = 0; // The selected line
+ uint32_t m_pc_line = 0; // The line with the PC
+ uint32_t m_stop_id = 0;
+ uint32_t m_frame_idx = UINT32_MAX;
+ int m_first_visible_line = 0;
+ int m_first_visible_column = 0;
+ int m_min_x = 0;
+ int m_min_y = 0;
+ int m_max_x = 0;
+ int m_max_y = 0;
};
DisplayOptions ValueObjectListDelegate::g_options = {true};
}
Module::Module(const ModuleSpec &module_spec)
- : m_object_offset(0), m_file_has_changed(false),
- m_first_file_changed_log(false) {
+ : m_file_has_changed(false), m_first_file_changed_log(false) {
// Scope for locker below...
{
std::lock_guard<std::recursive_mutex> guard(
Module::LookupInfo::LookupInfo(ConstString name,
FunctionNameType name_type_mask,
LanguageType language)
- : m_name(name), m_lookup_name(), m_language(language),
- m_name_type_mask(eFunctionNameTypeNone),
- m_match_name_after_lookup(false) {
+ : m_name(name), m_lookup_name(), m_language(language) {
const char *name_cstr = name.GetCString();
llvm::StringRef basename;
llvm::StringRef context;
ModuleList::ModuleList() : m_modules(), m_modules_mutex() {}
-ModuleList::ModuleList(const ModuleList &rhs)
- : m_modules(), m_modules_mutex(), m_notifier(nullptr) {
+ModuleList::ModuleList(const ModuleList &rhs) : m_modules(), m_modules_mutex() {
std::lock_guard<std::recursive_mutex> lhs_guard(m_modules_mutex);
std::lock_guard<std::recursive_mutex> rhs_guard(rhs.m_modules_mutex);
m_modules = rhs.m_modules;
Value::Value() : m_value(), m_compiler_type(), m_data_buffer() {}
Value::Value(const Scalar &scalar)
- : m_value(scalar), m_compiler_type(), m_context(nullptr),
- m_value_type(ValueType::Scalar), m_context_type(ContextType::Invalid),
- m_data_buffer() {}
+ : m_value(scalar), m_compiler_type(), m_data_buffer() {}
Value::Value(const void *bytes, int len)
- : m_value(), m_compiler_type(), m_context(nullptr),
- m_value_type(ValueType::HostAddress), m_context_type(ContextType::Invalid),
+ : m_value(), m_compiler_type(), m_value_type(ValueType::HostAddress),
m_data_buffer() {
SetBytes(bytes, len);
}
ValueObject::EvaluationPoint::EvaluationPoint(ExecutionContextScope *exe_scope,
bool use_selected)
- : m_mod_id(), m_exe_ctx_ref(), m_needs_update(true) {
+ : m_mod_id(), m_exe_ctx_ref() {
ExecutionContext exe_ctx(exe_scope);
TargetSP target_sp(exe_ctx.GetTargetSP());
if (target_sp) {
ValueObject::EvaluationPoint::EvaluationPoint(
const ValueObject::EvaluationPoint &rhs)
- : m_mod_id(), m_exe_ctx_ref(rhs.m_exe_ctx_ref), m_needs_update(true) {}
+ : m_mod_id(), m_exe_ctx_ref(rhs.m_exe_ctx_ref) {}
ValueObject::EvaluationPoint::~EvaluationPoint() = default;
class VectorTypeSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
public:
VectorTypeSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_parent_format(eFormatInvalid),
- m_item_format(eFormatInvalid), m_child_type(), m_num_children(0) {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_child_type() {}
~VectorTypeSyntheticFrontEnd() override = default;
}
private:
- lldb::Format m_parent_format;
- lldb::Format m_item_format;
+ lldb::Format m_parent_format = eFormatInvalid;
+ lldb::Format m_item_format = eFormatInvalid;
CompilerType m_child_type;
- size_t m_num_children;
+ size_t m_num_children = 0;
};
} // namespace formatters
DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp,
const DataExtractor &data,
const DWARFUnit *dwarf_cu)
- : m_module_wp(), m_data(data), m_dwarf_cu(dwarf_cu),
- m_reg_kind(eRegisterKindDWARF) {
+ : m_module_wp(), m_data(data), m_dwarf_cu(dwarf_cu) {
if (module_sp)
m_module_wp = module_sp;
}
ValueMap m_values;
DataLayout &m_target_data;
lldb_private::IRExecutionUnit &m_execution_unit;
- const BasicBlock *m_bb;
- const BasicBlock *m_prev_bb;
+ const BasicBlock *m_bb = nullptr;
+ const BasicBlock *m_prev_bb = nullptr;
BasicBlock::const_iterator m_ii;
BasicBlock::const_iterator m_ie;
lldb_private::IRExecutionUnit &execution_unit,
lldb::addr_t stack_frame_bottom,
lldb::addr_t stack_frame_top)
- : m_target_data(target_data), m_execution_unit(execution_unit),
- m_bb(nullptr), m_prev_bb(nullptr) {
+ : m_target_data(target_data), m_execution_unit(execution_unit) {
m_byte_order = (target_data.isLittleEndian() ? lldb::eByteOrderLittle
: lldb::eByteOrderBig);
m_addr_byte_size = (target_data.getPointerSize(0));
class EntityVariable : public Materializer::Entity {
public:
EntityVariable(lldb::VariableSP &variable_sp)
- : Entity(), m_variable_sp(variable_sp), m_is_reference(false),
- m_temporary_allocation(LLDB_INVALID_ADDRESS),
- m_temporary_allocation_size(0) {
+ : Entity(), m_variable_sp(variable_sp) {
// Hard-coding to maximum size of a pointer since all variables are
// materialized by reference
m_size = 8;
private:
lldb::VariableSP m_variable_sp;
- bool m_is_reference;
- lldb::addr_t m_temporary_allocation;
- size_t m_temporary_allocation_size;
+ bool m_is_reference = false;
+ lldb::addr_t m_temporary_allocation = LLDB_INVALID_ADDRESS;
+ size_t m_temporary_allocation_size = 0;
lldb::DataBufferSP m_original_data;
};
bool keep_in_memory,
Materializer::PersistentVariableDelegate *delegate)
: Entity(), m_type(type), m_is_program_reference(is_program_reference),
- m_keep_in_memory(keep_in_memory),
- m_temporary_allocation(LLDB_INVALID_ADDRESS),
- m_temporary_allocation_size(0), m_delegate(delegate) {
+ m_keep_in_memory(keep_in_memory), m_delegate(delegate) {
// Hard-coding to maximum size of a pointer since all results are
// materialized by reference
m_size = 8;
bool m_is_program_reference;
bool m_keep_in_memory;
- lldb::addr_t m_temporary_allocation;
- size_t m_temporary_allocation_size;
+ lldb::addr_t m_temporary_allocation = LLDB_INVALID_ADDRESS;
+ size_t m_temporary_allocation_size = 0;
Materializer::PersistentVariableDelegate *m_delegate;
};
using namespace lldb_private;
HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
- : m_thread(thread), m_result(0) {} // NOLINT(modernize-use-nullptr)
+ : m_thread(thread) {}
lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
return m_thread;
const FileSpec &working_directory,
uint32_t launch_flags)
: ProcessInfo(), m_working_dir(), m_plugin_name(), m_flags(launch_flags),
- m_file_actions(), m_pty(new PseudoTerminal), m_resume_count(0),
+ m_file_actions(), m_pty(new PseudoTerminal),
m_scripted_process_class_name(), m_scripted_process_dictionary_sp() {
if (stdin_file_spec) {
FileAction file_action;
OptionValueFileColonLine::OptionValueFileColonLine() = default;
OptionValueFileColonLine::OptionValueFileColonLine(llvm::StringRef input)
- : m_line_number(LLDB_INVALID_LINE_NUMBER),
- m_column_number(LLDB_INVALID_COLUMN_NUMBER),
- m_completion_mask(CommandCompletions::eSourceFileCompletion) {
+
+{
SetValueFromString(input, eVarSetOperationAssign);
}
OptionValueFileSpec::OptionValueFileSpec(const FileSpec &value, bool resolve)
: m_current_value(value), m_default_value(value),
- m_completion_mask(CommandCompletions::eDiskFileCompletion),
+
m_resolve(resolve) {}
OptionValueFileSpec::OptionValueFileSpec(const FileSpec ¤t_value,
const FileSpec &default_value,
bool resolve)
: m_current_value(current_value), m_default_value(default_value),
- m_completion_mask(CommandCompletions::eDiskFileCompletion),
+
m_resolve(resolve) {}
void OptionValueFileSpec::DumpValue(const ExecutionContext *exe_ctx,
AddressClass addr_class)
: Instruction(address, addr_class),
m_disasm_wp(std::static_pointer_cast<DisassemblerLLVMC>(
- disasm.shared_from_this())),
- m_using_file_addr(false) {}
+ disasm.shared_from_this())) {}
~InstructionLLVMC() override = default;
std::weak_ptr<DisassemblerLLVMC> m_disasm_wp;
bool m_is_valid = false;
- bool m_using_file_addr;
+ bool m_using_file_addr = false;
bool m_has_visited_instruction = false;
// Be conservative. If we didn't understand the instruction, say it:
public:
AddMacroState(const FileSpec ¤t_file, const uint32_t current_file_line)
- : m_state(CURRENT_FILE_NOT_YET_PUSHED), m_current_file(current_file),
- m_current_file_line(current_file_line) {}
+ : m_current_file(current_file), m_current_file_line(current_file_line) {}
void StartFile(const FileSpec &file) {
m_file_stack.push_back(file);
private:
std::vector<FileSpec> m_file_stack;
- State m_state;
+ State m_state = CURRENT_FILE_NOT_YET_PUSHED;
FileSpec m_current_file;
uint32_t m_current_file_line;
};
/// The module being instrumented.
Instrumenter(llvm::Module &module,
std::shared_ptr<UtilityFunction> checker_function)
- : m_module(module), m_checker_function(checker_function),
- m_i8ptr_ty(nullptr), m_intptr_ty(nullptr) {}
+ : m_module(module), m_checker_function(checker_function) {}
virtual ~Instrumenter() = default;
m_checker_function; ///< The dynamic checker function for the process
private:
- PointerType *m_i8ptr_ty;
- IntegerType *m_intptr_ty;
+ PointerType *m_i8ptr_ty = nullptr;
+ IntegerType *m_intptr_ty = nullptr;
};
class ValidPointerChecker : public Instrumenter {
size_t GetIndexOfChildWithName(ConstString name) override;
private:
- ValueObject *m_real_child;
+ ValueObject *m_real_child = nullptr;
};
} // namespace formatters
} // namespace lldb_private
lldb_private::formatters::LibcxxStdAtomicSyntheticFrontEnd::
LibcxxStdAtomicSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_real_child(nullptr) {}
+ : SyntheticChildrenFrontEnd(*valobj_sp) {}
bool lldb_private::formatters::LibcxxStdAtomicSyntheticFrontEnd::Update() {
ValueObjectSP atomic_value = GetLibCxxAtomicValue(m_backend);
size_t GetIndexOfChildWithName(ConstString name) override;
private:
- ValueObject *m_start;
+ ValueObject *m_start = nullptr;
CompilerType m_element_type;
- uint32_t m_element_size;
- size_t m_num_elements;
+ uint32_t m_element_size = 0;
+ size_t m_num_elements = 0;
};
} // namespace formatters
} // namespace lldb_private
lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::
LibcxxInitializerListSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_start(nullptr), m_element_type(),
- m_element_size(0), m_num_elements(0) {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type() {
if (valobj_sp)
Update();
}
bool Update() override;
private:
- lldb::addr_t m_node_address;
- ValueObject *m_tail;
+ lldb::addr_t m_node_address = 0;
+ ValueObject *m_tail = nullptr;
};
} // end anonymous namespace
}
ListFrontEnd::ListFrontEnd(lldb::ValueObjectSP valobj_sp)
- : AbstractListFrontEnd(*valobj_sp), m_node_address(), m_tail(nullptr) {
+ : AbstractListFrontEnd(*valobj_sp) {
if (valobj_sp)
Update();
}
void GetValueOffset(const lldb::ValueObjectSP &node);
- ValueObject *m_tree;
- ValueObject *m_root_node;
+ ValueObject *m_tree = nullptr;
+ ValueObject *m_root_node = nullptr;
CompilerType m_element_type;
- uint32_t m_skip_size;
- size_t m_count;
+ uint32_t m_skip_size = UINT32_MAX;
+ size_t m_count = UINT32_MAX;
std::map<size_t, MapIterator> m_iterators;
};
} // namespace formatters
lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::
LibcxxStdMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_tree(nullptr),
- m_root_node(nullptr), m_element_type(), m_skip_size(UINT32_MAX),
- m_count(UINT32_MAX), m_iterators() {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type(), m_iterators() {
if (valobj_sp)
Update();
}
private:
CompilerType m_element_type;
CompilerType m_node_type;
- ValueObject *m_tree;
- size_t m_num_elements;
- ValueObject *m_next_element;
+ ValueObject *m_tree = nullptr;
+ size_t m_num_elements = 0;
+ ValueObject *m_next_element = nullptr;
std::vector<std::pair<ValueObject *, uint64_t>> m_elements_cache;
};
} // namespace formatters
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::
LibcxxStdUnorderedMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type(), m_tree(nullptr),
- m_num_elements(0), m_next_element(nullptr), m_elements_cache() {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type(),
+ m_elements_cache() {
if (valobj_sp)
Update();
}
size_t GetIndexOfChildWithName(ConstString name) override;
private:
- ValueObject *m_start;
- ValueObject *m_finish;
+ ValueObject *m_start = nullptr;
+ ValueObject *m_finish = nullptr;
CompilerType m_element_type;
- uint32_t m_element_size;
+ uint32_t m_element_size = 0;
};
class LibcxxVectorBoolSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
private:
CompilerType m_bool_type;
ExecutionContextRef m_exe_ctx_ref;
- uint64_t m_count;
- lldb::addr_t m_base_data_address;
+ uint64_t m_count = 0;
+ lldb::addr_t m_base_data_address = 0;
std::map<size_t, lldb::ValueObjectSP> m_children;
};
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::
LibcxxStdVectorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_start(nullptr),
- m_finish(nullptr), m_element_type(), m_element_size(0) {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type() {
if (valobj_sp)
Update();
}
lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::
LibcxxVectorBoolSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
: SyntheticChildrenFrontEnd(*valobj_sp), m_bool_type(), m_exe_ctx_ref(),
- m_count(0), m_base_data_address(0), m_children() {
+ m_children() {
if (valobj_sp) {
Update();
m_bool_type =
private:
ExecutionContextRef m_exe_ctx_ref;
- lldb::addr_t m_pair_address;
+ lldb::addr_t m_pair_address = 0;
CompilerType m_pair_type;
lldb::ValueObjectSP m_pair_sp;
};
LibstdcppMapIteratorSyntheticFrontEnd::LibstdcppMapIteratorSyntheticFrontEnd(
lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_address(0),
- m_pair_type(), m_pair_sp() {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_type(),
+ m_pair_sp() {
if (valobj_sp)
Update();
}
virtual uint64_t GetSize() = 0;
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
+ uint8_t m_ptr_size = 8;
CompilerType m_id_type;
};
private:
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
+ uint8_t m_ptr_size = 8;
D32 *m_data_32;
D64 *m_data_64;
return true;
}
-lldb_private::formatters::NSArrayMSyntheticFrontEndBase::NSArrayMSyntheticFrontEndBase(
- lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_id_type() {
+lldb_private::formatters::NSArrayMSyntheticFrontEndBase::
+ NSArrayMSyntheticFrontEndBase(lldb::ValueObjectSP valobj_sp)
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_id_type() {
if (valobj_sp) {
auto *clang_ast_context = ScratchTypeSystemClang::GetForTarget(
*valobj_sp->GetExecutionContextRef().GetTargetSP());
template <typename D32, typename D64, bool Inline>
lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
- GenericNSArrayISyntheticFrontEnd(
- lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
+ GenericNSArrayISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(),
m_data_32(nullptr), m_data_64(nullptr) {
if (valobj_sp) {
CompilerType type = valobj_sp->GetCompilerType();
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- lldb::ByteOrder m_order;
- DataDescriptor_32 *m_data_32;
- DataDescriptor_64 *m_data_64;
+ uint8_t m_ptr_size = 8;
+ lldb::ByteOrder m_order = lldb::eByteOrderInvalid;
+ DataDescriptor_32 *m_data_32 = nullptr;
+ DataDescriptor_64 *m_data_64 = nullptr;
lldb::addr_t m_data_ptr;
CompilerType m_pair_type;
std::vector<DictionaryItemDescriptor> m_children;
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- lldb::ByteOrder m_order;
+ uint8_t m_ptr_size = 8;
+ lldb::ByteOrder m_order = lldb::eByteOrderInvalid;
CFBasicHash m_hashtable;
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- lldb::ByteOrder m_order;
+ uint8_t m_ptr_size = 8;
+ lldb::ByteOrder m_order = lldb::eByteOrderInvalid;
D32 *m_data_32;
D64 *m_data_64;
CompilerType m_pair_type;
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- lldb::ByteOrder m_order;
- DataDescriptor_32 *m_data_32;
- DataDescriptor_64 *m_data_64;
+ uint8_t m_ptr_size = 8;
+ lldb::ByteOrder m_order = lldb::eByteOrderInvalid;
+ DataDescriptor_32 *m_data_32 = nullptr;
+ DataDescriptor_64 *m_data_64 = nullptr;
CompilerType m_pair_type;
std::vector<DictionaryItemDescriptor> m_children;
};
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::
NSDictionaryISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_order(lldb::eByteOrderInvalid), m_data_32(nullptr), m_data_64(nullptr),
- m_pair_type() {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_type() {}
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::
~NSDictionaryISyntheticFrontEnd() {
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::
NSCFDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_order(lldb::eByteOrderInvalid), m_hashtable(), m_pair_type() {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_hashtable(),
+ m_pair_type() {}
size_t lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::
GetIndexOfChildWithName(ConstString name) {
}
template <typename D32, typename D64>
-lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::
+lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32, D64>::
GenericNSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_order(lldb::eByteOrderInvalid), m_data_32(nullptr), m_data_64(nullptr),
- m_pair_type() {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(),
+ m_data_32(nullptr), m_data_64(nullptr), m_pair_type() {}
template <typename D32, typename D64>
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::
return dict_item.valobj_sp;
}
-lldb_private::formatters::Foundation1100::
- NSDictionaryMSyntheticFrontEnd::
+lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::
NSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_order(lldb::eByteOrderInvalid), m_data_32(nullptr), m_data_64(nullptr),
- m_pair_type() {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_type() {}
lldb_private::formatters::Foundation1100::
NSDictionaryMSyntheticFrontEnd::~NSDictionaryMSyntheticFrontEnd() {
public:
NSIndexPathSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
: SyntheticChildrenFrontEnd(*valobj_sp.get()), m_descriptor_sp(nullptr),
- m_impl(), m_ptr_size(0), m_uint_star_type() {
+ m_impl(), m_uint_star_type() {
m_ptr_size =
m_backend.GetTargetSP()->GetArchitecture().GetAddressByteSize();
}
Mode m_mode = Mode::Invalid;
} m_impl;
- uint32_t m_ptr_size;
+ uint32_t m_ptr_size = 0;
CompilerType m_uint_star_type;
};
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- DataDescriptor_32 *m_data_32;
- DataDescriptor_64 *m_data_64;
+ uint8_t m_ptr_size = 8;
+ DataDescriptor_32 *m_data_32 = nullptr;
+ DataDescriptor_64 *m_data_64 = nullptr;
lldb::addr_t m_data_ptr;
std::vector<SetItemDescriptor> m_children;
};
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
- lldb::ByteOrder m_order;
+ uint8_t m_ptr_size = 8;
+ lldb::ByteOrder m_order = lldb::eByteOrderInvalid;
CFBasicHash m_hashtable;
};
ExecutionContextRef m_exe_ctx_ref;
- uint8_t m_ptr_size;
+ uint8_t m_ptr_size = 8;
D32 *m_data_32;
D64 *m_data_64;
std::vector<SetItemDescriptor> m_children;
lldb_private::formatters::NSSetISyntheticFrontEnd::NSSetISyntheticFrontEnd(
lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_data_32(nullptr), m_data_64(nullptr) {
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref() {
if (valobj_sp)
Update();
}
lldb_private::formatters::NSCFSetSyntheticFrontEnd::NSCFSetSyntheticFrontEnd(
lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
- m_order(lldb::eByteOrderInvalid), m_hashtable(), m_pair_type() {}
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_hashtable(),
+ m_pair_type() {}
size_t
lldb_private::formatters::NSCFSetSyntheticFrontEnd::GetIndexOfChildWithName(
}
template <typename D32, typename D64>
-lldb_private::formatters::
- GenericNSSetMSyntheticFrontEnd<D32, D64>::GenericNSSetMSyntheticFrontEnd(
- lldb::ValueObjectSP valobj_sp)
- : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
+lldb_private::formatters::GenericNSSetMSyntheticFrontEnd<
+ D32, D64>::GenericNSSetMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
+ : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(),
m_data_32(nullptr), m_data_64(nullptr) {
if (valobj_sp)
Update();
class ObjCRuntimeMethodType {
public:
- ObjCRuntimeMethodType(const char *types) : m_is_valid(false) {
+ ObjCRuntimeMethodType(const char *types) {
const char *cursor = types;
enum ParserState { Start = 0, InType, InPos } state = Start;
const char *type = nullptr;
typedef std::vector<std::string> TypeVector;
TypeVector m_type_vector;
- bool m_is_valid;
+ bool m_is_valid = false;
};
bool AppleObjCDeclVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl) {
AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::VTableRegion(
AppleObjCVTables *owner, lldb::addr_t header_addr)
- : m_valid(true), m_owner(owner), m_header_addr(header_addr),
- m_code_start_addr(0), m_code_end_addr(0), m_next_region(0) {
+ : m_valid(true), m_owner(owner), m_header_addr(header_addr) {
SetUpRegion();
}
private:
ObjectFilePECOFF &m_object_file;
- bool m_error;
+ bool m_error = false;
uint32_t m_unwind_info_rva;
DataExtractor m_unwind_info_data;
- const UnwindInfo *m_unwind_info;
+ const UnwindInfo *m_unwind_info = nullptr;
DataExtractor m_unwind_code_data;
offset_t m_unwind_code_offset;
- const UnwindCode *m_unwind_code;
+ const UnwindCode *m_unwind_code = nullptr;
- bool m_chained;
+ bool m_chained = false;
};
UnwindCodesIterator::UnwindCodesIterator(ObjectFilePECOFF &object_file,
uint32_t unwind_info_rva)
- : m_object_file(object_file), m_error(false),
- m_unwind_info_rva(unwind_info_rva),
- m_unwind_info(nullptr), m_unwind_code_offset{}, m_unwind_code(nullptr),
- m_chained(false) {}
+ : m_object_file(object_file),
+ m_unwind_info_rva(unwind_info_rva), m_unwind_code_offset{} {}
bool UnwindCodesIterator::GetNext() {
static constexpr int UNWIND_INFO_SIZE = 4;
DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration(dw_tag_t tag,
uint8_t has_children)
- : m_code(InvalidCode), m_tag(tag), m_has_children(has_children),
- m_attributes() {}
+ : m_tag(tag), m_has_children(has_children), m_attributes() {}
llvm::Expected<DWARFEnumState>
DWARFAbbreviationDeclaration::extract(const DWARFDataExtractor &data,
m_is_weak(false), m_type(eSymbolTypeInvalid), m_mangled(),
m_addr_range() {}
-Symbol::Symbol(uint32_t symID, llvm::StringRef name, SymbolType type, bool external,
- bool is_debug, bool is_trampoline, bool is_artificial,
- const lldb::SectionSP §ion_sp, addr_t offset, addr_t size,
- bool size_is_valid, bool contains_linker_annotations,
- uint32_t flags)
- : SymbolContextScope(), m_uid(symID), m_type_data(0),
- m_type_data_resolved(false), m_is_synthetic(is_artificial),
- m_is_debug(is_debug), m_is_external(external), m_size_is_sibling(false),
+Symbol::Symbol(uint32_t symID, llvm::StringRef name, SymbolType type,
+ bool external, bool is_debug, bool is_trampoline,
+ bool is_artificial, const lldb::SectionSP §ion_sp,
+ addr_t offset, addr_t size, bool size_is_valid,
+ bool contains_linker_annotations, uint32_t flags)
+ : SymbolContextScope(), m_uid(symID), m_type_data_resolved(false),
+ m_is_synthetic(is_artificial), m_is_debug(is_debug),
+ m_is_external(external), m_size_is_sibling(false),
m_size_is_synthesized(false), m_size_is_valid(size_is_valid || size > 0),
m_demangled_is_synthesized(false),
m_contains_linker_annotations(contains_linker_annotations),
- m_is_weak(false), m_type(type),
- m_mangled(name),
+ m_is_weak(false), m_type(type), m_mangled(name),
m_addr_range(section_sp, offset, size), m_flags(flags) {}
Symbol::Symbol(uint32_t symID, const Mangled &mangled, SymbolType type,
bool is_artificial, const AddressRange &range,
bool size_is_valid, bool contains_linker_annotations,
uint32_t flags)
- : SymbolContextScope(), m_uid(symID), m_type_data(0),
- m_type_data_resolved(false), m_is_synthetic(is_artificial),
- m_is_debug(is_debug), m_is_external(external), m_size_is_sibling(false),
+ : SymbolContextScope(), m_uid(symID), m_type_data_resolved(false),
+ m_is_synthetic(is_artificial), m_is_debug(is_debug),
+ m_is_external(external), m_size_is_sibling(false),
m_size_is_synthesized(false),
m_size_is_valid(size_is_valid || range.GetByteSize() > 0),
m_demangled_is_synthesized(false),
SymbolContext::SymbolContext(const ModuleSP &m, CompileUnit *cu, Function *f,
Block *b, LineEntry *le, Symbol *s)
: target_sp(), module_sp(m), comp_unit(cu), function(f), block(b),
- line_entry(), symbol(s), variable(nullptr) {
+ line_entry(), symbol(s) {
if (le)
line_entry = *le;
}
CompileUnit *cu, Function *f, Block *b,
LineEntry *le, Symbol *s)
: target_sp(t), module_sp(m), comp_unit(cu), function(f), block(b),
- line_entry(), symbol(s), variable(nullptr) {
+ line_entry(), symbol(s) {
if (le)
line_entry = *le;
}
SymbolContext::SymbolContext(SymbolContextScope *sc_scope)
- : target_sp(), module_sp(), comp_unit(nullptr), function(nullptr),
- block(nullptr), line_entry(), symbol(nullptr), variable(nullptr) {
+ : target_sp(), module_sp(), line_entry() {
sc_scope->CalculateSymbolContext(this);
}
const Declaration &decl, const CompilerType &compiler_type,
ResolveState compiler_type_resolve_state, uint32_t opaque_payload)
: std::enable_shared_from_this<Type>(), UserID(uid), m_name(name),
- m_symbol_file(symbol_file), m_context(context), m_encoding_type(nullptr),
+ m_symbol_file(symbol_file), m_context(context),
m_encoding_uid(encoding_uid), m_encoding_uid_type(encoding_uid_type),
m_decl(decl), m_compiler_type(compiler_type),
m_compiler_type_resolve_state(compiler_type ? compiler_type_resolve_state
: m_target_wp(), m_process_wp(), m_thread_wp(), m_stack_id() {}
ExecutionContextRef::ExecutionContextRef(const ExecutionContext *exe_ctx)
- : m_target_wp(), m_process_wp(), m_thread_wp(),
- m_tid(LLDB_INVALID_THREAD_ID), m_stack_id() {
+ : m_target_wp(), m_process_wp(), m_thread_wp(), m_stack_id() {
if (exe_ctx)
*this = *exe_ctx;
}
ExecutionContextRef::ExecutionContextRef(const ExecutionContext &exe_ctx)
- : m_target_wp(), m_process_wp(), m_thread_wp(),
- m_tid(LLDB_INVALID_THREAD_ID), m_stack_id() {
+ : m_target_wp(), m_process_wp(), m_thread_wp(), m_stack_id() {
*this = exe_ctx;
}
ExecutionContextRef::ExecutionContextRef(Target *target, bool adopt_selected)
- : m_target_wp(), m_process_wp(), m_thread_wp(),
- m_tid(LLDB_INVALID_THREAD_ID), m_stack_id() {
+ : m_target_wp(), m_process_wp(), m_thread_wp(), m_stack_id() {
SetTargetPtr(target, adopt_selected);
}
ExceptionBreakpointResolver(lldb::LanguageType language, bool catch_bp,
bool throw_bp)
: BreakpointResolver(nullptr, BreakpointResolver::ExceptionResolver),
- m_language(language), m_language_runtime(nullptr), m_catch_bp(catch_bp),
- m_throw_bp(throw_bp) {}
+ m_language(language), m_catch_bp(catch_bp), m_throw_bp(throw_bp) {}
~ExceptionBreakpointResolver() override = default;
lldb::BreakpointResolverSP m_actual_resolver_sp;
lldb::LanguageType m_language;
- LanguageRuntime *m_language_runtime;
+ LanguageRuntime *m_language_runtime = nullptr;
bool m_catch_bp;
bool m_throw_bp;
};
PathMappingList::PathMappingList() : m_pairs() {}
PathMappingList::PathMappingList(ChangedCallback callback, void *callback_baton)
- : m_pairs(), m_callback(callback), m_callback_baton(callback_baton),
- m_mod_id(0) {}
+ : m_pairs(), m_callback(callback), m_callback_baton(callback_baton) {}
PathMappingList::PathMappingList(const PathMappingList &rhs)
- : m_pairs(rhs.m_pairs), m_callback(nullptr), m_callback_baton(nullptr),
- m_mod_id(0) {}
+ : m_pairs(rhs.m_pairs) {}
const PathMappingList &PathMappingList::operator=(const PathMappingList &rhs) {
if (this != &rhs) {
Process::ProcessEventData::ProcessEventData(const ProcessSP &process_sp,
StateType state)
- : EventData(), m_process_wp(), m_state(state), m_restarted(false),
- m_update_state(0), m_interrupted(false) {
+ : EventData(), m_process_wp(), m_state(state) {
if (process_sp)
m_process_wp = process_sp;
}
class RestorePlanState {
public:
RestorePlanState(lldb::ThreadPlanSP thread_plan_sp)
- : m_thread_plan_sp(thread_plan_sp), m_already_reset(false) {
+ : m_thread_plan_sp(thread_plan_sp) {
if (m_thread_plan_sp) {
m_private = m_thread_plan_sp->GetPrivate();
m_is_controlling = m_thread_plan_sp->IsControllingPlan();
private:
lldb::ThreadPlanSP m_thread_plan_sp;
- bool m_already_reset;
+ bool m_already_reset = false;
bool m_private;
bool m_is_controlling;
bool m_okay_to_discard;
StopInfoWatchpoint(Thread &thread, break_id_t watch_id,
lldb::addr_t watch_hit_addr)
- : StopInfo(thread, watch_id), m_should_stop(false),
- m_should_stop_is_valid(false), m_watch_hit_addr(watch_hit_addr) {}
+ : StopInfo(thread, watch_id), m_watch_hit_addr(watch_hit_addr) {}
~StopInfoWatchpoint() override = default;
}
private:
- bool m_should_stop;
- bool m_should_stop_is_valid;
+ bool m_should_stop = false;
+ bool m_should_stop_is_valid = false;
lldb::addr_t m_watch_hit_addr;
};
class StopInfoExec : public StopInfo {
public:
- StopInfoExec(Thread &thread)
- : StopInfo(thread, LLDB_INVALID_UID), m_performed_action(false) {}
+ StopInfoExec(Thread &thread) : StopInfo(thread, LLDB_INVALID_UID) {}
~StopInfoExec() override = default;
thread_sp->GetProcess()->DidExec();
}
- bool m_performed_action;
+ bool m_performed_action = false;
};
// StopInfoFork
class StopInfoFork : public StopInfo {
public:
StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
- : StopInfo(thread, child_pid), m_performed_action(false),
- m_child_pid(child_pid), m_child_tid(child_tid) {}
+ : StopInfo(thread, child_pid), m_child_pid(child_pid),
+ m_child_tid(child_tid) {}
~StopInfoFork() override = default;
thread_sp->GetProcess()->DidFork(m_child_pid, m_child_tid);
}
- bool m_performed_action;
+ bool m_performed_action = false;
private:
lldb::pid_t m_child_pid;
class StopInfoVFork : public StopInfo {
public:
StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
- : StopInfo(thread, child_pid), m_performed_action(false),
- m_child_pid(child_pid), m_child_tid(child_tid) {}
+ : StopInfo(thread, child_pid), m_child_pid(child_pid),
+ m_child_tid(child_tid) {}
~StopInfoVFork() override = default;
thread_sp->GetProcess()->DidVFork(m_child_pid, m_child_tid);
}
- bool m_performed_action;
+ bool m_performed_action = false;
private:
lldb::pid_t m_child_pid;
class StopInfoVForkDone : public StopInfo {
public:
- StopInfoVForkDone(Thread &thread)
- : StopInfo(thread, 0), m_performed_action(false) {}
+ StopInfoVForkDone(Thread &thread) : StopInfo(thread, 0) {}
~StopInfoVForkDone() override = default;
thread_sp->GetProcess()->DidVForkDone();
}
- bool m_performed_action;
+ bool m_performed_action = false;
};
} // namespace lldb_private
DataExtractor::DataExtractor(const DataBufferSP &data_sp, ByteOrder endian,
uint32_t addr_size,
uint32_t target_byte_size /*=1*/)
- : m_start(nullptr), m_end(nullptr), m_byte_order(endian),
- m_addr_size(addr_size), m_data_sp(),
+ : m_byte_order(endian), m_addr_size(addr_size), m_data_sp(),
m_target_byte_size(target_byte_size) {
assert(addr_size >= 1 && addr_size <= 8);
SetData(data_sp);
// "data".
DataExtractor::DataExtractor(const DataExtractor &data, offset_t offset,
offset_t length, uint32_t target_byte_size /*=1*/)
- : m_start(nullptr), m_end(nullptr), m_byte_order(data.m_byte_order),
- m_addr_size(data.m_addr_size), m_data_sp(),
- m_target_byte_size(target_byte_size) {
+ : m_byte_order(data.m_byte_order), m_addr_size(data.m_addr_size),
+ m_data_sp(), m_target_byte_size(target_byte_size) {
assert(m_addr_size >= 1 && m_addr_size <= 8);
if (data.ValidOffset(offset)) {
offset_t bytes_available = data.GetByteSize() - offset;
Instrumenter::Instrumenter(llvm::StringRef pretty_func,
std::string &&pretty_args)
- : m_pretty_func(pretty_func), m_local_boundary(false) {
+ : m_pretty_func(pretty_func) {
if (!g_global_boundary) {
g_global_boundary = true;
m_local_boundary = true;
ProcessInfo::ProcessInfo(const char *name, const ArchSpec &arch,
lldb::pid_t pid)
- : m_executable(name), m_arguments(), m_environment(), m_uid(UINT32_MAX),
- m_gid(UINT32_MAX), m_arch(arch), m_pid(pid) {}
+ : m_executable(name), m_arguments(), m_environment(), m_arch(arch),
+ m_pid(pid) {}
void ProcessInfo::Clear() {
m_executable.Clear();
: eErrorTypeGeneric),
m_string(EC.message()) {}
-Status::Status(const char *format, ...)
- : m_code(0), m_type(eErrorTypeInvalid), m_string() {
+Status::Status(const char *format, ...) : m_string() {
va_list args;
va_start(args, format);
SetErrorToGenericError();
Stream::Stream(uint32_t flags, uint32_t addr_size, ByteOrder byte_order,
bool colors)
: m_flags(flags), m_addr_size(addr_size), m_byte_order(byte_order),
- m_indent_level(0), m_forwarder(*this, colors) {}
+ m_forwarder(*this, colors) {}
Stream::Stream(bool colors)
: m_flags(0), m_byte_order(endian::InlHostByteOrder()),
// StringExtractor constructor
StringExtractor::StringExtractor() : m_packet() {}
-StringExtractor::StringExtractor(llvm::StringRef packet_str)
- : m_packet(), m_index(0) {
+StringExtractor::StringExtractor(llvm::StringRef packet_str) : m_packet() {
m_packet.assign(packet_str.begin(), packet_str.end());
}
-StringExtractor::StringExtractor(const char *packet_cstr)
- : m_packet(), m_index(0) {
+StringExtractor::StringExtractor(const char *packet_cstr) : m_packet() {
if (packet_cstr)
m_packet.assign(packet_cstr);
}
std::unique_ptr<lldb_private::Editline> _editline_sp;
PseudoTerminal _pty;
- int _pty_primary_fd;
- int _pty_secondary_fd;
+ int _pty_primary_fd = -1;
+ int _pty_secondary_fd = -1;
std::unique_ptr<FilePointer> _el_secondary_file;
};
EditlineAdapter::EditlineAdapter()
- : _editline_sp(), _pty(), _pty_primary_fd(-1), _pty_secondary_fd(-1),
- _el_secondary_file() {
+ : _editline_sp(), _pty(), _el_secondary_file() {
lldb_private::Status error;
// Open the first primary pty available.
class DummyFileSystem : public vfs::FileSystem {
int FSID; // used to produce UniqueIDs
- int FileID; // used to produce UniqueIDs
+ int FileID = 0; // used to produce UniqueIDs
std::string cwd;
std::map<std::string, vfs::Status> FilesAndDirs;
}
public:
- DummyFileSystem() : FSID(getNextFSID()), FileID(0) {}
+ DummyFileSystem() : FSID(getNextFSID()) {}
ErrorOr<vfs::Status> status(const Twine &Path) override {
std::map<std::string, vfs::Status>::iterator I =
class DummyStopInfo : public StopInfo {
public:
- DummyStopInfo(Thread &thread, uint64_t value)
- : StopInfo(thread, value), m_should_stop(true),
- m_stop_reason(eStopReasonBreakpoint) {}
+ DummyStopInfo(Thread &thread, uint64_t value) : StopInfo(thread, value) {}
bool ShouldStop(Event *event_ptr) override { return m_should_stop; }
StopReason GetStopReason() const override { return m_stop_reason; }
- bool m_should_stop;
- StopReason m_stop_reason;
+ bool m_should_stop = true;
+ StopReason m_stop_reason = eStopReasonBreakpoint;
};
class DummyProcessEventData : public Process::ProcessEventData {
public:
DummyProcessEventData(ProcessSP &process_sp, StateType state)
- : ProcessEventData(process_sp, state), m_should_stop_hit_count(0) {}
+ : ProcessEventData(process_sp, state) {}
bool ShouldStop(Event *event_ptr, bool &found_valid_stopinfo) override {
m_should_stop_hit_count++;
return false;
}
- int m_should_stop_hit_count;
+ int m_should_stop_hit_count = 0;
};
} // namespace