LLDB  mainline
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb_private::Opcode Class Reference

#include <Opcode.h>

Collaboration diagram for lldb_private::Opcode:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 29 of file Opcode.h.

Member Enumeration Documentation

◆ Type

Enumerator
eTypeInvalid 
eType8 
eType16 
eType16_2 
eType32 
eType64 
eTypeBytes 

Definition at line 31 of file Opcode.h.

Constructor & Destructor Documentation

◆ Opcode() [1/6]

lldb_private::Opcode::Opcode ( )
default

◆ Opcode() [2/6]

lldb_private::Opcode::Opcode ( uint8_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 43 of file Opcode.h.

References inst, and m_data.

◆ Opcode() [3/6]

lldb_private::Opcode::Opcode ( uint16_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 48 of file Opcode.h.

References inst, and m_data.

◆ Opcode() [4/6]

lldb_private::Opcode::Opcode ( uint32_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 53 of file Opcode.h.

References inst, and m_data.

◆ Opcode() [5/6]

lldb_private::Opcode::Opcode ( uint64_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 58 of file Opcode.h.

References inst, and m_data.

◆ Opcode() [6/6]

lldb_private::Opcode::Opcode ( uint8_t *  bytes,
size_t  length 
)
inline

Definition at line 63 of file Opcode.h.

References bytes, length, and SetOpcodeBytes().

Member Function Documentation

◆ Clear()

void lldb_private::Opcode::Clear ( )
inline

Definition at line 68 of file Opcode.h.

References lldb::eByteOrderInvalid, eTypeInvalid, m_byte_order, and m_type.

◆ Dump()

int Opcode::Dump ( Stream s,
uint32_t  min_byte_width 
)

◆ GetByteSize()

uint32_t lldb_private::Opcode::GetByteSize ( ) const
inline

◆ GetData()

uint32_t Opcode::GetData ( DataExtractor data) const

◆ GetDataByteOrder()

lldb::ByteOrder Opcode::GetDataByteOrder ( ) const
protected

Definition at line 62 of file Opcode.cpp.

References lldb::eByteOrderInvalid, and lldb_private::endian::InlHostByteOrder().

◆ GetEndianSwap()

bool lldb_private::Opcode::GetEndianSwap ( ) const
inlineprotected

◆ GetOpcode16()

uint16_t lldb_private::Opcode::GetOpcode16 ( uint16_t  invalid_opcode = UINT16_MAX) const
inline

Definition at line 95 of file Opcode.h.

References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.

◆ GetOpcode32()

uint32_t lldb_private::Opcode::GetOpcode32 ( uint32_t  invalid_opcode = UINT32_MAX) const
inline

Definition at line 115 of file Opcode.h.

References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.

◆ GetOpcode64()

uint64_t lldb_private::Opcode::GetOpcode64 ( uint64_t  invalid_opcode = UINT64_MAX) const
inline

Definition at line 134 of file Opcode.h.

References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, GetEndianSwap(), m_data, and m_type.

◆ GetOpcode8()

uint8_t lldb_private::Opcode::GetOpcode8 ( uint8_t  invalid_opcode = UINT8_MAX) const
inline

Definition at line 75 of file Opcode.h.

References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.

◆ GetOpcodeBytes()

const void* lldb_private::Opcode::GetOpcodeBytes ( ) const
inline

Definition at line 198 of file Opcode.h.

References eTypeBytes, m_data, and m_type.

◆ GetOpcodeDataBytes()

const void* lldb_private::Opcode::GetOpcodeDataBytes ( ) const
inlineprotected

Definition at line 227 of file Opcode.h.

References eType16, eType16_2, eType32, eType64, eType8, eTypeBytes, eTypeInvalid, m_data, and m_type.

◆ GetType()

Opcode::Type lldb_private::Opcode::GetType ( ) const
inline

Definition at line 73 of file Opcode.h.

References m_type.

Referenced by lldb_private::Instruction::Dump().

◆ SetOpcode16()

void lldb_private::Opcode::SetOpcode16 ( uint16_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 159 of file Opcode.h.

References eType16, inst, m_byte_order, m_data, and m_type.

Referenced by lldb_private::PseudoInstruction::SetOpcode().

◆ SetOpcode16_2()

void lldb_private::Opcode::SetOpcode16_2 ( uint32_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 165 of file Opcode.h.

References eType16_2, inst, m_byte_order, m_data, and m_type.

◆ SetOpcode32()

void lldb_private::Opcode::SetOpcode32 ( uint32_t  inst,
lldb::ByteOrder  order 
)
inline

◆ SetOpcode64()

void lldb_private::Opcode::SetOpcode64 ( uint64_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 177 of file Opcode.h.

References eType64, inst, m_byte_order, m_data, and m_type.

Referenced by lldb_private::PseudoInstruction::SetOpcode().

◆ SetOpcode8()

void lldb_private::Opcode::SetOpcode8 ( uint8_t  inst,
lldb::ByteOrder  order 
)
inline

Definition at line 153 of file Opcode.h.

References eType8, inst, m_byte_order, m_data, and m_type.

Referenced by lldb_private::PseudoInstruction::SetOpcode().

◆ SetOpcodeBytes()

void lldb_private::Opcode::SetOpcodeBytes ( const void *  bytes,
size_t  length 
)
inline

Definition at line 183 of file Opcode.h.

References bytes, lldb::eByteOrderInvalid, eTypeBytes, eTypeInvalid, length, m_byte_order, m_data, and m_type.

Referenced by Opcode().

Friends And Related Function Documentation

◆ lldb::SBInstruction

friend class lldb::SBInstruction
friend

Definition at line 225 of file Opcode.h.

Member Data Documentation

◆ bytes

uint8_t lldb_private::Opcode::bytes[16]

Definition at line 264 of file Opcode.h.

Referenced by Opcode(), and SetOpcodeBytes().

◆ inst

struct { ... } lldb_private::Opcode::inst

◆ inst16

uint16_t lldb_private::Opcode::inst16

Definition at line 260 of file Opcode.h.

◆ inst32

uint32_t lldb_private::Opcode::inst32

Definition at line 261 of file Opcode.h.

◆ inst64

uint64_t lldb_private::Opcode::inst64

Definition at line 262 of file Opcode.h.

◆ inst8

uint8_t lldb_private::Opcode::inst8

Definition at line 259 of file Opcode.h.

◆ length

uint8_t lldb_private::Opcode::length

Definition at line 266 of file Opcode.h.

Referenced by Opcode(), and SetOpcodeBytes().

◆ m_byte_order

lldb::ByteOrder lldb_private::Opcode::m_byte_order = lldb::eByteOrderInvalid
protected

◆ m_data

union { ... } lldb_private::Opcode::m_data

◆ m_type

Opcode::Type lldb_private::Opcode::m_type = eTypeInvalid
protected

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