From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- lldb/source/API/SBSymbol.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'lldb/source/API/SBSymbol.cpp') diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp index 6cc90e0ee368b..e4f2f3518270b 100644 --- a/lldb/source/API/SBSymbol.cpp +++ b/lldb/source/API/SBSymbol.cpp @@ -1,4 +1,4 @@ -//===-- SBSymbol.cpp --------------------------------------------*- C++ -*-===// +//===-- SBSymbol.cpp ------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -68,9 +68,7 @@ const char *SBSymbol::GetDisplayName() const { const char *name = nullptr; if (m_opaque_ptr) - name = m_opaque_ptr->GetMangled() - .GetDisplayDemangledName(m_opaque_ptr->GetLanguage()) - .AsCString(); + name = m_opaque_ptr->GetMangled().GetDisplayDemangledName().AsCString(); return name; } @@ -126,22 +124,17 @@ SBInstructionList SBSymbol::GetInstructions(SBTarget target, SBInstructionList sb_instructions; if (m_opaque_ptr) { - ExecutionContext exe_ctx; TargetSP target_sp(target.GetSP()); std::unique_lock lock; - if (target_sp) { + if (target_sp && m_opaque_ptr->ValueIsAddress()) { lock = std::unique_lock(target_sp->GetAPIMutex()); - - target_sp->CalculateExecutionContext(exe_ctx); - } - if (m_opaque_ptr->ValueIsAddress()) { const Address &symbol_addr = m_opaque_ptr->GetAddressRef(); ModuleSP module_sp = symbol_addr.GetModule(); if (module_sp) { AddressRange symbol_range(symbol_addr, m_opaque_ptr->GetByteSize()); const bool prefer_file_cache = false; sb_instructions.SetDisassembler(Disassembler::DisassembleRange( - module_sp->GetArchitecture(), nullptr, flavor_string, exe_ctx, + module_sp->GetArchitecture(), nullptr, flavor_string, *target_sp, symbol_range, prefer_file_cache)); } } -- cgit v1.2.3