LLDB mainline
|
#include <Opcode.h>
Public Types | |
enum | Type { eTypeInvalid , eType8 , eType16 , eType16_2 , eType32 , eType64 , eTypeBytes } |
Public Member Functions | |
Opcode ()=default | |
Opcode (uint8_t inst, lldb::ByteOrder order) | |
Opcode (uint16_t inst, lldb::ByteOrder order) | |
Opcode (uint32_t inst, lldb::ByteOrder order) | |
Opcode (uint64_t inst, lldb::ByteOrder order) | |
Opcode (uint8_t *bytes, size_t length) | |
void | Clear () |
Opcode::Type | GetType () const |
uint8_t | GetOpcode8 (uint8_t invalid_opcode=UINT8_MAX) const |
uint16_t | GetOpcode16 (uint16_t invalid_opcode=UINT16_MAX) const |
uint32_t | GetOpcode32 (uint32_t invalid_opcode=UINT32_MAX) const |
uint64_t | GetOpcode64 (uint64_t invalid_opcode=UINT64_MAX) const |
void | SetOpcode8 (uint8_t inst, lldb::ByteOrder order) |
void | SetOpcode16 (uint16_t inst, lldb::ByteOrder order) |
void | SetOpcode16_2 (uint32_t inst, lldb::ByteOrder order) |
void | SetOpcode32 (uint32_t inst, lldb::ByteOrder order) |
void | SetOpcode64 (uint64_t inst, lldb::ByteOrder order) |
void | SetOpcodeBytes (const void *bytes, size_t length) |
int | Dump (Stream *s, uint32_t min_byte_width) |
const void * | GetOpcodeBytes () const |
uint32_t | GetByteSize () const |
uint32_t | GetData (DataExtractor &data) const |
Protected Member Functions | |
const void * | GetOpcodeDataBytes () const |
lldb::ByteOrder | GetDataByteOrder () const |
bool | GetEndianSwap () const |
Protected Attributes | |
lldb::ByteOrder | m_byte_order = lldb::eByteOrderInvalid |
Opcode::Type | m_type = eTypeInvalid |
union { | |
uint8_t inst8 | |
uint16_t inst16 | |
uint32_t inst32 | |
uint64_t inst64 | |
struct { | |
uint8_t bytes [16] | |
uint8_t length | |
} inst | |
} | m_data |
Friends | |
class | lldb::SBInstruction |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 63 of file Opcode.h.
References bytes, length, and SetOpcodeBytes().
|
inline |
Definition at line 68 of file Opcode.h.
References lldb::eByteOrderInvalid, eTypeInvalid, m_byte_order, and m_type.
Referenced by InstructionLLVMC::Decode().
int Opcode::Dump | ( | Stream * | s, |
uint32_t | min_byte_width | ||
) |
Definition at line 24 of file Opcode.cpp.
References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, lldb_private::Stream::GetWrittenBytes(), m_data, m_type, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and lldb_private::Stream::PutCString().
Referenced by lldb_private::Instruction::Dump().
|
inline |
Definition at line 208 of file Opcode.h.
References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), lldb_private::EmulateInstructionARM::CurrentCond(), lldb_private::PseudoInstruction::Decode(), InstructionLLVMC::Decode(), lldb_private::EmulateInstructionARM::EvaluateInstruction(), InstructionLLVMC::GetByteSize(), x86::GetControlFlowKind(), GetData(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), and EmulateInstructionMIPS::SetInstruction().
uint32_t Opcode::GetData | ( | DataExtractor & | data | ) | const |
Definition at line 81 of file Opcode.cpp.
References lldb_private::DataExtractor::Clear(), eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetByteSize(), GetDataByteOrder(), GetEndianSwap(), GetOpcodeDataBytes(), m_data, m_type, lldb_private::DataExtractor::SetByteOrder(), and lldb_private::DataExtractor::SetData().
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), EmulateInstructionMIPS::EvaluateInstruction(), EmulateInstructionMIPS64::EvaluateInstruction(), lldb_private::Instruction::GetData(), and InstructionLLVMC::VisitInstruction().
|
protected |
Definition at line 62 of file Opcode.cpp.
References lldb::eByteOrderInvalid, eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, lldb_private::endian::InlHostByteOrder(), m_byte_order, and m_type.
Referenced by GetData().
|
inlineprotected |
Definition at line 254 of file Opcode.h.
References lldb::eByteOrderBig, lldb::eByteOrderLittle, lldb_private::endian::InlHostByteOrder(), and m_byte_order.
Referenced by GetData(), GetOpcode16(), GetOpcode32(), and GetOpcode64().
|
inline |
Definition at line 95 of file Opcode.h.
References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.
|
inline |
Definition at line 116 of file Opcode.h.
References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.
Referenced by lldb_private::EmulateInstructionARM::EvaluateInstruction(), and lldb_private::EmulateInstructionARM::GetInstructionCondition().
|
inline |
Definition at line 137 of file Opcode.h.
References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.
|
inline |
|
inline |
Definition at line 204 of file Opcode.h.
References eTypeBytes, m_data, and m_type.
Referenced by x86::GetControlFlowKind().
|
inlineprotected |
|
inline |
Definition at line 73 of file Opcode.h.
References m_type.
Referenced by lldb_private::Instruction::Dump().
|
inline |
Definition at line 165 of file Opcode.h.
References eType16, inst, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), InstructionLLVMC::Decode(), lldb_private::EmulateInstructionARM::ReadInstruction(), lldb_private::EmulateInstructionRISCV::ReadInstruction(), lldb_private::PseudoInstruction::SetOpcode(), and lldb_private::EmulateInstructionARM::TestEmulation().
|
inline |
Definition at line 171 of file Opcode.h.
References eType16_2, inst, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::Decode().
|
inline |
Definition at line 177 of file Opcode.h.
References eType32, inst, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), InstructionLLVMC::Decode(), lldb_private::EmulateInstructionARM::ReadInstruction(), EmulateInstructionMIPS::ReadInstruction(), EmulateInstructionMIPS64::ReadInstruction(), lldb_private::EmulateInstructionRISCV::ReadInstruction(), lldb_private::PseudoInstruction::SetOpcode(), and lldb_private::EmulateInstructionARM::TestEmulation().
|
inline |
Definition at line 183 of file Opcode.h.
References eType64, inst, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), InstructionLLVMC::Decode(), and lldb_private::PseudoInstruction::SetOpcode().
|
inline |
Definition at line 159 of file Opcode.h.
References eType8, inst, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), InstructionLLVMC::Decode(), and lldb_private::PseudoInstruction::SetOpcode().
|
inline |
Definition at line 189 of file Opcode.h.
References bytes, lldb::eByteOrderInvalid, eTypeBytes, eTypeInvalid, length, m_byte_order, m_data, and m_type.
Referenced by InstructionLLVMC::CalculateMnemonicOperandsAndComment(), InstructionLLVMC::Decode(), and Opcode().
|
friend |
uint8_t lldb_private::Opcode::bytes[16] |
Definition at line 270 of file Opcode.h.
Referenced by Opcode(), and SetOpcodeBytes().
struct { ... } lldb_private::Opcode::inst |
Referenced by Opcode(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), and SetOpcode8().
uint8_t lldb_private::Opcode::length |
Definition at line 272 of file Opcode.h.
Referenced by Opcode(), and SetOpcodeBytes().
|
protected |
Definition at line 261 of file Opcode.h.
Referenced by Clear(), GetDataByteOrder(), GetEndianSwap(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), SetOpcode8(), and SetOpcodeBytes().
union { ... } lldb_private::Opcode::m_data |
|
protected |
Definition at line 263 of file Opcode.h.
Referenced by Clear(), Dump(), GetByteSize(), GetData(), GetDataByteOrder(), GetOpcode16(), GetOpcode32(), GetOpcode64(), GetOpcode8(), GetOpcodeBytes(), GetOpcodeDataBytes(), GetType(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), SetOpcode8(), and SetOpcodeBytes().