LLDB mainline
InstructionLLVMC Class Reference
Inheritance diagram for InstructionLLVMC:
[legend]

Classes

class  DisassemblerScope
 Grants exclusive access to the disassembler and initializes it with the given InstructionLLVMC and an optional ExecutionContext. More...

Public Member Functions

 InstructionLLVMC (DisassemblerLLVMC &disasm, const lldb_private::Address &address, AddressClass addr_class)
 ~InstructionLLVMC () override=default
bool DoesBranch () override
bool HasDelaySlot () override
bool IsLoad () override
bool IsAuthenticated () override
DisassemblerLLVMC::MCDisasmInstanceGetDisasmToUse (bool &is_alternate_isa)
size_t Decode (const lldb_private::Disassembler &disassembler, const lldb_private::DataExtractor &data, lldb::offset_t data_offset) override
void AppendComment (std::string &description)
lldb::InstructionControlFlowKind GetControlFlowKind (const lldb_private::ExecutionContext *exe_ctx) override
void CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext *exe_ctx) override
bool IsValid () const
bool UsingFileAddress () const
size_t GetByteSize () const
bool ParseOperands (llvm::SmallVectorImpl< Instruction::Operand > &operands) override
bool IsCall () override
Public Member Functions inherited from lldb_private::Instruction
 Instruction (const Address &address, AddressClass addr_class=AddressClass::eInvalid)
virtual ~Instruction ()
const AddressGetAddress () const
const char * GetMnemonic (const ExecutionContext *exe_ctx, bool markup=false)
const char * GetOperands (const ExecutionContext *exe_ctx, bool markup=false)
const char * GetComment (const ExecutionContext *exe_ctx)
AddressClass GetAddressClass ()
void SetAddress (const Address &addr)
virtual void Dump (Stream *s, uint32_t max_opcode_byte_size, bool show_address, bool show_bytes, bool show_control_flow_kind, const ExecutionContext *exe_ctx, const SymbolContext *sym_ctx, const SymbolContext *prev_sym_ctx, const FormatEntity::Entry *disassembly_addr_format, size_t max_address_text_size)
 Dump the text representation of this Instruction to a Stream.
bool CanSetBreakpoint ()
virtual void SetDescription (llvm::StringRef)
lldb::OptionValueSP ReadArray (FILE *in_file, Stream &out_stream, OptionValue::Type data_type)
lldb::OptionValueSP ReadDictionary (FILE *in_file, Stream &out_stream)
bool DumpEmulation (const ArchSpec &arch)
virtual bool TestEmulation (Stream &stream, const char *test_file_name)
bool Emulate (const ArchSpec &arch, uint32_t evaluate_options, void *baton, EmulateInstruction::ReadMemoryCallback read_mem_callback, EmulateInstruction::WriteMemoryCallback write_mem_calback, EmulateInstruction::ReadRegisterCallback read_reg_callback, EmulateInstruction::WriteRegisterCallback write_reg_callback)
const OpcodeGetOpcode () const
uint32_t GetData (DataExtractor &data)

Static Public Member Functions

static llvm::StringRef::const_iterator ConsumeWhitespace (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< bool, llvm::StringRef::const_iterator > ConsumeChar (llvm::StringRef::const_iterator osi, const char c, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseRegisterName (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseImmediate (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseIntelIndexedAccess (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseIntelDerefAccess (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseARMOffsetAccess (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static std::pair< Operand, llvm::StringRef::const_iterator > ParseARMDerefAccess (llvm::StringRef::const_iterator osi, llvm::StringRef::const_iterator ose)
static void DumpOperand (const Operand &op, Stream &s)
Static Public Member Functions inherited from lldb_private::Instruction
static const char * GetNameForInstructionControlFlowKind (lldb::InstructionControlFlowKind instruction_control_flow_kind)

Protected Member Functions

void VisitInstruction ()
Protected Member Functions inherited from lldb_private::Instruction
void CalculateMnemonicOperandsAndCommentIfNeeded (const ExecutionContext *exe_ctx)

Protected Attributes

std::weak_ptr< DisassemblerLLVMCm_disasm_wp
bool m_is_valid = false
bool m_using_file_addr = false
bool m_has_visited_instruction = false
bool m_does_branch = true
bool m_has_delay_slot = false
bool m_is_call = false
bool m_is_load = false
bool m_is_authenticated = false
Protected Attributes inherited from lldb_private::Instruction
Address m_address
Opcode m_opcode
std::string m_opcode_name
std::string m_markup_opcode_name
std::string m_mnemonics
std::string m_markup_mnemonics
std::string m_comment
bool m_calculated_strings

Private Member Functions

DisassemblerLLVMC::MCDisasmInstanceGetDisasmToUse (bool &is_alternate_isa, DisassemblerScope &disasm)

Detailed Description

Definition at line 413 of file DisassemblerLLVMC.cpp.

Constructor & Destructor Documentation

◆ InstructionLLVMC()

InstructionLLVMC::InstructionLLVMC ( DisassemblerLLVMC & disasm,
const lldb_private::Address & address,
AddressClass addr_class )
inline

◆ ~InstructionLLVMC()

InstructionLLVMC::~InstructionLLVMC ( )
overridedefault

Member Function Documentation

◆ AppendComment()

void InstructionLLVMC::AppendComment ( std::string & description)
inline

◆ CalculateMnemonicOperandsAndComment()

void InstructionLLVMC::CalculateMnemonicOperandsAndComment ( const lldb_private::ExecutionContext * exe_ctx)
inlineoverridevirtual

◆ ConsumeChar()

std::pair< bool, llvm::StringRef::const_iterator > InstructionLLVMC::ConsumeChar ( llvm::StringRef::const_iterator osi,
const char c,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ConsumeWhitespace()

llvm::StringRef::const_iterator InstructionLLVMC::ConsumeWhitespace ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ Decode()

◆ DoesBranch()

bool InstructionLLVMC::DoesBranch ( )
inlineoverridevirtual

Implements lldb_private::Instruction.

Definition at line 424 of file DisassemblerLLVMC.cpp.

References m_does_branch, and VisitInstruction().

◆ DumpOperand()

◆ GetByteSize()

size_t InstructionLLVMC::GetByteSize ( ) const
inline

Definition at line 705 of file DisassemblerLLVMC.cpp.

References lldb_private::Instruction::m_opcode.

◆ GetControlFlowKind()

lldb::InstructionControlFlowKind InstructionLLVMC::GetControlFlowKind ( const lldb_private::ExecutionContext * exe_ctx)
inlineoverridevirtual
Returns
The control flow kind of this instruction, or eInstructionControlFlowKindUnknown if the instruction can't be classified.

Reimplemented from lldb_private::Instruction.

Definition at line 560 of file DisassemblerLLVMC.cpp.

References lldb::eInstructionControlFlowKindUnknown, x86::GetControlFlowKind(), and lldb_private::Instruction::m_opcode.

◆ GetDisasmToUse() [1/2]

DisassemblerLLVMC::MCDisasmInstance * InstructionLLVMC::GetDisasmToUse ( bool & is_alternate_isa)
inline

Definition at line 444 of file DisassemblerLLVMC.cpp.

References GetDisasmToUse().

Referenced by Decode(), GetDisasmToUse(), and VisitInstruction().

◆ GetDisasmToUse() [2/2]

DisassemblerLLVMC::MCDisasmInstance * InstructionLLVMC::GetDisasmToUse ( bool & is_alternate_isa,
DisassemblerScope & disasm )
inlineprivate

◆ HasDelaySlot()

bool InstructionLLVMC::HasDelaySlot ( )
inlineoverridevirtual

Reimplemented from lldb_private::Instruction.

Definition at line 429 of file DisassemblerLLVMC.cpp.

References m_has_delay_slot, and VisitInstruction().

◆ IsAuthenticated()

bool InstructionLLVMC::IsAuthenticated ( )
inlineoverridevirtual

Implements lldb_private::Instruction.

Definition at line 439 of file DisassemblerLLVMC.cpp.

References m_is_authenticated, and VisitInstruction().

◆ IsCall()

bool InstructionLLVMC::IsCall ( )
inlineoverridevirtual

Reimplemented from lldb_private::Instruction.

Definition at line 1175 of file DisassemblerLLVMC.cpp.

References m_is_call, and VisitInstruction().

◆ IsLoad()

bool InstructionLLVMC::IsLoad ( )
inlineoverridevirtual

Implements lldb_private::Instruction.

Definition at line 434 of file DisassemblerLLVMC.cpp.

References m_is_load, and VisitInstruction().

◆ IsValid()

bool InstructionLLVMC::IsValid ( ) const
inline

Definition at line 702 of file DisassemblerLLVMC.cpp.

References m_is_valid.

◆ ParseARMDerefAccess()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseARMDerefAccess ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ParseARMOffsetAccess()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseARMOffsetAccess ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ParseImmediate()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseImmediate ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ParseIntelDerefAccess()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseIntelDerefAccess ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ParseIntelIndexedAccess()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseIntelIndexedAccess ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ ParseOperands()

◆ ParseRegisterName()

std::pair< Operand, llvm::StringRef::const_iterator > InstructionLLVMC::ParseRegisterName ( llvm::StringRef::const_iterator osi,
llvm::StringRef::const_iterator ose )
inlinestatic

◆ UsingFileAddress()

bool InstructionLLVMC::UsingFileAddress ( ) const
inline

Definition at line 704 of file DisassemblerLLVMC.cpp.

References m_using_file_addr.

◆ VisitInstruction()

Member Data Documentation

◆ m_disasm_wp

std::weak_ptr<DisassemblerLLVMC> InstructionLLVMC::m_disasm_wp
protected

◆ m_does_branch

bool InstructionLLVMC::m_does_branch = true
protected

Definition at line 1193 of file DisassemblerLLVMC.cpp.

Referenced by DoesBranch(), and VisitInstruction().

◆ m_has_delay_slot

bool InstructionLLVMC::m_has_delay_slot = false
protected

Definition at line 1194 of file DisassemblerLLVMC.cpp.

Referenced by HasDelaySlot(), and VisitInstruction().

◆ m_has_visited_instruction

bool InstructionLLVMC::m_has_visited_instruction = false
protected

Definition at line 1185 of file DisassemblerLLVMC.cpp.

Referenced by VisitInstruction().

◆ m_is_authenticated

bool InstructionLLVMC::m_is_authenticated = false
protected

Definition at line 1197 of file DisassemblerLLVMC.cpp.

Referenced by IsAuthenticated(), and VisitInstruction().

◆ m_is_call

bool InstructionLLVMC::m_is_call = false
protected

Definition at line 1195 of file DisassemblerLLVMC.cpp.

Referenced by IsCall(), and VisitInstruction().

◆ m_is_load

bool InstructionLLVMC::m_is_load = false
protected

Definition at line 1196 of file DisassemblerLLVMC.cpp.

Referenced by IsLoad(), and VisitInstruction().

◆ m_is_valid

bool InstructionLLVMC::m_is_valid = false
protected

Definition at line 1183 of file DisassemblerLLVMC.cpp.

Referenced by Decode(), and IsValid().

◆ m_using_file_addr

bool InstructionLLVMC::m_using_file_addr = false
protected

The documentation for this class was generated from the following file: