diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 | 
| commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
| tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/API/SBSymbol.cpp | |
| parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) | |
Notes
Diffstat (limited to 'lldb/source/API/SBSymbol.cpp')
| -rw-r--r-- | lldb/source/API/SBSymbol.cpp | 15 | 
1 files changed, 4 insertions, 11 deletions
| 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<std::recursive_mutex> lock; -    if (target_sp) { +    if (target_sp && m_opaque_ptr->ValueIsAddress()) {        lock = std::unique_lock<std::recursive_mutex>(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));        }      } | 
