diff options
| author | Sean Callanan <scallanan@apple.com> | 2012-02-23 23:43:28 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2012-02-23 23:43:28 +0000 |
| commit | 6f298a646448e8e2523526db29b14cb4e57208c6 (patch) | |
| tree | f276c740b2e3684a276cfb8cfa4ba51e305ff2eb /lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp | |
| parent | 6476fad6695f91bd0a4c886bb902ec69fd3c81cc (diff) | |
| download | bcm5719-llvm-6f298a646448e8e2523526db29b14cb4e57208c6.tar.gz bcm5719-llvm-6f298a646448e8e2523526db29b14cb4e57208c6.zip | |
Updated LLVM to take some fixes that make the
Intel disassembler usable.
Also flipped the switch: we are now exclusively
using Disassembler.h instead of
EnhancedDisassembly.h for all disassembly in
LLDB.
llvm-svn: 151306
Diffstat (limited to 'lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp')
| -rw-r--r-- | lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp index 70e706be35a..d8799560252 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -358,7 +358,7 @@ DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch) : m_disasm_context = ::LLVMCreateDisasm(arch.GetTriple().getTriple().c_str(), (void*)this, /*TagType=*/1, - DisassemblerLLVMC::OpInfoCallback, + NULL, DisassemblerLLVMC::SymbolLookupCallback); if (arch.GetTriple().getArch() == llvm::Triple::arm) @@ -366,7 +366,7 @@ DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch) : m_alternate_disasm_context = ::LLVMCreateDisasm("thumbv7-apple-darwin", (void*)this, /*TagType=*/1, - DisassemblerLLVMC::OpInfoCallback, + NULL, DisassemblerLLVMC::SymbolLookupCallback); } } @@ -526,26 +526,14 @@ const char *DisassemblerLLVMC::SymbolLookup (uint64_t ReferenceValue, else target->GetImages().ResolveFileAddress(ReferenceValue, reference_address); - if (reference_address.IsValid()) + if (reference_address.IsValid() && reference_address.GetSection()) { - SymbolContext reference_sc; - - target->GetImages().ResolveSymbolContextForAddress(reference_address, - eSymbolContextFunction | eSymbolContextSymbol, - reference_sc); - StreamString ss; - const bool show_fullpaths = false; - const bool show_module = true; - const bool show_inlined_frames = false; - - reference_sc.DumpStopContext(&ss, - m_exe_scope, - reference_address, - show_fullpaths, - show_module, - show_inlined_frames); + reference_address.Dump (&ss, + target, + Address::DumpStyleResolvedDescriptionNoModule, + Address::DumpStyleSectionNameOffset); m_inst->AddReferencedAddress(ss.GetString()); } |

