LLDB mainline
|
#include <DisassemblerLLVMC.h>
Classes | |
class | MCDisasmInstance |
Public Member Functions | |
DisassemblerLLVMC (const lldb_private::ArchSpec &arch, const char *flavor, const char *cpu, const char *features) | |
~DisassemblerLLVMC () override | |
size_t | DecodeInstructions (const lldb_private::Address &base_addr, const lldb_private::DataExtractor &data, lldb::offset_t data_offset, size_t num_instructions, bool append, bool data_from_file) override |
llvm::StringRef | GetPluginName () override |
Public Member Functions inherited from lldb_private::Disassembler | |
Disassembler (const ArchSpec &arch, const char *flavor) | |
~Disassembler () override | |
void | PrintInstructions (Debugger &debugger, const ArchSpec &arch, const ExecutionContext &exe_ctx, bool mixed_source_and_assembly, uint32_t num_mixed_context_lines, uint32_t options, Stream &strm) |
size_t | ParseInstructions (Target &target, Address address, Limit limit, Stream *error_strm_ptr, bool force_live_memory=false) |
virtual size_t | DecodeInstructions (const Address &base_addr, const DataExtractor &data, lldb::offset_t data_offset, size_t num_instructions, bool append, bool data_from_file)=0 |
InstructionList & | GetInstructionList () |
const InstructionList & | GetInstructionList () const |
const ArchSpec & | GetArchitecture () const |
const char * | GetFlavor () const |
virtual bool | FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor)=0 |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static llvm::StringRef | GetPluginNameStatic () |
static lldb::DisassemblerSP | CreateInstance (const lldb_private::ArchSpec &arch, const char *flavor, const char *cpu, const char *features) |
Static Public Member Functions inherited from lldb_private::Disassembler | |
static lldb::DisassemblerSP | FindPlugin (const ArchSpec &arch, const char *flavor, const char *cpu, const char *features, const char *plugin_name) |
static lldb::DisassemblerSP | FindPluginForTarget (const Target &target, const ArchSpec &arch, const char *flavor, const char *cpu, const char *features, const char *plugin_name) |
static lldb::DisassemblerSP | DisassembleRange (const ArchSpec &arch, const char *plugin_name, const char *flavor, const char *cpu, const char *features, Target &target, const AddressRange &disasm_range, bool force_live_memory=false) |
static lldb::DisassemblerSP | DisassembleBytes (const ArchSpec &arch, const char *plugin_name, const char *flavor, const char *cpu, const char *features, const Address &start, const void *bytes, size_t length, uint32_t max_num_instructions, bool data_from_file) |
static bool | Disassemble (Debugger &debugger, const ArchSpec &arch, const char *plugin_name, const char *flavor, const char *cpu, const char *features, const ExecutionContext &exe_ctx, const Address &start, Limit limit, bool mixed_source_and_assembly, uint32_t num_mixed_context_lines, uint32_t options, Stream &strm) |
static bool | Disassemble (Debugger &debugger, const ArchSpec &arch, StackFrame &frame, Stream &strm) |
Protected Member Functions | |
bool | FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor) override |
bool | IsValid () const |
int | OpInfo (uint64_t PC, uint64_t Offset, uint64_t Size, int TagType, void *TagBug) |
const char * | SymbolLookup (uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName) |
Static Protected Member Functions | |
static int | OpInfoCallback (void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t Size, int TagType, void *TagBug) |
static const char * | SymbolLookupCallback (void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName) |
Static Protected Member Functions inherited from lldb_private::Disassembler | |
static SourceLine | GetFunctionDeclLineEntry (const SymbolContext &sc) |
static void | AddLineToSourceLineTables (SourceLine &line, std::map< FileSpec, std::set< uint32_t > > &source_lines_seen) |
static bool | ElideMixedSourceAndDisassemblyLine (const ExecutionContext &exe_ctx, const SymbolContext &sc, SourceLine &line) |
static bool | ElideMixedSourceAndDisassemblyLine (const ExecutionContext &exe_ctx, const SymbolContext &sc, LineEntry &line) |
Protected Attributes | |
const lldb_private::ExecutionContext * | m_exe_ctx |
InstructionLLVMC * | m_inst |
std::mutex | m_mutex |
bool | m_data_from_file |
lldb::addr_t | m_adrp_address |
std::optional< uint32_t > | m_adrp_insn |
std::unique_ptr< MCDisasmInstance > | m_disasm_up |
std::unique_ptr< MCDisasmInstance > | m_alternate_disasm_up |
Protected Attributes inherited from lldb_private::Disassembler | |
ArchSpec | m_arch |
InstructionList | m_instruction_list |
std::string | m_flavor |
Friends | |
class | InstructionLLVMC |
Additional Inherited Members | |
Public Types inherited from lldb_private::Disassembler | |
enum | { eOptionNone = 0u , eOptionShowBytes = (1u << 0) , eOptionRawOuput = (1u << 1) , eOptionMarkPCSourceLine = (1u << 2) , eOptionMarkPCAddress , eOptionShowControlFlowKind = (1u << 4) } |
enum | HexImmediateStyle { eHexStyleC , eHexStyleAsm } |
Definition at line 23 of file DisassemblerLLVMC.h.
DisassemblerLLVMC::DisassemblerLLVMC | ( | const lldb_private::ArchSpec & | arch, |
const char * | flavor, | ||
const char * | cpu, | ||
const char * | features | ||
) |
Definition at line 1438 of file DisassemblerLLVMC.cpp.
References DisassemblerLLVMC::MCDisasmInstance::Create(), lldb_private::ArchSpec::eCore_mips32, lldb_private::ArchSpec::eCore_mips32el, lldb_private::ArchSpec::eCore_mips32r2, lldb_private::ArchSpec::eCore_mips32r2el, lldb_private::ArchSpec::eCore_mips32r3, lldb_private::ArchSpec::eCore_mips32r3el, lldb_private::ArchSpec::eCore_mips32r5, lldb_private::ArchSpec::eCore_mips32r5el, lldb_private::ArchSpec::eCore_mips32r6, lldb_private::ArchSpec::eCore_mips32r6el, lldb_private::ArchSpec::eCore_mips64, lldb_private::ArchSpec::eCore_mips64el, lldb_private::ArchSpec::eCore_mips64r2, lldb_private::ArchSpec::eCore_mips64r2el, lldb_private::ArchSpec::eCore_mips64r3, lldb_private::ArchSpec::eCore_mips64r3el, lldb_private::ArchSpec::eCore_mips64r5, lldb_private::ArchSpec::eCore_mips64r5el, lldb_private::ArchSpec::eCore_mips64r6, lldb_private::ArchSpec::eCore_mips64r6el, lldb_private::ArchSpec::eMIPSAse_dsp, lldb_private::ArchSpec::eMIPSAse_dspr2, lldb_private::ArchSpec::eMIPSAse_micromips, lldb_private::ArchSpec::eMIPSAse_mips16, lldb_private::ArchSpec::eMIPSAse_msa, lldb_private::ArchSpec::eRISCV_float_abi_double, lldb_private::ArchSpec::eRISCV_float_abi_quad, lldb_private::ArchSpec::eRISCV_float_abi_single, lldb_private::ArchSpec::eRISCV_rvc, lldb_private::ArchSpec::eRISCV_rve, FlavorValidForArchSpec(), lldb_private::ArchSpec::GetCore(), lldb_private::ArchSpec::GetFlags(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsAlwaysThumbInstructions(), lldb_private::ArchSpec::IsMIPS(), m_alternate_disasm_up, m_disasm_up, and lldb_private::Disassembler::m_flavor.
|
overridedefault |
|
static |
Definition at line 1620 of file DisassemblerLLVMC.cpp.
References lldb_private::ArchSpec::GetTriple().
Referenced by Initialize(), and Terminate().
|
overridevirtual |
Implements lldb_private::Disassembler.
Definition at line 1633 of file DisassemblerLLVMC.cpp.
References lldb_private::InstructionList::Append(), lldb_private::InstructionList::Clear(), lldb_private::Address::GetAddressClass(), lldb_private::DataExtractor::GetByteSize(), InstructionLLVMC, IsValid(), m_alternate_disasm_up, m_data_from_file, lldb_private::Disassembler::m_instruction_list, and lldb_private::Address::Slide().
|
overrideprotectedvirtual |
Implements lldb_private::Disassembler.
Definition at line 1709 of file DisassemblerLLVMC.cpp.
References lldb_private::ArchSpec::GetTriple().
Referenced by DisassemblerLLVMC().
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 48 of file DisassemblerLLVMC.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 35 of file DisassemblerLLVMC.h.
Referenced by GetPluginName(), and Initialize().
|
static |
Definition at line 1678 of file DisassemblerLLVMC.cpp.
References CreateInstance(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
|
protected |
Definition at line 1722 of file DisassemblerLLVMC.cpp.
References m_disasm_up.
Referenced by DecodeInstructions().
|
protected |
Definition at line 1724 of file DisassemblerLLVMC.cpp.
Referenced by OpInfoCallback().
|
staticprotected |
Definition at line 1694 of file DisassemblerLLVMC.cpp.
|
protected |
Definition at line 1736 of file DisassemblerLLVMC.cpp.
References InstructionLLVMC::AppendComment(), lldb_private::AddressRange::ContainsLoadAddress(), lldb_private::Address::Dump(), lldb_private::Address::DumpStyleNoFunctionName, lldb_private::Address::DumpStyleResolvedDescriptionNoFunctionArguments, lldb_private::Address::DumpStyleSectionNameOffset, lldb_private::SymbolContext::function, lldb_private::Instruction::GetAddress(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::Target::GetArchitecture(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::ArchSpec::GetMachine(), lldb_private::Address::GetModule(), lldb_private::Address::GetSection(), lldb_private::Target::GetSectionLoadList(), lldb_private::StreamString::GetString(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, m_adrp_address, m_adrp_insn, m_exe_ctx, m_inst, pc, lldb_private::SectionLoadList::ResolveLoadAddress(), lldb_private::SymbolContext::symbol, and InstructionLLVMC::UsingFileAddress().
Referenced by SymbolLookupCallback().
|
staticprotected |
Definition at line 1701 of file DisassemblerLLVMC.cpp.
References pc, and SymbolLookup().
Referenced by DisassemblerLLVMC::MCDisasmInstance::Create().
|
static |
Definition at line 1690 of file DisassemblerLLVMC.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
friend |
Definition at line 51 of file DisassemblerLLVMC.h.
Referenced by DecodeInstructions().
|
protected |
Definition at line 81 of file DisassemblerLLVMC.h.
Referenced by SymbolLookup().
|
protected |
Definition at line 82 of file DisassemblerLLVMC.h.
Referenced by SymbolLookup().
|
protected |
Definition at line 89 of file DisassemblerLLVMC.h.
Referenced by DecodeInstructions(), and DisassemblerLLVMC().
|
protected |
Definition at line 76 of file DisassemblerLLVMC.h.
Referenced by DecodeInstructions().
|
protected |
Definition at line 88 of file DisassemblerLLVMC.h.
Referenced by DisassemblerLLVMC(), DisassemblerLLVMC::MCDisasmInstance::GetMCInst(), and IsValid().
|
protected |
Definition at line 73 of file DisassemblerLLVMC.h.
Referenced by SymbolLookup().
|
protected |
Definition at line 74 of file DisassemblerLLVMC.h.
Referenced by SymbolLookup().
|
protected |
Definition at line 75 of file DisassemblerLLVMC.h.