|
LLDB mainline
|
#include <Opcode.h>
Public Types | |
| enum | Type { eTypeInvalid , eType8 , eType16 , eType16_2 , eType16_32Tuples , 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, Opcode::Type type, lldb::ByteOrder order) | |
| 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 | SetOpcode16_32TupleBytes (const void *bytes, size_t length, lldb::ByteOrder order) |
| void | SetOpcodeBytes (const void *bytes, size_t length) |
| void | DoSetOpcodeBytes (const void *bytes, size_t length, Opcode::Type type, lldb::ByteOrder order) |
| int | Dump (Stream *s, uint32_t min_byte_width) const |
| const void * | GetOpcodeBytes () const |
| uint32_t | GetByteSize () const |
| uint32_t | GetData (DataExtractor &data) const |
Static Public Attributes | |
| static constexpr size_t | kMaxByteSize = 16 |
| The size in bytes of the fixed buffer used to store opcode bytes. | |
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 [kMaxByteSize] | |
| uint8_t length | |
| } inst | |
| } | m_data |
Friends | |
| class | lldb::SBInstruction |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 71 of file Opcode.h.
References bytes, DoSetOpcodeBytes(), and length.
|
inline |
Definition at line 76 of file Opcode.h.
References lldb::eByteOrderInvalid, eTypeInvalid, m_byte_order, and m_type.
|
inline |
Definition at line 214 of file Opcode.h.
References bytes, eTypeInvalid, length, m_byte_order, m_data, and m_type.
Referenced by Opcode(), SetOpcode16_32TupleBytes(), and SetOpcodeBytes().
| int Opcode::Dump | ( | Stream * | s, |
| uint32_t | min_byte_width ) const |
Definition at line 24 of file Opcode.cpp.
References eType16, eType16_2, eType16_32Tuples, 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().
|
inline |
Definition at line 236 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.
Referenced by x86::GetControlFlowKind(), GetData(), lldb::SBInstructionList::GetDescription(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), and EmulateInstructionMIPS::SetInstruction().
| uint32_t Opcode::GetData | ( | DataExtractor & | data | ) | const |
Definition at line 103 of file Opcode.cpp.
References lldb_private::DataExtractor::Clear(), eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetByteSize(), GetDataByteOrder(), GetEndianSwap(), GetOpcodeDataBytes(), m_data, m_type, lldb_private::DataExtractor::SetByteOrder(), and lldb_private::DataExtractor::SetData().
|
protected |
Definition at line 83 of file Opcode.cpp.
References lldb::eByteOrderInvalid, eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, lldb_private::endian::InlHostByteOrder(), m_byte_order, and m_type.
Referenced by GetData().
|
inlineprotected |
Definition at line 286 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 105 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.
|
inline |
Definition at line 128 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, m_type, and UINT32_MAX.
|
inline |
Definition at line 151 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, m_type, and UINT64_MAX.
|
inline |
Definition at line 83 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.
|
inline |
Definition at line 230 of file Opcode.h.
References eType16_32Tuples, eTypeBytes, m_data, and m_type.
Referenced by x86::GetControlFlowKind().
|
inlineprotected |
Definition at line 263 of file Opcode.h.
References eType16, eType16_2, eType16_32Tuples, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.
Referenced by GetData().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 205 of file Opcode.h.
References bytes, DoSetOpcodeBytes(), eType16_32Tuples, and length.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 210 of file Opcode.h.
References bytes, DoSetOpcodeBytes(), lldb::eByteOrderInvalid, eTypeBytes, and length.
|
friend |
| uint8_t lldb_private::Opcode::bytes[kMaxByteSize] |
Definition at line 302 of file Opcode.h.
Referenced by DoSetOpcodeBytes(), Opcode(), SetOpcode16_32TupleBytes(), and SetOpcodeBytes().
| struct { ... } lldb_private::Opcode::inst |
Referenced by Opcode(), Opcode(), Opcode(), Opcode(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), and SetOpcode8().
|
staticconstexpr |
The size in bytes of the fixed buffer used to store opcode bytes.
It must be big enough to hold the longest opcode of any supported target (x86 caps instructions at 15 bytes).
Definition at line 49 of file Opcode.h.
Referenced by InstructionLLVMC::Decode().
| uint8_t lldb_private::Opcode::length |
Definition at line 304 of file Opcode.h.
Referenced by DoSetOpcodeBytes(), Opcode(), SetOpcode16_32TupleBytes(), and SetOpcodeBytes().
|
protected |
Definition at line 293 of file Opcode.h.
Referenced by Clear(), DoSetOpcodeBytes(), GetDataByteOrder(), GetEndianSwap(), Opcode(), Opcode(), Opcode(), Opcode(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), and SetOpcode8().
| union { ... } lldb_private::Opcode::m_data |
|
protected |
Definition at line 295 of file Opcode.h.
Referenced by Clear(), DoSetOpcodeBytes(), Dump(), GetByteSize(), GetData(), GetDataByteOrder(), GetOpcode16(), GetOpcode32(), GetOpcode64(), GetOpcode8(), GetOpcodeBytes(), GetOpcodeDataBytes(), GetType(), Opcode(), Opcode(), Opcode(), Opcode(), SetOpcode16(), SetOpcode16_2(), SetOpcode32(), SetOpcode64(), and SetOpcode8().