summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBSymbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBSymbol.cpp')
-rw-r--r--lldb/source/API/SBSymbol.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index 6cc90e0ee368..e4f2f3518270 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));
}
}