LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::EmulateInstructionPPC64 Class Reference

#include <EmulateInstructionPPC64.h>

Inheritance diagram for lldb_private::EmulateInstructionPPC64:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::EmulateInstructionPPC64:
Collaboration graph
[legend]

Classes

struct  Opcode
 

Public Member Functions

 EmulateInstructionPPC64 (const ArchSpec &arch)
 
ConstString GetPluginName () override
 
bool SetTargetTriple (const ArchSpec &arch) override
 
bool SupportsEmulatingInstructionsOfType (InstructionType inst_type) override
 
bool ReadInstruction () override
 
bool EvaluateInstruction (uint32_t evaluate_options) override
 
bool TestEmulation (Stream *out_stream, ArchSpec &arch, OptionValueDictionary *test_data) override
 
bool GetRegisterInfo (lldb::RegisterKind reg_kind, uint32_t reg_num, RegisterInfo &reg_info) override
 
bool CreateFunctionEntryUnwind (UnwindPlan &unwind_plan) override
 
- Public Member Functions inherited from lldb_private::EmulateInstruction
 EmulateInstruction (const ArchSpec &arch)
 
 ~EmulateInstruction () override=default
 
virtual InstructionCondition GetInstructionCondition ()
 
virtual bool SetInstruction (const Opcode &insn_opcode, const Address &inst_addr, Target *target)
 
bool ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value)
 
uint64_t ReadRegisterUnsigned (const RegisterInfo *reg_info, uint64_t fail_value, bool *success_ptr)
 
bool WriteRegister (const Context &context, const RegisterInfo *ref_info, const RegisterValue &reg_value)
 
bool WriteRegisterUnsigned (const Context &context, const RegisterInfo *reg_info, uint64_t reg_value)
 
bool ReadRegister (lldb::RegisterKind reg_kind, uint32_t reg_num, RegisterValue &reg_value)
 
bool WriteRegister (const Context &context, lldb::RegisterKind reg_kind, uint32_t reg_num, const RegisterValue &reg_value)
 
uint64_t ReadRegisterUnsigned (lldb::RegisterKind reg_kind, uint32_t reg_num, uint64_t fail_value, bool *success_ptr)
 
bool WriteRegisterUnsigned (const Context &context, lldb::RegisterKind reg_kind, uint32_t reg_num, uint64_t reg_value)
 
size_t ReadMemory (const Context &context, lldb::addr_t addr, void *dst, size_t dst_len)
 
uint64_t ReadMemoryUnsigned (const Context &context, lldb::addr_t addr, size_t byte_size, uint64_t fail_value, bool *success_ptr)
 
bool WriteMemory (const Context &context, lldb::addr_t addr, const void *src, size_t src_len)
 
bool WriteMemoryUnsigned (const Context &context, lldb::addr_t addr, uint64_t uval, size_t uval_byte_size)
 
uint32_t GetAddressByteSize () const
 
lldb::ByteOrder GetByteOrder () const
 
const OpcodeGetOpcode () const
 
lldb::addr_t GetAddress () const
 
const ArchSpecGetArchitecture () const
 
void SetBaton (void *baton)
 
void SetCallbacks (ReadMemoryCallback read_mem_callback, WriteMemoryCallback write_mem_callback, ReadRegisterCallback read_reg_callback, WriteRegisterCallback write_reg_callback)
 
void SetReadMemCallback (ReadMemoryCallback read_mem_callback)
 
void SetWriteMemCallback (WriteMemoryCallback write_mem_callback)
 
void SetReadRegCallback (ReadRegisterCallback read_reg_callback)
 
void SetWriteRegCallback (WriteRegisterCallback write_reg_callback)
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static ConstString GetPluginNameStatic ()
 
static const char * GetPluginDescriptionStatic ()
 
static EmulateInstructionCreateInstance (const ArchSpec &arch, InstructionType inst_type)
 
static bool SupportsEmulatingInstructionsOfTypeStatic (InstructionType inst_type)
 
- Static Public Member Functions inherited from lldb_private::EmulateInstruction
static EmulateInstructionFindPlugin (const ArchSpec &arch, InstructionType supported_inst_type, const char *plugin_name)
 
static const char * TranslateRegister (lldb::RegisterKind reg_kind, uint32_t reg_num, std::string &reg_name)
 
static size_t ReadMemoryFrame (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
 
static size_t WriteMemoryFrame (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
 
static bool ReadRegisterFrame (EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
 
static bool WriteRegisterFrame (EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
 
static size_t ReadMemoryDefault (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
 
static size_t WriteMemoryDefault (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
 
static bool ReadRegisterDefault (EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
 
static bool WriteRegisterDefault (EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
 
static bool GetBestRegisterKindAndNumber (const RegisterInfo *reg_info, lldb::RegisterKind &reg_kind, uint32_t &reg_num)
 
static uint32_t GetInternalRegisterNumber (RegisterContext *reg_ctx, const RegisterInfo &reg_info)
 

Private Member Functions

OpcodeGetOpcodeForInstruction (uint32_t opcode)
 
bool EmulateMFSPR (uint32_t opcode)
 
bool EmulateLD (uint32_t opcode)
 
bool EmulateSTD (uint32_t opcode)
 
bool EmulateOR (uint32_t opcode)
 
bool EmulateADDI (uint32_t opcode)
 

Private Attributes

uint32_t m_fp = LLDB_INVALID_REGNUM
 

Additional Inherited Members

- Public Types inherited from lldb_private::EmulateInstruction
enum  ContextType {
  eContextInvalid = 0, eContextReadOpcode, eContextImmediate, eContextPushRegisterOnStack,
  eContextPopRegisterOffStack, eContextAdjustStackPointer, eContextSetFramePointer, eContextRestoreStackPointer,
  eContextAdjustBaseRegister, eContextAdjustPC, eContextRegisterPlusOffset, eContextRegisterStore,
  eContextRegisterLoad, eContextRelativeBranchImmediate, eContextAbsoluteBranchRegister, eContextSupervisorCall,
  eContextTableBranchReadMemory, eContextWriteRegisterRandomBits, eContextWriteMemoryRandomBits, eContextArithmetic,
  eContextAdvancePC, eContextReturnFromException
}
 
enum  InfoType {
  eInfoTypeRegisterPlusOffset, eInfoTypeRegisterPlusIndirectOffset, eInfoTypeRegisterToRegisterPlusOffset, eInfoTypeRegisterToRegisterPlusIndirectOffset,
  eInfoTypeRegisterRegisterOperands, eInfoTypeOffset, eInfoTypeRegister, eInfoTypeImmediate,
  eInfoTypeImmediateSigned, eInfoTypeAddress, eInfoTypeISAAndImmediate, eInfoTypeISAAndImmediateSigned,
  eInfoTypeISA, eInfoTypeNoArgs
}
 
typedef size_t(* ReadMemoryCallback) (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
 
typedef size_t(* WriteMemoryCallback) (EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
 
typedef bool(* ReadRegisterCallback) (EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
 
typedef bool(* WriteRegisterCallback) (EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
 
typedef uint32_t InstructionCondition
 
- Public Attributes inherited from lldb_private::EmulateInstruction
enum lldb_private::EmulateInstruction::InfoType InfoType
 
- Static Public Attributes inherited from lldb_private::EmulateInstruction
static const InstructionCondition UnconditionalCondition = UINT32_MAX
 
- Protected Attributes inherited from lldb_private::EmulateInstruction
ArchSpec m_arch
 
void * m_baton = nullptr
 
ReadMemoryCallback m_read_mem_callback = &ReadMemoryDefault
 
WriteMemoryCallback m_write_mem_callback = &WriteMemoryDefault
 
ReadRegisterCallback m_read_reg_callback = &ReadRegisterDefault
 
WriteRegisterCallback m_write_reg_callback = &WriteRegisterDefault
 
lldb::addr_t m_addr = LLDB_INVALID_ADDRESS
 
Opcode m_opcode
 

Detailed Description

Definition at line 18 of file EmulateInstructionPPC64.h.

Constructor & Destructor Documentation

◆ EmulateInstructionPPC64()

EmulateInstructionPPC64::EmulateInstructionPPC64 ( const ArchSpec arch)

Definition at line 30 of file EmulateInstructionPPC64.cpp.

Member Function Documentation

◆ CreateFunctionEntryUnwind()

bool EmulateInstructionPPC64::CreateFunctionEntryUnwind ( UnwindPlan unwind_plan)
overridevirtual

◆ CreateInstance()

EmulateInstruction * EmulateInstructionPPC64::CreateInstance ( const ArchSpec arch,
InstructionType  inst_type 
)
static

Definition at line 57 of file EmulateInstructionPPC64.cpp.

References lldb_private::ArchSpec::GetTriple().

◆ EmulateADDI()

bool EmulateInstructionPPC64::EmulateADDI ( uint32_t  opcode)
private

◆ EmulateLD()

bool EmulateInstructionPPC64::EmulateLD ( uint32_t  opcode)
private

◆ EmulateMFSPR()

bool EmulateInstructionPPC64::EmulateMFSPR ( uint32_t  opcode)
private

◆ EmulateOR()

bool EmulateInstructionPPC64::EmulateOR ( uint32_t  opcode)
private

◆ EmulateSTD()

bool EmulateInstructionPPC64::EmulateSTD ( uint32_t  opcode)
private

◆ EvaluateInstruction()

bool EmulateInstructionPPC64::EvaluateInstruction ( uint32_t  evaluate_options)
overridevirtual

◆ GetOpcodeForInstruction()

EmulateInstructionPPC64::Opcode * EmulateInstructionPPC64::GetOpcodeForInstruction ( uint32_t  opcode)
private

Definition at line 146 of file EmulateInstructionPPC64.cpp.

◆ GetPluginDescriptionStatic()

const char * EmulateInstructionPPC64::GetPluginDescriptionStatic ( )
static

Definition at line 52 of file EmulateInstructionPPC64.cpp.

◆ GetPluginName()

ConstString EmulateInstructionPPC64::GetPluginName ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 47 of file EmulateInstructionPPC64.cpp.

◆ GetPluginNameStatic()

ConstString EmulateInstructionPPC64::GetPluginNameStatic ( )
static

Definition at line 42 of file EmulateInstructionPPC64.cpp.

◆ GetRegisterInfo()

bool EmulateInstructionPPC64::GetRegisterInfo ( lldb::RegisterKind  reg_kind,
uint32_t  reg_num,
RegisterInfo &  reg_info 
)
overridevirtual

◆ Initialize()

void EmulateInstructionPPC64::Initialize ( )
static

Definition at line 33 of file EmulateInstructionPPC64.cpp.

◆ ReadInstruction()

bool EmulateInstructionPPC64::ReadInstruction ( )
overridevirtual

◆ SetTargetTriple()

bool EmulateInstructionPPC64::SetTargetTriple ( const ArchSpec arch)
overridevirtual

◆ SupportsEmulatingInstructionsOfType()

bool lldb_private::EmulateInstructionPPC64::SupportsEmulatingInstructionsOfType ( InstructionType  inst_type)
inlineoverridevirtual

◆ SupportsEmulatingInstructionsOfTypeStatic()

static bool lldb_private::EmulateInstructionPPC64::SupportsEmulatingInstructionsOfTypeStatic ( InstructionType  inst_type)
inlinestatic

◆ Terminate()

void EmulateInstructionPPC64::Terminate ( )
static

Definition at line 38 of file EmulateInstructionPPC64.cpp.

◆ TestEmulation()

bool lldb_private::EmulateInstructionPPC64::TestEmulation ( Stream out_stream,
ArchSpec arch,
OptionValueDictionary test_data 
)
inlineoverridevirtual

Implements lldb_private::EmulateInstruction.

Definition at line 59 of file EmulateInstructionPPC64.h.

Member Data Documentation

◆ m_fp

uint32_t lldb_private::EmulateInstructionPPC64::m_fp = LLDB_INVALID_REGNUM
private

Definition at line 77 of file EmulateInstructionPPC64.h.


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