LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
InstructionLLVMC Class Reference
Inheritance diagram for InstructionLLVMC:
Inheritance graph
[legend]
Collaboration diagram for InstructionLLVMC:
Collaboration graph
[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
 
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)
 
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)
 
const char * GetOperands (const ExecutionContext *exe_ctx)
 
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, 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. More...
 
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)
 

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
 
bool m_has_visited_instruction = false
 
bool m_does_branch = true
 
bool m_has_delay_slot = false
 
bool m_is_call = false
 
- Protected Attributes inherited from lldb_private::Instruction
Address m_address
 
Opcode m_opcode
 
std::string m_opcode_name
 
std::string m_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 83 of file DisassemblerLLVMC.cpp.

Constructor & Destructor Documentation

◆ InstructionLLVMC()

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

Definition at line 85 of file DisassemblerLLVMC.cpp.

◆ ~InstructionLLVMC()

InstructionLLVMC::~InstructionLLVMC ( )
overridedefault

Member Function Documentation

◆ AppendComment()

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

Definition at line 203 of file DisassemblerLLVMC.cpp.

Referenced by DisassemblerLLVMC::SymbolLookup().

◆ CalculateMnemonicOperandsAndComment()

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

◆ ConsumeChar()

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

Definition at line 375 of file DisassemblerLLVMC.cpp.

◆ ConsumeWhitespace()

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

Definition at line 358 of file DisassemblerLLVMC.cpp.

◆ Decode()

size_t InstructionLLVMC::Decode ( const lldb_private::Disassembler disassembler,
const lldb_private::DataExtractor data,
lldb::offset_t  data_offset 
)
inlineoverridevirtual

◆ DoesBranch()

bool InstructionLLVMC::DoesBranch ( )
inlineoverridevirtual

Implements lldb_private::Instruction.

Definition at line 95 of file DisassemblerLLVMC.cpp.

◆ DumpOperand()

static void InstructionLLVMC::DumpOperand ( const Operand op,
Stream s 
)
inlinestatic

◆ GetByteSize()

size_t InstructionLLVMC::GetByteSize ( ) const
inline

Definition at line 333 of file DisassemblerLLVMC.cpp.

◆ GetDisasmToUse() [1/2]

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

Definition at line 105 of file DisassemblerLLVMC.cpp.

◆ GetDisasmToUse() [2/2]

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

Definition at line 856 of file DisassemblerLLVMC.cpp.

◆ HasDelaySlot()

bool InstructionLLVMC::HasDelaySlot ( )
inlineoverridevirtual

Reimplemented from lldb_private::Instruction.

Definition at line 100 of file DisassemblerLLVMC.cpp.

◆ IsCall()

bool InstructionLLVMC::IsCall ( )
inlineoverridevirtual

Reimplemented from lldb_private::Instruction.

Definition at line 804 of file DisassemblerLLVMC.cpp.

◆ IsValid()

bool InstructionLLVMC::IsValid ( ) const
inline

Definition at line 330 of file DisassemblerLLVMC.cpp.

◆ ParseARMDerefAccess()

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

◆ ParseARMOffsetAccess()

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

◆ ParseImmediate()

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

◆ ParseIntelDerefAccess()

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

◆ ParseIntelIndexedAccess()

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

◆ ParseOperands()

bool InstructionLLVMC::ParseOperands ( llvm::SmallVectorImpl< Instruction::Operand > &  operands)
inlineoverridevirtual

◆ ParseRegisterName()

static 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 332 of file DisassemblerLLVMC.cpp.

Referenced by DisassemblerLLVMC::SymbolLookup().

◆ VisitInstruction()

void InstructionLLVMC::VisitInstruction ( )
inlineprotected

Member Data Documentation

◆ m_disasm_wp

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

Definition at line 810 of file DisassemblerLLVMC.cpp.

◆ m_does_branch

bool InstructionLLVMC::m_does_branch = true
protected

Definition at line 820 of file DisassemblerLLVMC.cpp.

◆ m_has_delay_slot

bool InstructionLLVMC::m_has_delay_slot = false
protected

Definition at line 821 of file DisassemblerLLVMC.cpp.

◆ m_has_visited_instruction

bool InstructionLLVMC::m_has_visited_instruction = false
protected

Definition at line 814 of file DisassemblerLLVMC.cpp.

◆ m_is_call

bool InstructionLLVMC::m_is_call = false
protected

Definition at line 822 of file DisassemblerLLVMC.cpp.

◆ m_is_valid

bool InstructionLLVMC::m_is_valid = false
protected

Definition at line 812 of file DisassemblerLLVMC.cpp.

◆ m_using_file_addr

bool InstructionLLVMC::m_using_file_addr
protected

Definition at line 813 of file DisassemblerLLVMC.cpp.


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