The majority of call sites are nullptr as the execution context.
Refactor OptionValueProperties to make the argument optional and
simplify all the callers.
// Get a property by exact name exists in this property collection, name can
// not be a path to a property path that refers to a property within a
// property
- virtual const Property *GetProperty(const ExecutionContext *exe_ctx,
-
- ConstString name) const;
-
- virtual const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
+ virtual const Property *
+ GetProperty(ConstString name,
+ const ExecutionContext *exe_ctx = nullptr) const;
- uint32_t idx) const;
+ virtual const Property *
+ GetPropertyAtIndex(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const {
+ return ProtectedGetPropertyAtIndex(idx);
+ }
// Property can be be a property path like
// "target.process.extra-startup-command"
llvm::StringRef property_path) const;
virtual lldb::OptionValueSP
- GetPropertyValueAtIndex(const ExecutionContext *exe_ctx, uint32_t idx) const;
+ GetPropertyValueAtIndex(uint32_t idx, const ExecutionContext *exe_ctx) const;
virtual lldb::OptionValueSP GetValueForKey(const ExecutionContext *exe_ctx,
ConstString key) const;
Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
llvm::StringRef path, llvm::StringRef value) override;
- OptionValueArch *
- GetPropertyAtIndexAsOptionValueArch(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueArch *GetPropertyAtIndexAsOptionValueArch(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- OptionValueLanguage *
- GetPropertyAtIndexAsOptionValueLanguage(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueLanguage *GetPropertyAtIndexAsOptionValueLanguage(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsLanguage(const ExecutionContext *exe_ctx,
- uint32_t idx, lldb::LanguageType lang);
+ bool SetPropertyAtIndexAsLanguage(uint32_t idx, lldb::LanguageType lang,
+ const ExecutionContext *exe_ctx = nullptr);
- bool GetPropertyAtIndexAsArgs(const ExecutionContext *exe_ctx, uint32_t idx,
- Args &args) const;
+ bool
+ GetPropertyAtIndexAsArgs(uint32_t idx, Args &args,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexFromArgs(const ExecutionContext *exe_ctx, uint32_t idx,
- const Args &args);
+ bool SetPropertyAtIndexFromArgs(uint32_t idx, const Args &args,
+ const ExecutionContext *exe_ctx = nullptr);
std::optional<bool>
- GetPropertyAtIndexAsBoolean(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ GetPropertyAtIndexAsBoolean(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsBoolean(const ExecutionContext *exe_ctx,
- uint32_t idx, bool new_value);
+ bool SetPropertyAtIndexAsBoolean(uint32_t idx, bool new_value,
+ const ExecutionContext *exe_ctx = nullptr);
- OptionValueDictionary *
- GetPropertyAtIndexAsOptionValueDictionary(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueDictionary *GetPropertyAtIndexAsOptionValueDictionary(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- std::optional<int64_t>
- GetPropertyAtIndexAsEnumeration(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ std::optional<int64_t> GetPropertyAtIndexAsEnumeration(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsEnumeration(const ExecutionContext *exe_ctx,
- uint32_t idx, int64_t new_value);
+ bool
+ SetPropertyAtIndexAsEnumeration(uint32_t idx, int64_t new_value,
+ const ExecutionContext *exe_ctx = nullptr);
const FormatEntity::Entry *
- GetPropertyAtIndexAsFormatEntity(const ExecutionContext *exe_ctx,
- uint32_t idx);
+ GetPropertyAtIndexAsFormatEntity(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr);
- const RegularExpression *
- GetPropertyAtIndexAsOptionValueRegex(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ const RegularExpression *GetPropertyAtIndexAsOptionValueRegex(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- OptionValueSInt64 *
- GetPropertyAtIndexAsOptionValueSInt64(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueSInt64 *GetPropertyAtIndexAsOptionValueSInt64(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- OptionValueUInt64 *
- GetPropertyAtIndexAsOptionValueUInt64(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueUInt64 *GetPropertyAtIndexAsOptionValueUInt64(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
std::optional<int64_t>
- GetPropertyAtIndexAsSInt64(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ GetPropertyAtIndexAsSInt64(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsSInt64(const ExecutionContext *exe_ctx, uint32_t idx,
- int64_t new_value);
+ bool SetPropertyAtIndexAsSInt64(uint32_t idx, int64_t new_value,
+ const ExecutionContext *exe_ctx = nullptr);
std::optional<uint64_t>
- GetPropertyAtIndexAsUInt64(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ GetPropertyAtIndexAsUInt64(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsUInt64(const ExecutionContext *exe_ctx, uint32_t idx,
- uint64_t new_value);
+ bool SetPropertyAtIndexAsUInt64(uint32_t idx, uint64_t new_value,
+ const ExecutionContext *exe_ctx = nullptr);
std::optional<llvm::StringRef>
- GetPropertyAtIndexAsString(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ GetPropertyAtIndexAsString(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsString(const ExecutionContext *exe_ctx, uint32_t idx,
- llvm::StringRef new_value);
+ bool SetPropertyAtIndexAsString(uint32_t idx, llvm::StringRef new_value,
+ const ExecutionContext *exe_ctx = nullptr);
- OptionValueString *
- GetPropertyAtIndexAsOptionValueString(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueString *GetPropertyAtIndexAsOptionValueString(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- OptionValueFileSpec *
- GetPropertyAtIndexAsOptionValueFileSpec(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueFileSpec *GetPropertyAtIndexAsOptionValueFileSpec(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- FileSpec GetPropertyAtIndexAsFileSpec(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ FileSpec
+ GetPropertyAtIndexAsFileSpec(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const;
- bool SetPropertyAtIndexAsFileSpec(const ExecutionContext *exe_ctx,
- uint32_t idx, const FileSpec &file_spec);
+ bool SetPropertyAtIndexAsFileSpec(uint32_t idx, const FileSpec &file_spec,
+ const ExecutionContext *exe_ctx = nullptr);
- OptionValuePathMappings *
- GetPropertyAtIndexAsOptionValuePathMappings(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValuePathMappings *GetPropertyAtIndexAsOptionValuePathMappings(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
- OptionValueFileSpecList *
- GetPropertyAtIndexAsOptionValueFileSpecList(const ExecutionContext *exe_ctx,
- uint32_t idx) const;
+ OptionValueFileSpecList *GetPropertyAtIndexAsOptionValueFileSpecList(
+ uint32_t idx, const ExecutionContext *exe_ctx = nullptr) const;
void AppendProperty(ConstString name, llvm::StringRef desc, bool is_global,
const lldb::OptionValueSP &value_sp);
bool Debugger::GetAutoConfirm() const {
const uint32_t idx = ePropertyAutoConfirm;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
const FormatEntity::Entry *Debugger::GetDisassemblyFormat() const {
const uint32_t idx = ePropertyDisassemblyFormat;
- return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
}
const FormatEntity::Entry *Debugger::GetFrameFormat() const {
const uint32_t idx = ePropertyFrameFormat;
- return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
}
const FormatEntity::Entry *Debugger::GetFrameFormatUnique() const {
const uint32_t idx = ePropertyFrameFormatUnique;
- return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
}
uint32_t Debugger::GetStopDisassemblyMaxSize() const {
const uint32_t idx = ePropertyStopDisassemblyMaxSize;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
bool Debugger::GetNotifyVoid() const {
const uint32_t idx = ePropertyNotiftVoid;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
llvm::StringRef Debugger::GetPrompt() const {
const uint32_t idx = ePropertyPrompt;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
void Debugger::SetPrompt(llvm::StringRef p) {
const uint32_t idx = ePropertyPrompt;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, p);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, p);
llvm::StringRef new_prompt = GetPrompt();
std::string str =
lldb_private::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
const FormatEntity::Entry *Debugger::GetThreadFormat() const {
const uint32_t idx = ePropertyThreadFormat;
- return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
}
const FormatEntity::Entry *Debugger::GetThreadStopFormat() const {
const uint32_t idx = ePropertyThreadStopFormat;
- return m_collection_sp->GetPropertyAtIndexAsFormatEntity(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFormatEntity(idx);
}
lldb::ScriptLanguage Debugger::GetScriptLanguage() const {
const uint32_t idx = ePropertyScriptLanguage;
return (lldb::ScriptLanguage)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_debugger_properties[idx].default_uint_value);
}
bool Debugger::SetScriptLanguage(lldb::ScriptLanguage script_lang) {
const uint32_t idx = ePropertyScriptLanguage;
- return m_collection_sp->SetPropertyAtIndexAsEnumeration(nullptr, idx,
- script_lang);
+ return m_collection_sp->SetPropertyAtIndexAsEnumeration(idx, script_lang);
}
lldb::LanguageType Debugger::GetREPLLanguage() const {
const uint32_t idx = ePropertyREPLLanguage;
OptionValueLanguage *value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(nullptr, idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(idx);
if (value)
return value->GetCurrentValue();
return LanguageType();
bool Debugger::SetREPLLanguage(lldb::LanguageType repl_lang) {
const uint32_t idx = ePropertyREPLLanguage;
- return m_collection_sp->SetPropertyAtIndexAsLanguage(nullptr, idx, repl_lang);
+ return m_collection_sp->SetPropertyAtIndexAsLanguage(idx, repl_lang);
}
uint32_t Debugger::GetTerminalWidth() const {
const uint32_t idx = ePropertyTerminalWidth;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
bool Debugger::SetTerminalWidth(uint32_t term_width) {
handler_sp->TerminalSizeChanged();
const uint32_t idx = ePropertyTerminalWidth;
- return m_collection_sp->SetPropertyAtIndexAsSInt64(nullptr, idx, term_width);
+ return m_collection_sp->SetPropertyAtIndexAsSInt64(idx, term_width);
}
bool Debugger::GetUseExternalEditor() const {
const uint32_t idx = ePropertyUseExternalEditor;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetUseExternalEditor(bool b) {
const uint32_t idx = ePropertyUseExternalEditor;
- return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
llvm::StringRef Debugger::GetExternalEditor() const {
const uint32_t idx = ePropertyExternalEditor;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
bool Debugger::SetExternalEditor(llvm::StringRef editor) {
const uint32_t idx = ePropertyExternalEditor;
- return m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, editor);
+ return m_collection_sp->SetPropertyAtIndexAsString(idx, editor);
}
bool Debugger::GetUseColor() const {
const uint32_t idx = ePropertyUseColor;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetUseColor(bool b) {
const uint32_t idx = ePropertyUseColor;
- bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
SetPrompt(GetPrompt());
return ret;
}
bool Debugger::GetShowProgress() const {
const uint32_t idx = ePropertyShowProgress;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetShowProgress(bool show_progress) {
const uint32_t idx = ePropertyShowProgress;
- return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx,
- show_progress);
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, show_progress);
}
llvm::StringRef Debugger::GetShowProgressAnsiPrefix() const {
const uint32_t idx = ePropertyShowProgressAnsiPrefix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
llvm::StringRef Debugger::GetShowProgressAnsiSuffix() const {
const uint32_t idx = ePropertyShowProgressAnsiSuffix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
bool Debugger::GetUseAutosuggestion() const {
const uint32_t idx = ePropertyShowAutosuggestion;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
llvm::StringRef Debugger::GetAutosuggestionAnsiPrefix() const {
const uint32_t idx = ePropertyShowAutosuggestionAnsiPrefix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
llvm::StringRef Debugger::GetAutosuggestionAnsiSuffix() const {
const uint32_t idx = ePropertyShowAutosuggestionAnsiSuffix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
bool Debugger::GetUseSourceCache() const {
const uint32_t idx = ePropertyUseSourceCache;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetUseSourceCache(bool b) {
const uint32_t idx = ePropertyUseSourceCache;
- bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
if (!ret) {
m_source_file_cache.Clear();
}
}
bool Debugger::GetHighlightSource() const {
const uint32_t idx = ePropertyHighlightSource;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
StopShowColumn Debugger::GetStopShowColumn() const {
const uint32_t idx = ePropertyStopShowColumn;
return (lldb::StopShowColumn)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_debugger_properties[idx].default_uint_value);
}
llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix() const {
const uint32_t idx = ePropertyStopShowColumnAnsiPrefix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
llvm::StringRef Debugger::GetStopShowColumnAnsiSuffix() const {
const uint32_t idx = ePropertyStopShowColumnAnsiSuffix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
llvm::StringRef Debugger::GetStopShowLineMarkerAnsiPrefix() const {
const uint32_t idx = ePropertyStopShowLineMarkerAnsiPrefix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
llvm::StringRef Debugger::GetStopShowLineMarkerAnsiSuffix() const {
const uint32_t idx = ePropertyStopShowLineMarkerAnsiSuffix;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_debugger_properties[idx].default_cstr_value);
}
uint32_t Debugger::GetStopSourceLineCount(bool before) const {
const uint32_t idx =
before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
Debugger::StopDisassemblyType Debugger::GetStopDisassemblyDisplay() const {
const uint32_t idx = ePropertyStopDisassemblyDisplay;
return (Debugger::StopDisassemblyType)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_debugger_properties[idx].default_uint_value);
}
uint32_t Debugger::GetDisassemblyLineCount() const {
const uint32_t idx = ePropertyStopDisassemblyCount;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
bool Debugger::GetAutoOneLineSummaries() const {
const uint32_t idx = ePropertyAutoOneLineSummaries;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::GetEscapeNonPrintables() const {
const uint32_t idx = ePropertyEscapeNonPrintables;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::GetAutoIndent() const {
const uint32_t idx = ePropertyAutoIndent;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetAutoIndent(bool b) {
const uint32_t idx = ePropertyAutoIndent;
- return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool Debugger::GetPrintDecls() const {
const uint32_t idx = ePropertyPrintDecls;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_debugger_properties[idx].default_uint_value != 0);
}
bool Debugger::SetPrintDecls(bool b) {
const uint32_t idx = ePropertyPrintDecls;
- return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
uint32_t Debugger::GetTabSize() const {
const uint32_t idx = ePropertyTabSize;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_debugger_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_debugger_properties[idx].default_uint_value);
}
bool Debugger::SetTabSize(uint32_t tab_size) {
const uint32_t idx = ePropertyTabSize;
- return m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, tab_size);
+ return m_collection_sp->SetPropertyAtIndexAsUInt64(idx, tab_size);
}
lldb::DWIMPrintVerbosity Debugger::GetDWIMPrintVerbosity() const {
const uint32_t idx = ePropertyDWIMPrintVerbosity;
return (lldb::DWIMPrintVerbosity)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_debugger_properties[idx].default_uint_value);
}
}
OptionValueSInt64 *term_width =
m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64(
- nullptr, ePropertyTerminalWidth);
+ ePropertyTerminalWidth);
term_width->SetMinimumValue(10);
term_width->SetMaximumValue(1024);
bool Debugger::InterruptRequested() {
// This is the one we should call internally. This will return true either
- // if there's a debugger interrupt and we aren't on the IOHandler thread,
+ // if there's a debugger interrupt and we aren't on the IOHandler thread,
// or if we are on the IOHandler thread and there's a CommandInterpreter
// interrupt.
if (!IsIOHandlerThreadCurrentThread()) {
}
bool Debugger::HasIOHandlerThread() const {
- return m_io_handler_thread.IsJoinable();
+ return m_io_handler_thread.IsJoinable();
}
HostThread Debugger::SetIOHandlerThread(HostThread &new_thread) {
bool ModuleListProperties::GetEnableExternalLookup() const {
const uint32_t idx = ePropertyEnableExternalLookup;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value != 0);
}
bool ModuleListProperties::SetEnableExternalLookup(bool new_value) {
return m_collection_sp->SetPropertyAtIndexAsBoolean(
- nullptr, ePropertyEnableExternalLookup, new_value);
+ ePropertyEnableExternalLookup, new_value);
}
bool ModuleListProperties::GetEnableBackgroundLookup() const {
const uint32_t idx = ePropertyEnableBackgroundLookup;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value != 0);
}
FileSpec ModuleListProperties::GetClangModulesCachePath() const {
return m_collection_sp
- ->GetPropertyAtIndexAsOptionValueFileSpec(nullptr,
- ePropertyClangModulesCachePath)
+ ->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyClangModulesCachePath)
->GetCurrentValue();
}
bool ModuleListProperties::SetClangModulesCachePath(const FileSpec &path) {
return m_collection_sp->SetPropertyAtIndexAsFileSpec(
- nullptr, ePropertyClangModulesCachePath, path);
+ ePropertyClangModulesCachePath, path);
}
FileSpec ModuleListProperties::GetLLDBIndexCachePath() const {
return m_collection_sp
- ->GetPropertyAtIndexAsOptionValueFileSpec(nullptr,
- ePropertyLLDBIndexCachePath)
+ ->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyLLDBIndexCachePath)
->GetCurrentValue();
}
bool ModuleListProperties::SetLLDBIndexCachePath(const FileSpec &path) {
return m_collection_sp->SetPropertyAtIndexAsFileSpec(
- nullptr, ePropertyLLDBIndexCachePath, path);
+ ePropertyLLDBIndexCachePath, path);
}
bool ModuleListProperties::GetEnableLLDBIndexCache() const {
const uint32_t idx = ePropertyEnableLLDBIndexCache;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value != 0);
}
bool ModuleListProperties::SetEnableLLDBIndexCache(bool new_value) {
return m_collection_sp->SetPropertyAtIndexAsBoolean(
- nullptr, ePropertyEnableLLDBIndexCache, new_value);
+ ePropertyEnableLLDBIndexCache, new_value);
}
uint64_t ModuleListProperties::GetLLDBIndexCacheMaxByteSize() {
const uint32_t idx = ePropertyLLDBIndexCacheMaxByteSize;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value);
}
uint64_t ModuleListProperties::GetLLDBIndexCacheMaxPercent() {
const uint32_t idx = ePropertyLLDBIndexCacheMaxPercent;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value);
}
uint64_t ModuleListProperties::GetLLDBIndexCacheExpirationDays() {
const uint32_t idx = ePropertyLLDBIndexCacheExpirationDays;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value);
}
void ModuleListProperties::UpdateSymlinkMappings() {
- FileSpecList list = m_collection_sp
- ->GetPropertyAtIndexAsOptionValueFileSpecList(
- nullptr, ePropertySymLinkPaths)
- ->GetCurrentValue();
+ FileSpecList list =
+ m_collection_sp
+ ->GetPropertyAtIndexAsOptionValueFileSpecList(ePropertySymLinkPaths)
+ ->GetCurrentValue();
llvm::sys::ScopedWriter lock(m_symlink_paths_mutex);
const bool notify = false;
m_symlink_paths.Clear(notify);
bool ModuleListProperties::GetLoadSymbolOnDemand() {
const uint32_t idx = ePropertyLoadSymbolOnDemand;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_modulelist_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_modulelist_properties[idx].default_uint_value != 0);
}
ModuleList::ModuleList() : m_modules(), m_modules_mutex() {}
bool CommandInterpreter::GetExpandRegexAliases() const {
const uint32_t idx = ePropertyExpandRegexAliases;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetPromptOnQuit() const {
const uint32_t idx = ePropertyPromptOnQuit;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetPromptOnQuit(bool enable) {
const uint32_t idx = ePropertyPromptOnQuit;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
}
bool CommandInterpreter::GetSaveSessionOnQuit() const {
const uint32_t idx = ePropertySaveSessionOnQuit;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetSaveSessionOnQuit(bool enable) {
const uint32_t idx = ePropertySaveSessionOnQuit;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
}
bool CommandInterpreter::GetOpenTranscriptInEditor() const {
const uint32_t idx = ePropertyOpenTranscriptInEditor;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetOpenTranscriptInEditor(bool enable) {
const uint32_t idx = ePropertyOpenTranscriptInEditor;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
}
FileSpec CommandInterpreter::GetSaveSessionDirectory() const {
const uint32_t idx = ePropertySaveSessionDirectory;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
void CommandInterpreter::SetSaveSessionDirectory(llvm::StringRef path) {
const uint32_t idx = ePropertySaveSessionDirectory;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, path);
}
bool CommandInterpreter::GetEchoCommands() const {
const uint32_t idx = ePropertyEchoCommands;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetEchoCommands(bool enable) {
const uint32_t idx = ePropertyEchoCommands;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
}
bool CommandInterpreter::GetEchoCommentCommands() const {
const uint32_t idx = ePropertyEchoCommentCommands;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::SetEchoCommentCommands(bool enable) {
const uint32_t idx = ePropertyEchoCommentCommands;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, enable);
}
void CommandInterpreter::AllowExitCodeOnQuit(bool allow) {
bool CommandInterpreter::GetStopCmdSourceOnError() const {
const uint32_t idx = ePropertyStopCmdSourceOnError;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetSpaceReplPrompts() const {
const uint32_t idx = ePropertySpaceReplPrompts;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetRepeatPreviousCommand() const {
const uint32_t idx = ePropertyRepeatPreviousCommand;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
bool CommandInterpreter::GetRequireCommandOverwrite() const {
const uint32_t idx = ePropertyRequireCommandOverwrite;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_interpreter_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_interpreter_properties[idx].default_uint_value != 0);
}
void CommandInterpreter::Initialize() {
return nullptr;
}
llvm::StringRef arg_text = entry.ref();
- if (strpos - start_fudge + arg_text.size() + len_fudge
- > raw_input_string.size()) {
+ if (strpos - start_fudge + arg_text.size() + len_fudge >
+ raw_input_string.size()) {
result.AppendError("Unmatched quote at command end.");
- return nullptr;
+ return nullptr;
}
raw_input_string = raw_input_string.erase(
- strpos - start_fudge,
+ strpos - start_fudge,
strlen(cmd_args.GetArgumentAtIndex(index)) + len_fudge);
}
if (quote_char == '\0')
result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
else
- result_str.Printf("%c%s%c", quote_char,
- entry.c_str(), quote_char);
+ result_str.Printf("%c%s%c", quote_char, entry.c_str(), quote_char);
}
}
command.insert(start_backtick, std::string(expr_str));
pos = start_backtick + expr_str.size();
}
- return error;
+ return error;
}
Status
expr_result_valobj_sp->GetQualifiedRepresentationIfAvailable(
expr_result_valobj_sp->GetDynamicValueType(), true);
if (expr_result_valobj_sp->ResolveValue(scalar)) {
-
+
StreamString value_strm;
const bool show_type = false;
scalar.GetValue(&value_strm, show_type);
CommandObject *cmd_obj = ResolveCommandImpl(command_string, result);
- // We have to preprocess the whole command string for Raw commands, since we
+ // We have to preprocess the whole command string for Raw commands, since we
// don't know the structure of the command. For parsed commands, we only
// treat backticks as quote characters specially.
// FIXME: We probably want to have raw commands do their own preprocessing.
- // For instance, I don't think people expect substitution in expr expressions.
+ // For instance, I don't think people expect substitution in expr expressions.
if (cmd_obj && cmd_obj->WantsRawCommandString()) {
Status error(PreprocessCommand(command_string));
// If the current thread is not managed by a host thread, we won't detect
// that this IS the CommandInterpreter IOHandler thread, so make it so:
HostThread new_io_handler_thread(Host::GetCurrentThread());
- HostThread old_io_handler_thread
- = m_debugger.SetIOHandlerThread(new_io_handler_thread);
+ HostThread old_io_handler_thread =
+ m_debugger.SetIOHandlerThread(new_io_handler_thread);
m_debugger.RunIOHandlers();
m_debugger.SetIOHandlerThread(old_io_handler_thread);
for (const auto &definition : defs) {
Property property(definition);
assert(property.IsValid());
- m_name_to_index.Append(ConstString(property.GetName()), m_properties.size());
+ m_name_to_index.Append(ConstString(property.GetName()),
+ m_properties.size());
property.GetValue()->SetParent(shared_from_this());
m_properties.push_back(property);
}
lldb::OptionValueSP value_sp;
size_t idx = m_name_to_index.Find(key, SIZE_MAX);
if (idx < m_properties.size())
- value_sp = GetPropertyAtIndex(exe_ctx, idx)->GetValue();
+ value_sp = GetPropertyAtIndex(idx, exe_ctx)->GetValue();
return value_sp;
}
// Don't set an error if the path contained .experimental. - those are
// allowed to be missing and should silently fail.
if (!name_contains_experimental && error.AsCString() == nullptr) {
- error.SetErrorStringWithFormat("invalid value path '%s'", name.str().c_str());
+ error.SetErrorStringWithFormat("invalid value path '%s'",
+ name.str().c_str());
}
}
return error;
}
-uint32_t
-OptionValueProperties::GetPropertyIndex(ConstString name) const {
+uint32_t OptionValueProperties::GetPropertyIndex(ConstString name) const {
return m_name_to_index.Find(name, SIZE_MAX);
}
const Property *
-OptionValueProperties::GetProperty(const ExecutionContext *exe_ctx,
-
- ConstString name) const {
- return GetPropertyAtIndex(exe_ctx, m_name_to_index.Find(name, SIZE_MAX));
+OptionValueProperties::GetProperty(ConstString name,
+ const ExecutionContext *exe_ctx) const {
+ return GetPropertyAtIndex(m_name_to_index.Find(name, SIZE_MAX), exe_ctx);
}
-const Property *
-OptionValueProperties::GetPropertyAtIndex(const ExecutionContext *exe_ctx,
- uint32_t idx) const {
- return ProtectedGetPropertyAtIndex(idx);
-}
-
-lldb::OptionValueSP
-OptionValueProperties::GetPropertyValueAtIndex(const ExecutionContext *exe_ctx,
- uint32_t idx) const {
- const Property *setting = GetPropertyAtIndex(exe_ctx, idx);
+lldb::OptionValueSP OptionValueProperties::GetPropertyValueAtIndex(
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *setting = GetPropertyAtIndex(idx, exe_ctx);
if (setting)
return setting->GetValue();
return OptionValueSP();
OptionValuePathMappings *
OptionValueProperties::GetPropertyAtIndexAsOptionValuePathMappings(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
if (value_sp)
return value_sp->GetAsPathMappings();
return nullptr;
OptionValueFileSpecList *
OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpecList(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
if (value_sp)
return value_sp->GetAsFileSpecList();
return nullptr;
}
OptionValueArch *OptionValueProperties::GetPropertyAtIndexAsOptionValueArch(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property)
return property->GetValue()->GetAsArch();
return nullptr;
OptionValueLanguage *
OptionValueProperties::GetPropertyAtIndexAsOptionValueLanguage(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property)
return property->GetValue()->GetAsLanguage();
return nullptr;
}
bool OptionValueProperties::SetPropertyAtIndexAsLanguage(
- const ExecutionContext *exe_ctx, uint32_t idx, const LanguageType lang) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const LanguageType lang, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
bool OptionValueProperties::GetPropertyAtIndexAsArgs(
- const ExecutionContext *exe_ctx, uint32_t idx, Args &args) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, Args &args, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (!property)
return false;
}
bool OptionValueProperties::SetPropertyAtIndexFromArgs(
- const ExecutionContext *exe_ctx, uint32_t idx, const Args &args) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const Args &args, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (!property)
return false;
}
std::optional<bool> OptionValueProperties::GetPropertyAtIndexAsBoolean(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
if (OptionValue *value = property->GetValue().get())
return value->GetBooleanValue();
}
}
bool OptionValueProperties::SetPropertyAtIndexAsBoolean(
- const ExecutionContext *exe_ctx, uint32_t idx, bool new_value) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, bool new_value, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value) {
OptionValueDictionary *
OptionValueProperties::GetPropertyAtIndexAsOptionValueDictionary(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property)
return property->GetValue()->GetAsDictionary();
return nullptr;
}
std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsEnumeration(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
if (OptionValue *value = property->GetValue().get())
return value->GetEnumerationValue();
}
}
bool OptionValueProperties::SetPropertyAtIndexAsEnumeration(
- const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, int64_t new_value, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
const FormatEntity::Entry *
OptionValueProperties::GetPropertyAtIndexAsFormatEntity(
- const ExecutionContext *exe_ctx, uint32_t idx) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
OptionValueFileSpec *
OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpec(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
FileSpec OptionValueProperties::GetPropertyAtIndexAsFileSpec(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
bool OptionValueProperties::SetPropertyAtIndexAsFileSpec(
- const ExecutionContext *exe_ctx, uint32_t idx,
- const FileSpec &new_file_spec) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const FileSpec &new_file_spec,
+ const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
const RegularExpression *
OptionValueProperties::GetPropertyAtIndexAsOptionValueRegex(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
OptionValueSInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueSInt64(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
OptionValueUInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueUInt64(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
std::optional<int64_t> OptionValueProperties::GetPropertyAtIndexAsSInt64(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
if (OptionValue *value = property->GetValue().get())
return value->GetSInt64Value();
}
}
bool OptionValueProperties::SetPropertyAtIndexAsSInt64(
- const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, int64_t new_value, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
std::optional<llvm::StringRef>
OptionValueProperties::GetPropertyAtIndexAsString(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
if (OptionValue *value = property->GetValue().get())
return value->GetStringValue();
}
}
bool OptionValueProperties::SetPropertyAtIndexAsString(
- const ExecutionContext *exe_ctx, uint32_t idx, llvm::StringRef new_value) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, llvm::StringRef new_value, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
}
OptionValueString *OptionValueProperties::GetPropertyAtIndexAsOptionValueString(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, idx));
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ OptionValueSP value_sp(GetPropertyValueAtIndex(idx, exe_ctx));
if (value_sp)
return value_sp->GetAsString();
return nullptr;
}
std::optional<uint64_t> OptionValueProperties::GetPropertyAtIndexAsUInt64(
- const ExecutionContext *exe_ctx, uint32_t idx) const {
- if (const Property *property = GetPropertyAtIndex(exe_ctx, idx)) {
+ uint32_t idx, const ExecutionContext *exe_ctx) const {
+ if (const Property *property = GetPropertyAtIndex(idx, exe_ctx)) {
if (OptionValue *value = property->GetValue().get())
return value->GetUInt64Value();
}
}
bool OptionValueProperties::SetPropertyAtIndexAsUInt64(
- const ExecutionContext *exe_ctx, uint32_t idx, uint64_t new_value) {
- const Property *property = GetPropertyAtIndex(exe_ctx, idx);
+ uint32_t idx, uint64_t new_value, const ExecutionContext *exe_ctx) {
+ const Property *property = GetPropertyAtIndex(idx, exe_ctx);
if (property) {
OptionValue *value = property->GetValue().get();
if (value)
Stream &strm, uint32_t dump_mask) {
const size_t num_properties = m_properties.size();
for (size_t i = 0; i < num_properties; ++i) {
- const Property *property = GetPropertyAtIndex(exe_ctx, i);
+ const Property *property = GetPropertyAtIndex(i, exe_ctx);
if (property) {
OptionValue *option_value = property->GetValue().get();
assert(option_value);
llvm::json::Object json_properties;
const size_t num_properties = m_properties.size();
for (size_t i = 0; i < num_properties; ++i) {
- const Property *property = GetPropertyAtIndex(exe_ctx, i);
+ const Property *property = GetPropertyAtIndex(i, exe_ctx);
if (property) {
OptionValue *option_value = property->GetValue().get();
assert(option_value);
Status OptionValueProperties::DumpPropertyValue(const ExecutionContext *exe_ctx,
Stream &strm,
llvm::StringRef property_path,
- uint32_t dump_mask, bool is_json) {
+ uint32_t dump_mask,
+ bool is_json) {
Status error;
lldb::OptionValueSP value_sp(GetSubValue(exe_ctx, property_path, error));
if (value_sp) {
strm.PutChar(' ');
}
if (is_json) {
- strm.Printf("%s", llvm::formatv("{0:2}", value_sp->ToJSON(exe_ctx)).str().c_str());
+ strm.Printf(
+ "%s",
+ llvm::formatv("{0:2}", value_sp->ToJSON(exe_ctx)).str().c_str());
} else
value_sp->DumpValue(exe_ctx, strm, dump_mask);
}
} else
key.SetString(name);
- property = GetProperty(exe_ctx, key);
+ property = GetProperty(key, exe_ctx);
if (sub_name.empty() || !property)
return property;
bool GetLoadKexts() const {
const uint32_t idx = ePropertyLoadKexts;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(
- g_dynamicloaderdarwinkernel_properties[idx].default_uint_value !=
- 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_dynamicloaderdarwinkernel_properties[idx].default_uint_value != 0);
}
KASLRScanType GetScanType() const {
const uint32_t idx = ePropertyScanType;
- return (KASLRScanType)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ return (KASLRScanType)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
.value_or(
g_dynamicloaderdarwinkernel_properties[idx].default_uint_value);
}
EnableJITLoaderGDB GetEnable() const {
return (EnableJITLoaderGDB)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, ePropertyEnable)
+ ->GetPropertyAtIndexAsEnumeration(ePropertyEnable)
.value_or(
g_jitloadergdb_properties[ePropertyEnable].default_uint_value);
}
llvm::Triple::EnvironmentType ABI() const {
return (llvm::Triple::EnvironmentType)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, ePropertyABI)
+ ->GetPropertyAtIndexAsEnumeration(ePropertyABI)
.value_or(llvm::Triple::UnknownEnvironment);
}
OptionValueDictionary *ModuleABIMap() const {
return m_collection_sp->GetPropertyAtIndexAsOptionValueDictionary(
- nullptr, ePropertyModuleABIMap);
+ ePropertyModuleABIMap);
}
};
const char *GetIgnoredExceptions() const {
const uint32_t idx = ePropertyIgnoredExceptions;
const OptionValueString *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueString(nullptr, idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueString(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
OptionValueString *GetIgnoredExceptionValue() {
const uint32_t idx = ePropertyIgnoredExceptions;
OptionValueString *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueString(nullptr, idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueString(idx);
assert(option_value);
return option_value;
}
FileSpecList GetKextDirectories() const {
const uint32_t idx = ePropertyKextDirectories;
const OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
}
llvm::StringRef GetArchitecture() {
- return m_collection_sp
- ->GetPropertyAtIndexAsString(nullptr, ePropertyArchitecture)
+ return m_collection_sp->GetPropertyAtIndexAsString(ePropertyArchitecture)
.value_or("");
}
FileSpec GetEmulatorPath() {
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr,
- ePropertyEmulatorPath);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(ePropertyEmulatorPath);
}
Args GetEmulatorArgs() {
Args result;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEmulatorArgs,
- result);
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEmulatorArgs, result);
return result;
}
Environment GetEmulatorEnvVars() {
Args args;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEmulatorEnvVars,
- args);
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEmulatorEnvVars, args);
return Environment(args);
}
Environment GetTargetEnvVars() {
Args args;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyTargetEnvVars,
- args);
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyTargetEnvVars, args);
return Environment(args);
}
};
uint64_t GetPacketTimeout() {
const uint32_t idx = ePropertyKDPPacketTimeout;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(NULL, idx).value_or(
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
g_processkdp_properties[idx].default_uint_value);
}
};
uint64_t GetPacketTimeout() {
const uint32_t idx = ePropertyPacketTimeout;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_processgdbremote_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_processgdbremote_properties[idx].default_uint_value);
}
bool SetPacketTimeout(uint64_t timeout) {
const uint32_t idx = ePropertyPacketTimeout;
- return m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, timeout);
+ return m_collection_sp->SetPropertyAtIndexAsUInt64(idx, timeout);
}
FileSpec GetTargetDefinitionFile() const {
const uint32_t idx = ePropertyTargetDefinitionFile;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
bool GetUseSVR4() const {
const uint32_t idx = ePropertyUseSVR4;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_processgdbremote_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_processgdbremote_properties[idx].default_uint_value != 0);
}
bool GetUseGPacketForReading() const {
const uint32_t idx = ePropertyUseGPacketForReading;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(true);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(true);
}
};
bool GetEnableOnStartup() const {
const uint32_t idx = ePropertyEnableOnStartup;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_darwinlog_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_darwinlog_properties[idx].default_uint_value != 0);
}
llvm::StringRef GetAutoEnableOptions() const {
const uint32_t idx = ePropertyAutoEnableOptions;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_darwinlog_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_darwinlog_properties[idx].default_cstr_value);
}
const char *GetLoggingModuleName() const { return "libsystem_trace.dylib"; }
}
bool IgnoreFileIndexes() const {
- return m_collection_sp
- ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyIgnoreIndexes)
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyIgnoreIndexes)
.value_or(false);
}
};
bool PlatformProperties::GetUseModuleCache() const {
const auto idx = ePropertyUseModuleCache;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_platform_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_platform_properties[idx].default_uint_value != 0);
}
bool PlatformProperties::SetUseModuleCache(bool use_module_cache) {
- return m_collection_sp->SetPropertyAtIndexAsBoolean(
- nullptr, ePropertyUseModuleCache, use_module_cache);
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(ePropertyUseModuleCache,
+ use_module_cache);
}
FileSpec PlatformProperties::GetModuleCacheDirectory() const {
return m_collection_sp->GetPropertyAtIndexAsFileSpec(
- nullptr, ePropertyModuleCacheDirectory);
+ ePropertyModuleCacheDirectory);
}
bool PlatformProperties::SetModuleCacheDirectory(const FileSpec &dir_spec) {
return m_collection_sp->SetPropertyAtIndexAsFileSpec(
- nullptr, ePropertyModuleCacheDirectory, dir_spec);
+ ePropertyModuleCacheDirectory, dir_spec);
}
void PlatformProperties::SetDefaultModuleCacheDirectory(
const FileSpec &dir_spec) {
auto f_spec_opt = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(
- nullptr, ePropertyModuleCacheDirectory);
+ ePropertyModuleCacheDirectory);
assert(f_spec_opt);
f_spec_opt->SetDefaultValue(dir_spec);
}
public:
ProcessOptionValueProperties(ConstString name) : Cloneable(name) {}
- const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
- uint32_t idx) const override {
+ const Property *
+ GetPropertyAtIndex(uint32_t idx,
+ const ExecutionContext *exe_ctx) const override {
// When getting the value for a key from the process options, we will
// always try and grab the setting from the current process if there is
// one. Else we just use the one from this instance.
bool ProcessProperties::GetDisableMemoryCache() const {
const uint32_t idx = ePropertyDisableMemCache;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
uint64_t ProcessProperties::GetMemoryCacheLineSize() const {
const uint32_t idx = ePropertyMemCacheLineSize;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_process_properties[idx].default_uint_value);
}
Args ProcessProperties::GetExtraStartupCommands() const {
Args args;
const uint32_t idx = ePropertyExtraStartCommand;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+ m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
return args;
}
void ProcessProperties::SetExtraStartupCommands(const Args &args) {
const uint32_t idx = ePropertyExtraStartCommand;
- m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+ m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
}
FileSpec ProcessProperties::GetPythonOSPluginPath() const {
const uint32_t idx = ePropertyPythonOSPluginPath;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
uint32_t ProcessProperties::GetVirtualAddressableBits() const {
const uint32_t idx = ePropertyVirtualAddressableBits;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_process_properties[idx].default_uint_value);
}
void ProcessProperties::SetVirtualAddressableBits(uint32_t bits) {
const uint32_t idx = ePropertyVirtualAddressableBits;
- m_collection_sp->SetPropertyAtIndexAsUInt64(nullptr, idx, bits);
+ m_collection_sp->SetPropertyAtIndexAsUInt64(idx, bits);
}
void ProcessProperties::SetPythonOSPluginPath(const FileSpec &file) {
const uint32_t idx = ePropertyPythonOSPluginPath;
- m_collection_sp->SetPropertyAtIndexAsFileSpec(nullptr, idx, file);
+ m_collection_sp->SetPropertyAtIndexAsFileSpec(idx, file);
}
bool ProcessProperties::GetIgnoreBreakpointsInExpressions() const {
const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
void ProcessProperties::SetIgnoreBreakpointsInExpressions(bool ignore) {
const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, ignore);
}
bool ProcessProperties::GetUnwindOnErrorInExpressions() const {
const uint32_t idx = ePropertyUnwindOnErrorInExpressions;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
void ProcessProperties::SetUnwindOnErrorInExpressions(bool ignore) {
const uint32_t idx = ePropertyUnwindOnErrorInExpressions;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, ignore);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, ignore);
}
bool ProcessProperties::GetStopOnSharedLibraryEvents() const {
const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
void ProcessProperties::SetStopOnSharedLibraryEvents(bool stop) {
const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, stop);
}
bool ProcessProperties::GetDisableLangRuntimeUnwindPlans() const {
const uint32_t idx = ePropertyDisableLangRuntimeUnwindPlans;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
void ProcessProperties::SetDisableLangRuntimeUnwindPlans(bool disable) {
const uint32_t idx = ePropertyDisableLangRuntimeUnwindPlans;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, disable);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, disable);
m_process->Flush();
}
bool ProcessProperties::GetDetachKeepsStopped() const {
const uint32_t idx = ePropertyDetachKeepsStopped;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
void ProcessProperties::SetDetachKeepsStopped(bool stop) {
const uint32_t idx = ePropertyDetachKeepsStopped;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, stop);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, stop);
}
bool ProcessProperties::GetWarningsOptimization() const {
const uint32_t idx = ePropertyWarningOptimization;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
bool ProcessProperties::GetWarningsUnsupportedLanguage() const {
const uint32_t idx = ePropertyWarningUnsupportedLanguage;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
bool ProcessProperties::GetStopOnExec() const {
const uint32_t idx = ePropertyStopOnExec;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
std::chrono::seconds ProcessProperties::GetUtilityExpressionTimeout() const {
const uint32_t idx = ePropertyUtilityExpressionTimeout;
- uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value);
+ uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_process_properties[idx].default_uint_value);
return std::chrono::seconds(value);
}
std::chrono::seconds ProcessProperties::GetInterruptTimeout() const {
const uint32_t idx = ePropertyInterruptTimeout;
- uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value);
+ uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_process_properties[idx].default_uint_value);
return std::chrono::seconds(value);
}
bool ProcessProperties::GetSteppingRunsAllThreads() const {
const uint32_t idx = ePropertySteppingRunsAllThreads;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_process_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_process_properties[idx].default_uint_value != 0);
}
bool ProcessProperties::GetOSPluginReportsAllThreads() const {
const bool fail_value = true;
const Property *exp_property =
- m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyExperimental);
+ m_collection_sp->GetPropertyAtIndex(ePropertyExperimental);
OptionValueProperties *exp_values =
exp_property->GetValue()->GetAsProperties();
if (!exp_values)
return fail_value;
return exp_values
- ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyOSPluginReportsAllThreads)
+ ->GetPropertyAtIndexAsBoolean(ePropertyOSPluginReportsAllThreads)
.value_or(fail_value);
}
void ProcessProperties::SetOSPluginReportsAllThreads(bool does_report) {
const Property *exp_property =
- m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyExperimental);
+ m_collection_sp->GetPropertyAtIndex(ePropertyExperimental);
OptionValueProperties *exp_values =
exp_property->GetValue()->GetAsProperties();
if (exp_values)
- exp_values->SetPropertyAtIndexAsBoolean(
- nullptr, ePropertyOSPluginReportsAllThreads, does_report);
+ exp_values->SetPropertyAtIndexAsBoolean(ePropertyOSPluginReportsAllThreads,
+ does_report);
}
FollowForkMode ProcessProperties::GetFollowForkMode() const {
const uint32_t idx = ePropertyFollowForkMode;
- return (FollowForkMode)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ return (FollowForkMode)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_process_properties[idx].default_uint_value);
}
// Allow the platform to override the default cache line size
OptionValueSP value_sp =
- m_collection_sp->GetPropertyAtIndex(nullptr, ePropertyMemCacheLineSize)
+ m_collection_sp->GetPropertyAtIndex(ePropertyMemCacheLineSize)
->GetValue();
uint32_t platform_cache_line_size =
target_sp->GetPlatform()->GetDefaultMemoryCacheLineSize();
public:
TargetOptionValueProperties(ConstString name) : Cloneable(name) {}
- const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
- uint32_t idx) const override {
+ const Property *
+ GetPropertyAtIndex(uint32_t idx,
+ const ExecutionContext *exe_ctx = nullptr) const override {
// When getting the value for a key from the target options, we will always
// try and grab the setting from the current target if there is one. Else
// we just use the one from this instance.
bool TargetProperties::GetInjectLocalVariables(
ExecutionContext *exe_ctx) const {
const Property *exp_property =
- m_collection_sp->GetPropertyAtIndex(exe_ctx, ePropertyExperimental);
+ m_collection_sp->GetPropertyAtIndex(ePropertyExperimental, exe_ctx);
OptionValueProperties *exp_values =
exp_property->GetValue()->GetAsProperties();
if (exp_values)
return exp_values
- ->GetPropertyAtIndexAsBoolean(exe_ctx, ePropertyInjectLocalVars)
+ ->GetPropertyAtIndexAsBoolean(ePropertyInjectLocalVars, exe_ctx)
.value_or(true);
else
return true;
void TargetProperties::SetInjectLocalVariables(ExecutionContext *exe_ctx,
bool b) {
const Property *exp_property =
- m_collection_sp->GetPropertyAtIndex(exe_ctx, ePropertyExperimental);
+ m_collection_sp->GetPropertyAtIndex(ePropertyExperimental, exe_ctx);
OptionValueProperties *exp_values =
exp_property->GetValue()->GetAsProperties();
if (exp_values)
- exp_values->SetPropertyAtIndexAsBoolean(exe_ctx, ePropertyInjectLocalVars,
- true);
+ exp_values->SetPropertyAtIndexAsBoolean(ePropertyInjectLocalVars, true,
+ exe_ctx);
}
ArchSpec TargetProperties::GetDefaultArchitecture() const {
OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch(
- nullptr, ePropertyDefaultArch);
+ ePropertyDefaultArch);
if (value)
return value->GetCurrentValue();
return ArchSpec();
void TargetProperties::SetDefaultArchitecture(const ArchSpec &arch) {
OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch(
- nullptr, ePropertyDefaultArch);
+ ePropertyDefaultArch);
if (value)
return value->SetCurrentValue(arch, true);
}
bool TargetProperties::GetMoveToNearestCode() const {
const uint32_t idx = ePropertyMoveToNearestCode;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
lldb::DynamicValueType TargetProperties::GetPreferDynamicValue() const {
const uint32_t idx = ePropertyPreferDynamic;
return (lldb::DynamicValueType)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
bool TargetProperties::SetPreferDynamicValue(lldb::DynamicValueType d) {
const uint32_t idx = ePropertyPreferDynamic;
- return m_collection_sp->SetPropertyAtIndexAsEnumeration(nullptr, idx, d);
+ return m_collection_sp->SetPropertyAtIndexAsEnumeration(idx, d);
}
bool TargetProperties::GetPreloadSymbols() const {
const uint32_t idx = ePropertyPreloadSymbols;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetPreloadSymbols(bool b) {
const uint32_t idx = ePropertyPreloadSymbols;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetDisableASLR() const {
const uint32_t idx = ePropertyDisableASLR;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDisableASLR(bool b) {
const uint32_t idx = ePropertyDisableASLR;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetInheritTCC() const {
const uint32_t idx = ePropertyInheritTCC;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetInheritTCC(bool b) {
const uint32_t idx = ePropertyInheritTCC;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetDetachOnError() const {
const uint32_t idx = ePropertyDetachOnError;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDetachOnError(bool b) {
const uint32_t idx = ePropertyDetachOnError;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetDisableSTDIO() const {
const uint32_t idx = ePropertyDisableSTDIO;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDisableSTDIO(bool b) {
const uint32_t idx = ePropertyDisableSTDIO;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
const char *TargetProperties::GetDisassemblyFlavor() const {
x86DisassemblyFlavor flavor_value =
(x86DisassemblyFlavor)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
return_value = g_x86_dis_flavor_value_types[flavor_value].string_value;
return return_value;
InlineStrategy TargetProperties::GetInlineStrategy() const {
const uint32_t idx = ePropertyInlineStrategy;
- return (InlineStrategy)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
llvm::StringRef TargetProperties::GetArg0() const {
const uint32_t idx = ePropertyArg0;
- return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx)
- .value_or(g_target_properties[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString(idx).value_or(
+ g_target_properties[idx].default_cstr_value);
}
void TargetProperties::SetArg0(llvm::StringRef arg) {
const uint32_t idx = ePropertyArg0;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, arg);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, arg);
m_launch_info.SetArg0(arg);
}
bool TargetProperties::GetRunArguments(Args &args) const {
const uint32_t idx = ePropertyRunArgs;
- return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+ return m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
}
void TargetProperties::SetRunArguments(const Args &args) {
const uint32_t idx = ePropertyRunArgs;
- m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+ m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
m_launch_info.GetArguments() = args;
}
Environment env;
if (m_target &&
- m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, ePropertyInheritEnv)
+ m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyInheritEnv)
.value_or(
g_target_properties[ePropertyInheritEnv].default_uint_value !=
0)) {
}
Args property_unset_env;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyUnsetEnvVars,
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyUnsetEnvVars,
property_unset_env);
for (const auto &var : property_unset_env)
env.erase(var.ref());
Args property_env;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEnvVars,
- property_env);
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEnvVars, property_env);
for (const auto &KV : Environment(property_env))
env[KV.first()] = KV.second;
if (m_target == nullptr)
return environment;
- if (!m_collection_sp
- ->GetPropertyAtIndexAsBoolean(nullptr, ePropertyInheritEnv)
+ if (!m_collection_sp->GetPropertyAtIndexAsBoolean(ePropertyInheritEnv)
.value_or(
g_target_properties[ePropertyInheritEnv].default_uint_value !=
0))
environment[KV.first()] = KV.second;
Args property_unset_environment;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyUnsetEnvVars,
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyUnsetEnvVars,
property_unset_environment);
for (const auto &var : property_unset_environment)
environment.erase(var.ref());
Environment TargetProperties::GetTargetEnvironment() const {
Args property_environment;
- m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, ePropertyEnvVars,
+ m_collection_sp->GetPropertyAtIndexAsArgs(ePropertyEnvVars,
property_environment);
Environment environment;
for (const auto &KV : Environment(property_environment))
void TargetProperties::SetEnvironment(Environment env) {
// TODO: Get rid of the Args intermediate step
const uint32_t idx = ePropertyEnvVars;
- m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, Args(env));
+ m_collection_sp->SetPropertyAtIndexFromArgs(idx, Args(env));
}
bool TargetProperties::GetSkipPrologue() const {
const uint32_t idx = ePropertySkipPrologue;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
PathMappingList &TargetProperties::GetSourcePathMap() const {
const uint32_t idx = ePropertySourceMap;
OptionValuePathMappings *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
bool TargetProperties::GetAutoSourceMapRelative() const {
const uint32_t idx = ePropertyAutoSourceMapRelative;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::AppendExecutableSearchPaths(const FileSpec &dir) {
const uint32_t idx = ePropertyExecutableSearchPaths;
OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
option_value->AppendCurrentValue(dir);
}
FileSpecList TargetProperties::GetExecutableSearchPaths() {
const uint32_t idx = ePropertyExecutableSearchPaths;
const OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
FileSpecList TargetProperties::GetDebugFileSearchPaths() {
const uint32_t idx = ePropertyDebugFileSearchPaths;
const OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
FileSpecList TargetProperties::GetClangModuleSearchPaths() {
const uint32_t idx = ePropertyClangModuleSearchPaths;
const OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
bool TargetProperties::GetEnableAutoImportClangModules() const {
const uint32_t idx = ePropertyAutoImportClangModules;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
ImportStdModule TargetProperties::GetImportStdModule() const {
const uint32_t idx = ePropertyImportStdModule;
- return (ImportStdModule)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ return (ImportStdModule)m_collection_sp->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
DynamicClassInfoHelper TargetProperties::GetDynamicClassInfoHelper() const {
const uint32_t idx = ePropertyDynamicClassInfoHelper;
return (DynamicClassInfoHelper)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
bool TargetProperties::GetEnableAutoApplyFixIts() const {
const uint32_t idx = ePropertyAutoApplyFixIts;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
uint64_t TargetProperties::GetNumberOfRetriesWithFixits() const {
const uint32_t idx = ePropertyRetriesWithFixIts;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
bool TargetProperties::GetEnableNotifyAboutFixIts() const {
const uint32_t idx = ePropertyNotifyAboutFixIts;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
FileSpec TargetProperties::GetSaveJITObjectsDir() const {
const uint32_t idx = ePropertySaveObjectsDir;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
void TargetProperties::CheckJITObjectsDir() {
if (exists && is_directory && writable)
return;
- m_collection_sp->GetPropertyAtIndex(nullptr, ePropertySaveObjectsDir)
+ m_collection_sp->GetPropertyAtIndex(ePropertySaveObjectsDir)
->GetValue()
->Clear();
bool TargetProperties::GetEnableSyntheticValue() const {
const uint32_t idx = ePropertyEnableSynthetic;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
uint32_t TargetProperties::GetMaxZeroPaddingInFloatFormat() const {
const uint32_t idx = ePropertyMaxZeroPaddingInFloatFormat;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
uint32_t TargetProperties::GetMaximumNumberOfChildrenToDisplay() const {
const uint32_t idx = ePropertyMaxChildrenCount;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
std::pair<uint32_t, bool>
TargetProperties::GetMaximumDepthOfChildrenToDisplay() const {
const uint32_t idx = ePropertyMaxChildrenDepth;
auto *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueUInt64(nullptr, idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueUInt64(idx);
bool is_default = !option_value->OptionWasSet();
return {option_value->GetCurrentValue(), is_default};
}
uint32_t TargetProperties::GetMaximumSizeOfStringSummary() const {
const uint32_t idx = ePropertyMaxSummaryLength;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
uint32_t TargetProperties::GetMaximumMemReadSize() const {
const uint32_t idx = ePropertyMaxMemReadSize;
- return m_collection_sp->GetPropertyAtIndexAsSInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
FileSpec TargetProperties::GetStandardInputPath() const {
const uint32_t idx = ePropertyInputPath;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
void TargetProperties::SetStandardInputPath(llvm::StringRef path) {
const uint32_t idx = ePropertyInputPath;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, path);
}
FileSpec TargetProperties::GetStandardOutputPath() const {
const uint32_t idx = ePropertyOutputPath;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
void TargetProperties::SetStandardOutputPath(llvm::StringRef path) {
const uint32_t idx = ePropertyOutputPath;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, path);
}
FileSpec TargetProperties::GetStandardErrorPath() const {
const uint32_t idx = ePropertyErrorPath;
- return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(idx);
}
void TargetProperties::SetStandardErrorPath(llvm::StringRef path) {
const uint32_t idx = ePropertyErrorPath;
- m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+ m_collection_sp->SetPropertyAtIndexAsString(idx, path);
}
LanguageType TargetProperties::GetLanguage() const {
OptionValueLanguage *value =
m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(
- nullptr, ePropertyLanguage);
+ ePropertyLanguage);
if (value)
return value->GetCurrentValue();
return LanguageType();
llvm::StringRef TargetProperties::GetExpressionPrefixContents() {
const uint32_t idx = ePropertyExprPrefix;
OptionValueFileSpec *file =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(nullptr, idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(idx);
if (file) {
DataBufferSP data_sp(file->GetFileContents());
if (data_sp)
uint64_t TargetProperties::GetExprErrorLimit() const {
const uint32_t idx = ePropertyExprErrorLimit;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_target_properties[idx].default_uint_value);
}
bool TargetProperties::GetBreakpointsConsultPlatformAvoidList() {
const uint32_t idx = ePropertyBreakpointUseAvoidList;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
bool TargetProperties::GetUseHexImmediates() const {
const uint32_t idx = ePropertyUseHexImmediates;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
bool TargetProperties::GetUseFastStepping() const {
const uint32_t idx = ePropertyUseFastStepping;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
bool TargetProperties::GetDisplayExpressionsInCrashlogs() const {
const uint32_t idx = ePropertyDisplayExpressionsInCrashlogs;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
LoadScriptFromSymFile TargetProperties::GetLoadScriptFromSymbolFile() const {
const uint32_t idx = ePropertyLoadScriptFromSymbolFile;
return (LoadScriptFromSymFile)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
LoadCWDlldbinitFile TargetProperties::GetLoadCWDlldbinitFile() const {
const uint32_t idx = ePropertyLoadCWDlldbinitFile;
return (LoadCWDlldbinitFile)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
Disassembler::HexImmediateStyle TargetProperties::GetHexImmediateStyle() const {
const uint32_t idx = ePropertyHexImmediateStyle;
return (Disassembler::HexImmediateStyle)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
MemoryModuleLoadLevel TargetProperties::GetMemoryModuleLoadLevel() const {
const uint32_t idx = ePropertyMemoryModuleLoadLevel;
return (MemoryModuleLoadLevel)m_collection_sp
- ->GetPropertyAtIndexAsEnumeration(nullptr, idx)
+ ->GetPropertyAtIndexAsEnumeration(idx)
.value_or(g_target_properties[idx].default_uint_value);
}
bool TargetProperties::GetUserSpecifiedTrapHandlerNames(Args &args) const {
const uint32_t idx = ePropertyTrapHandlerNames;
- return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args);
+ return m_collection_sp->GetPropertyAtIndexAsArgs(idx, args);
}
void TargetProperties::SetUserSpecifiedTrapHandlerNames(const Args &args) {
const uint32_t idx = ePropertyTrapHandlerNames;
- m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args);
+ m_collection_sp->SetPropertyAtIndexFromArgs(idx, args);
}
bool TargetProperties::GetDisplayRuntimeSupportValues() const {
const uint32_t idx = ePropertyDisplayRuntimeSupportValues;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDisplayRuntimeSupportValues(bool b) {
const uint32_t idx = ePropertyDisplayRuntimeSupportValues;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetDisplayRecognizedArguments() const {
const uint32_t idx = ePropertyDisplayRecognizedArguments;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDisplayRecognizedArguments(bool b) {
const uint32_t idx = ePropertyDisplayRecognizedArguments;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
const ProcessLaunchInfo &TargetProperties::GetProcessLaunchInfo() const {
bool TargetProperties::GetRequireHardwareBreakpoints() const {
const uint32_t idx = ePropertyRequireHardwareBreakpoints;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetRequireHardwareBreakpoints(bool b) {
const uint32_t idx = ePropertyRequireHardwareBreakpoints;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, b);
}
bool TargetProperties::GetAutoInstallMainExecutable() const {
const uint32_t idx = ePropertyAutoInstallMainExecutable;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::Arg0ValueChangedCallback() {
bool TargetProperties::GetDebugUtilityExpression() const {
const uint32_t idx = ePropertyDebugUtilityExpression;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_target_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_target_properties[idx].default_uint_value != 0);
}
void TargetProperties::SetDebugUtilityExpression(bool debug) {
const uint32_t idx = ePropertyDebugUtilityExpression;
- m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, debug);
+ m_collection_sp->SetPropertyAtIndexAsBoolean(idx, debug);
}
// Target::TargetEventData
public:
ThreadOptionValueProperties(ConstString name) : Cloneable(name) {}
- const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
- uint32_t idx) const override {
+ const Property *
+ GetPropertyAtIndex(uint32_t idx,
+ const ExecutionContext *exe_ctx) const override {
// When getting the value for a key from the thread options, we will always
// try and grab the setting from the current thread if there is one. Else
// we just use the one from this instance.
const RegularExpression *ThreadProperties::GetSymbolsToAvoidRegexp() {
const uint32_t idx = ePropertyStepAvoidRegex;
- return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex(nullptr, idx);
+ return m_collection_sp->GetPropertyAtIndexAsOptionValueRegex(idx);
}
FileSpecList ThreadProperties::GetLibrariesToAvoid() const {
const uint32_t idx = ePropertyStepAvoidLibraries;
const OptionValueFileSpecList *option_value =
- m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- idx);
+ m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(idx);
assert(option_value);
return option_value->GetCurrentValue();
}
bool ThreadProperties::GetTraceEnabledState() const {
const uint32_t idx = ePropertyEnableThreadTrace;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_thread_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_thread_properties[idx].default_uint_value != 0);
}
bool ThreadProperties::GetStepInAvoidsNoDebug() const {
const uint32_t idx = ePropertyStepInAvoidsNoDebug;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_thread_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_thread_properties[idx].default_uint_value != 0);
}
bool ThreadProperties::GetStepOutAvoidsNoDebug() const {
const uint32_t idx = ePropertyStepOutAvoidsNoDebug;
- return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx)
- .value_or(g_thread_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(idx).value_or(
+ g_thread_properties[idx].default_uint_value != 0);
}
uint64_t ThreadProperties::GetMaxBacktraceDepth() const {
const uint32_t idx = ePropertyMaxBacktraceDepth;
- return m_collection_sp->GetPropertyAtIndexAsUInt64(nullptr, idx)
- .value_or(g_thread_properties[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsUInt64(idx).value_or(
+ g_thread_properties[idx].default_uint_value != 0);
}
// Thread Event Data
return need_to_resume;
}
-void Thread::DidResume() {
+void Thread::DidResume() {
SetResumeSignal(LLDB_INVALID_SIGNAL_NUMBER);
// This will get recomputed each time when we stop.
SetShouldRunBeforePublicStop(false);
: LLDB_INVALID_ADDRESS);
return false;
}
-
+
// Clear the "must run me before stop" if it was set:
SetShouldRunBeforePublicStop(false);
}
if (GetPlans().AnyCompletedPlans()) {
- // Pass skip_private = false to GetCompletedPlan, since we want to ask
+ // Pass skip_private = false to GetCompletedPlan, since we want to ask
// the last plan, regardless of whether it is private or not.
LLDB_LOGF(log,
"Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
Log *log = GetLog(LLDBLog::Step);
if (GetPlans().AnyCompletedPlans()) {
- // Pass skip_private = false to GetCompletedPlan, since we want to ask
+ // Pass skip_private = false to GetCompletedPlan, since we want to ask
// the last plan, regardless of whether it is private or not.
LLDB_LOGF(log,
"Current Plan for thread %d(%p) (0x%4.4" PRIx64
static_cast<void *>(this), s.GetData(),
thread_plan_sp->GetThread().GetID());
}
-
+
GetPlans().PushPlan(std::move(thread_plan_sp));
}
ThreadPlanSP discarded_plan_sp = GetPlans().DiscardPlan();
LLDB_LOGF(log, "Discarding plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
- discarded_plan_sp->GetName(),
+ discarded_plan_sp->GetName(),
discarded_plan_sp->GetThread().GetID());
}
if (!innermost_expr_plan) {
error.SetErrorString("No expressions currently active on this thread");
return error;
- }
+ }
DiscardThreadPlansUpToPlan(innermost_expr_plan);
return error;
}
}
lldb::ThreadPlanSP Thread::QueueThreadPlanForStepScripted(
- bool abort_other_plans, const char *class_name,
- StructuredData::ObjectSP extra_args_sp, bool stop_other_threads,
+ bool abort_other_plans, const char *class_name,
+ StructuredData::ObjectSP extra_args_sp, bool stop_other_threads,
Status &status) {
ThreadPlanSP thread_plan_sp(new ThreadPlanPython(
public:
virtual void Invoke() const {}
void operator()() const { Invoke(); }
+
protected:
~Callback() = default;
};
}
OptionValueDictionary *GetDictionary() {
- return GetPropertyAtIndexAsOptionValueDictionary(nullptr, m_dict_index);
+ return GetPropertyAtIndexAsOptionValueDictionary(m_dict_index);
}
OptionValueFileSpecList *GetFileList() {
- return GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
- m_file_list_index);
+ return GetPropertyAtIndexAsOptionValueFileSpecList(m_file_list_index);
}
private:
dict_copy_ptr->SetValueFromString("C=3", eVarSetOperationAppend);
// Trigger the callback second time.
- file_list_copy_ptr->SetValueFromString("0 another/path", eVarSetOperationReplace);
+ file_list_copy_ptr->SetValueFromString("0 another/path",
+ eVarSetOperationReplace);
}