Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion_x86_64 Namespace Reference

Classes

class  ArchManagerX8664
 A class responsible for performing architecture specific operations in case of an x86-64 chip emulation. More...
 

Variables

std::map< uint64_t, std::string > NAME_BY_SYSCALL_NO
 A map identifying a x86-64 syscall name given its number.
 
std::map< std::string, arion::REGARCH_REGS
 A map identifying a Unicorn x86-64 register given its name.
 
std::map< arion::REG, uint8_t > ARCH_REGS_SZ
 A map identifying a Unicorn x86-64 register size given the register.
 
std::vector< arion::REGCTXT_REGS
 The list of high-level x86-64 registers that make up the context to be saved and restored.
 
std::map< uint64_t, arion::CPU_INTRIDT
 The x86-64 Interrupt Descriptor Table.
 
arion::ABI_REGISTERS ABI_REGS = arion::ABI_REGISTERS(UC_X86_REG_RIP, UC_X86_REG_RSP)
 Unicorn x86-64 PC and SP registers for genericity.
 
arion::ABI_CALLING_CONVENTION ABI_CALLING_CONV
 Unicorn x86-64 registers involved in calling convention.
 
arion::ABI_SYSCALLING_CONVENTION ABI_SYSCALLING_CONV
 Unicorn x86-64 registers involved in syscalling convention.
 
arion::KERNEL_SEG_FLAGS SEG_FLAGS = ARION_VVAR_PRESENT | ARION_VDSO_PRESENT | ARION_VSYSCALL_PRESENT
 x86-64 flags telling the loader which kernel segments should be mapped in memory.
 
uint32_t HWCAP2 = 2
 Some well working x86-64 chip HWCAP2 value.
 
uint32_t HWCAP = 0xbfebfbff
 Some well working x86-64 chip HWCAP value.
 
const size_t PTR_SZ = 8
 Size in bytes of a pointer in a x86-64 chip.
 
const uint16_t ARCH_SZ = 64
 Size in bits of the x86-64 general-purpose registers.
 
arion::CPU_ARCH ARCH = arion::CPU_ARCH::X8664_ARCH
 Arion CPU_ARCH for x86-64.
 
arion::ARCH_ATTRIBUTES ARCH_ATTRS
 Multiple architecture specific attributes for x86-64, grouped in a structure for genericity purpose.
 

Variable Documentation

◆ ABI_CALLING_CONV

arion::ABI_CALLING_CONVENTION arion_x86_64::ABI_CALLING_CONV
inline
Initial value:
UC_X86_REG_RAX, {UC_X86_REG_RDI, UC_X86_REG_RSI, UC_X86_REG_RDX, UC_X86_REG_RCX, UC_X86_REG_R8, UC_X86_REG_R9})
Unicorn registers involved in calling convention.
Definition arch_manager.hpp:52

Unicorn x86-64 registers involved in calling convention.

◆ ABI_REGS

arion::ABI_REGISTERS arion_x86_64::ABI_REGS = arion::ABI_REGISTERS(UC_X86_REG_RIP, UC_X86_REG_RSP)
inline

Unicorn x86-64 PC and SP registers for genericity.

◆ ABI_SYSCALLING_CONV

arion::ABI_SYSCALLING_CONVENTION arion_x86_64::ABI_SYSCALLING_CONV
inline
Initial value:
UC_X86_REG_RAX, UC_X86_REG_RAX,
{UC_X86_REG_RDI, UC_X86_REG_RSI, UC_X86_REG_RDX, UC_X86_REG_R10, UC_X86_REG_R8, UC_X86_REG_R9})
Unicorn registers involved in syscalling convention.
Definition arch_manager.hpp:68

Unicorn x86-64 registers involved in syscalling convention.

◆ ARCH

arion::CPU_ARCH arion_x86_64::ARCH = arion::CPU_ARCH::X8664_ARCH
inline

Arion CPU_ARCH for x86-64.

◆ ARCH_ATTRS

arion::ARCH_ATTRIBUTES arion_x86_64::ARCH_ATTRS
inline
Initial value:
=
arion::ARCH_ATTRIBUTES(ARCH, ARCH_SZ, PTR_SZ, HWCAP, HWCAP2, SEG_FLAGS, ABI_REGS, ABI_CALLING_CONV,
ABI_SYSCALLING_CONV, NAME_BY_SYSCALL_NO)
Multiple architecture specific attributes, grouped in a structure for genericity purpose.
Definition arch_manager.hpp:87

Multiple architecture specific attributes for x86-64, grouped in a structure for genericity purpose.

◆ ARCH_REGS

std::map<std::string, arion::REG> arion_x86_64::ARCH_REGS
inline

A map identifying a Unicorn x86-64 register given its name.

◆ ARCH_REGS_SZ

std::map<arion::REG, uint8_t> arion_x86_64::ARCH_REGS_SZ
inline

A map identifying a Unicorn x86-64 register size given the register.

◆ ARCH_SZ

const uint16_t arion_x86_64::ARCH_SZ = 64
inline

Size in bits of the x86-64 general-purpose registers.

◆ CTXT_REGS

std::vector<arion::REG> arion_x86_64::CTXT_REGS
inline
Initial value:
= {
UC_X86_REG_FS, UC_X86_REG_GS, UC_X86_REG_RAX, UC_X86_REG_RBP, UC_X86_REG_RBX, UC_X86_REG_RCX,
UC_X86_REG_RDI, UC_X86_REG_RDX, UC_X86_REG_RIP, UC_X86_REG_RSI, UC_X86_REG_RSP, UC_X86_REG_SS,
UC_X86_REG_CS, UC_X86_REG_DS, UC_X86_REG_FP0, UC_X86_REG_FP1, UC_X86_REG_FP2, UC_X86_REG_FP3,
UC_X86_REG_FP4, UC_X86_REG_FP5, UC_X86_REG_FP6, UC_X86_REG_FP7, UC_X86_REG_R8, UC_X86_REG_R9,
UC_X86_REG_R10, UC_X86_REG_R11, UC_X86_REG_R12, UC_X86_REG_R13, UC_X86_REG_R14, UC_X86_REG_R15,
UC_X86_REG_ST0, UC_X86_REG_ST1, UC_X86_REG_ST2, UC_X86_REG_ST3, UC_X86_REG_ST4, UC_X86_REG_ST5,
UC_X86_REG_ST6, UC_X86_REG_ST7, UC_X86_REG_ZMM0, UC_X86_REG_ZMM1, UC_X86_REG_ZMM2, UC_X86_REG_ZMM3,
UC_X86_REG_ZMM4, UC_X86_REG_ZMM5, UC_X86_REG_ZMM6, UC_X86_REG_ZMM7, UC_X86_REG_ZMM8, UC_X86_REG_ZMM9,
UC_X86_REG_ZMM10, UC_X86_REG_ZMM11, UC_X86_REG_ZMM12, UC_X86_REG_ZMM13, UC_X86_REG_ZMM14, UC_X86_REG_ZMM15,
UC_X86_REG_ZMM16, UC_X86_REG_ZMM17, UC_X86_REG_ZMM18, UC_X86_REG_ZMM19, UC_X86_REG_ZMM20, UC_X86_REG_ZMM21,
UC_X86_REG_ZMM22, UC_X86_REG_ZMM23, UC_X86_REG_ZMM24, UC_X86_REG_ZMM25, UC_X86_REG_ZMM26, UC_X86_REG_ZMM27,
UC_X86_REG_ZMM28, UC_X86_REG_ZMM29, UC_X86_REG_ZMM30, UC_X86_REG_ZMM31, UC_X86_REG_FS_BASE, UC_X86_REG_GS_BASE,
UC_X86_REG_RFLAGS,
}

The list of high-level x86-64 registers that make up the context to be saved and restored.

◆ HWCAP

uint32_t arion_x86_64::HWCAP = 0xbfebfbff
inline

Some well working x86-64 chip HWCAP value.

◆ HWCAP2

uint32_t arion_x86_64::HWCAP2 = 2
inline

Some well working x86-64 chip HWCAP2 value.

◆ IDT

std::map<uint64_t, arion::CPU_INTR> arion_x86_64::IDT
inline
Initial value:
@ X87_FLOATING_POINT_EXCEPTION
x87 Floating-point exception.
Definition arch_manager.hpp:148
@ OVERFLOW
Overflow exception.
Definition arch_manager.hpp:136
@ DOUBLE_FAULT
Double fault.
Definition arch_manager.hpp:140
@ INVALID_OPCODE
Invalid opcode exception.
Definition arch_manager.hpp:138
@ MACHINE_CHECK
Machine check.
Definition arch_manager.hpp:150
@ DEVICE_NOT_AVAILABLE
Device not available.
Definition arch_manager.hpp:139
@ RESERVED
Reserved interrupt vector.
Definition arch_manager.hpp:147
@ BOUND_RANGE_EXCEEDED
Bound range exceeded.
Definition arch_manager.hpp:137
@ PAGE_FAULT
Page fault.
Definition arch_manager.hpp:146
@ SIMD_FLOATING_POINT_ERROR
SIMD Floating-point exception.
Definition arch_manager.hpp:151
@ DIVIDE_ERROR
Divide-by-zero error.
Definition arch_manager.hpp:132
@ ALIGNMENT_CHECK
Alignment check.
Definition arch_manager.hpp:149
@ GENERAL_PROTECTION_FAULT
General protection fault.
Definition arch_manager.hpp:145
@ COPROCESSOR_SEGMENT_OVERRUN
Coprocessor segment overrun.
Definition arch_manager.hpp:141
@ STACK_SEGMENT_FAULT
Stack segment fault.
Definition arch_manager.hpp:144
@ DEBUG_EXCEPTION
Debug exception.
Definition arch_manager.hpp:133
@ BREAKPOINT
Breakpoint exception.
Definition arch_manager.hpp:135
@ INVALID_TSS
Invalid Task State Segment.
Definition arch_manager.hpp:142
@ NON_MASKABLE_INTR
Non-maskable interrupt.
Definition arch_manager.hpp:134
@ SEGMENT_NOT_PRESENT
Segment not present.
Definition arch_manager.hpp:143

The x86-64 Interrupt Descriptor Table.

◆ NAME_BY_SYSCALL_NO

std::map<uint64_t, std::string> arion_x86_64::NAME_BY_SYSCALL_NO
inline

A map identifying a x86-64 syscall name given its number.

◆ PTR_SZ

const size_t arion_x86_64::PTR_SZ = 8
inline

Size in bytes of a pointer in a x86-64 chip.

◆ SEG_FLAGS

x86-64 flags telling the loader which kernel segments should be mapped in memory.