diff options
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index ed0b951fbce1..6711dc37eca6 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -137,19 +137,12 @@ ProcessProperties::ProcessProperties(lldb_private::Process *process) Process::GetGlobalProperties().get()); m_collection_sp->SetValueChangedCallback( ePropertyPythonOSPluginPath, - ProcessProperties::OptionValueChangedCallback, this); + [this] { m_process->LoadOperatingSystemPlugin(true); }); } } ProcessProperties::~ProcessProperties() = default; -void ProcessProperties::OptionValueChangedCallback(void *baton, - OptionValue *option_value) { - ProcessProperties *properties = (ProcessProperties *)baton; - if (properties->m_process) - properties->m_process->LoadOperatingSystemPlugin(true); -} - bool ProcessProperties::GetDisableMemoryCache() const { const uint32_t idx = ePropertyDisableMemCache; return m_collection_sp->GetPropertyAtIndexAsBoolean( @@ -1486,8 +1479,7 @@ const lldb::ABISP &Process::GetABI() { return m_abi_sp; } -std::vector<LanguageRuntime *> -Process::GetLanguageRuntimes(bool retry_if_null) { +std::vector<LanguageRuntime *> Process::GetLanguageRuntimes() { std::vector<LanguageRuntime *> language_runtimes; if (m_finalizing) @@ -1500,15 +1492,14 @@ Process::GetLanguageRuntimes(bool retry_if_null) { // yet or the proper condition for loading wasn't yet met (e.g. libc++.so // hadn't been loaded). for (const lldb::LanguageType lang_type : Language::GetSupportedLanguages()) { - if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type, retry_if_null)) + if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type)) language_runtimes.emplace_back(runtime); } return language_runtimes; } -LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language, - bool retry_if_null) { +LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language) { if (m_finalizing) return nullptr; @@ -1517,7 +1508,7 @@ LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language, std::lock_guard<std::recursive_mutex> guard(m_language_runtimes_mutex); LanguageRuntimeCollection::iterator pos; pos = m_language_runtimes.find(language); - if (pos == m_language_runtimes.end() || (retry_if_null && !pos->second)) { + if (pos == m_language_runtimes.end() || !pos->second) { lldb::LanguageRuntimeSP runtime_sp( LanguageRuntime::FindPlugin(this, language)); @@ -5802,7 +5793,8 @@ Process::AdvanceAddressToNextBranchInstruction(Address default_stop_addr, uint32_t branch_index = insn_list->GetIndexOfNextBranchInstruction(insn_offset, target, - false /* ignore_calls*/); + false /* ignore_calls*/, + nullptr); if (branch_index == UINT32_MAX) { return retval; } |