Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_lnx_x86_64::ArchManagerLinuxX8664 Class Reference

Linux x86-64 architecture manager class for Arion. More...

#include <lnx_arch_x86-64.hpp>

Inheritance diagram for arion_lnx_x86_64::ArchManagerLinuxX8664:
arion_x86_64::ArchManagerX8664 arion::LinuxArchManager arion::ArchManager

Private Member Functions

std::map< arion::REG, arion::RVALprstatus_to_regs (std::vector< arion::BYTE > prstatus) override
 
std::map< arion::REG, arion::RVALfpregset_to_regs (std::vector< arion::BYTE > fpregset) override
 

Additional Inherited Members

- Public Member Functions inherited from arion_x86_64::ArchManagerX8664
 ArchManagerX8664 ()
 
std::array< arion::BYTE, ARION_VSYSCALL_ENTRY_SZgen_vsyscall_entry (uint64_t syscall_no)
 
ks_engine * curr_ks () override
 
csh * curr_cs () override
 
arion::ADDR dump_tls () override
 
void load_tls (arion::ADDR new_tls) override
 
- Public Member Functions inherited from arion::ArchManager
virtual ~ArchManager ()=default
 
std::shared_ptr< ARCH_ATTRIBUTESget_attrs ()
 
bool does_hook_intr ()
 
std::string get_name_by_syscall_no (uint64_t syscall_no)
 
bool has_syscall_with_name (std::string name)
 
uint64_t get_syscall_no_by_name (std::string name)
 
std::vector< REGget_context_regs ()
 
std::unique_ptr< std::map< REG, RVAL > > dump_regs ()
 
void load_regs (std::unique_ptr< std::map< REG, RVAL > > regs)
 
bool has_idt_entry (uint64_t intno)
 
CPU_INTR get_idt_entry (uint64_t intno)
 
std::unique_ptr< std::map< REG, RVAL > > init_thread_regs (ADDR pc, ADDR sp)
 
virtual void prerun_hook (ADDR &start)
 
template<typename T >
read_reg (REG reg)
 
template<typename T >
read_reg (std::string reg_name)
 
uint64_t read_arch_reg (REG reg)
 
template<typename T >
void write_reg (REG reg, T val)
 
template<typename T >
void write_reg (std::string reg_name, T val)
 
void write_arch_reg (REG reg, uint64_t val)
 
- Public Member Functions inherited from arion::LinuxArchManager
std::unique_ptr< PARSED_COREDUMP_THREADparse_coredump_thread (std::shared_ptr< Arion > arion, std::unique_ptr< ELF_COREDUMP_THREAD > thread, std::shared_ptr< ElfParser > prog_parser)
 
- Static Public Member Functions inherited from arion::ArchManager
static std::unique_ptr< ArchManagerinitialize (std::weak_ptr< Arion > arion, CPU_ARCH arch, PLATFORM platform=PLATFORM::UNKNOWN_PLATFORM)
 
static int get_signal_from_intr (CPU_INTR intr)
 
- Protected Member Functions inherited from arion::ArchManager
 ArchManager (std::shared_ptr< ARCH_ATTRIBUTES > attrs, std::map< std::string, REG > arch_regs, std::map< REG, uint8_t > arch_regs_sz, std::vector< REG > ctxt_regs, std::map< uint64_t, CPU_INTR > cpu_idt, bool hooks_intr)
 
- Protected Attributes inherited from arion::ArchManager
std::weak_ptr< Arionarion
 The Arion instanced associated to this instance.
 
uc_engine * uc
 The Unicorn engine associated with this instance.
 
std::vector< ks_engine * > ks
 The Keystone engine associated with this instance.
 
std::vector< csh * > cs
 The Capstone engine associated with this instance.
 
std::shared_ptr< ARCH_ATTRIBUTESattrs
 Multiple architecture specific attributes, grouped in a structure for genericity purpose.
 
std::map< std::string, REGarch_regs
 Unicorn registers by their name.
 
std::map< REG, uint8_t > arch_regs_sz
 Unicorn registers sizes.
 
std::vector< REGctxt_regs
 Unicorn registers making up the context to save and restore.
 
std::map< uint64_t, CPU_INTRcpu_idt
 Interrupt Descriptor Table for the CPU.
 
bool hooks_intr
 True if the ArchManager subclass uses hook_intr to intercept syscalls.
 

Detailed Description

Linux x86-64 architecture manager class for Arion.

Member Function Documentation

◆ fpregset_to_regs()

std::map< arion::REG, arion::RVAL > arion_lnx_x86_64::ArchManagerLinuxX8664::fpregset_to_regs ( std::vector< arion::BYTE fpregset)
overrideprivate

Converts the raw ELF elf_fpregset_t data (FPU/SSE/AVX registers) into an Arion register map.

Parameters
[in]fpregsetRaw byte vector containing the elf_fpregset_t structure.
Returns
A map of Arion's universal register IDs to their values (arion::RVAL).

◆ prstatus_to_regs()

std::map< arion::REG, arion::RVAL > arion_lnx_x86_64::ArchManagerLinuxX8664::prstatus_to_regs ( std::vector< arion::BYTE prstatus)
overrideprivate

Converts the raw ELF elf_prstatus data (general registers) into an Arion register map.

Parameters
[in]prstatusRaw byte vector containing the elf_prstatus structure.
Returns
A map of Arion's universal register IDs to their 64-bit values (arion::RVAL).

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