1#ifndef ARION_LNX_ARCH_X86_HPP
2#define ARION_LNX_ARCH_X86_HPP
52 UC_X86_REG_EBX, UC_X86_REG_ECX, UC_X86_REG_EDX, UC_X86_REG_ESI, UC_X86_REG_EDI, UC_X86_REG_EBP,
53 UC_X86_REG_EAX, UC_X86_REG_DS, UC_X86_REG_ES, UC_X86_REG_FS, UC_X86_REG_GS, UC_X86_REG_INVALID,
54 UC_X86_REG_EIP, UC_X86_REG_CS, UC_X86_REG_EFLAGS, UC_X86_REG_ESP, UC_X86_REG_SS};
95inline std::vector<arion::REG>
uc_st_space_regs = {UC_X86_REG_FP0, UC_X86_REG_FP1, UC_X86_REG_FP2, UC_X86_REG_FP3,
96 UC_X86_REG_FP4, UC_X86_REG_FP5, UC_X86_REG_FP6, UC_X86_REG_FP7};
110 std::map<arion::REG, arion::RVAL>
prstatus_to_regs(std::vector<arion::BYTE> prstatus)
override;
116 std::map<arion::REG, arion::RVAL>
fpregset_to_regs(std::vector<arion::BYTE> fpregset)
override;
Abstract base class for managing Linux architecture-specific details, particularly for core dump pars...
Definition lnx_arch_manager.hpp:28
Linux x86 architecture manager class for Arion.
Definition lnx_arch_x86.hpp:103
std::map< arion::REG, arion::RVAL > fpregset_to_regs(std::vector< arion::BYTE > fpregset) override
std::map< arion::REG, arion::RVAL > prstatus_to_regs(std::vector< arion::BYTE > prstatus) override
A class responsible for performing architecture specific operations in case of an x86 chip emulation.
Definition arch_x86.hpp:570
Definition lnx_kernel_utils.hpp:16
unsigned long elf_greg_t
Type definition for a single general-purpose register value in an ELF core dump.
Definition lnx_kernel_utils.hpp:100
Definition lnx_arch_x86.hpp:9
std::vector< arion::REG > uc_st_space_regs
A vector mapping the FPU stack register space (st_space) to ARION's universal register enumeration.
Definition lnx_arch_x86.hpp:95
const size_t ELF_NGREG
The number of 32-bit words (general registers) in the user_regs_struct, used for ELF notes.
Definition lnx_arch_x86.hpp:57
std::vector< arion::REG > uc_user_regs
A vector mapping the user_regs_struct fields to ARION's universal register enumeration (arion::REG).
Definition lnx_arch_x86.hpp:51
arion_lnx_type::elf_greg_t elf_gregset_t[ELF_NGREG]
Definition of the general-purpose register set type for ELF notes (NT_PRSTATUS).
Definition lnx_arch_x86.hpp:59
Common fields shared across architecture-specific elf_prstatus structures in core dumps.
Definition lnx_kernel_utils.hpp:72
Structure for a process status ELF note (NT_PRSTATUS) for x86 (32-bit), containing general registers.
Definition lnx_arch_x86.hpp:63
elf_gregset_t pr_reg
The general-purpose registers captured.
Definition lnx_arch_x86.hpp:67
int pr_fpvalid
Flag indicating whether floating-point registers are valid.
Definition lnx_arch_x86.hpp:69
Definition lnx_arch_x86.hpp:75
long cwd
FPU Control Word.
Definition lnx_arch_x86.hpp:77
long fos
FPU Data Pointer Segment Selector.
Definition lnx_arch_x86.hpp:89
long foo
FPU Data Pointer Offset.
Definition lnx_arch_x86.hpp:87
long fcs
FPU Instruction Pointer Segment Selector.
Definition lnx_arch_x86.hpp:85
long st_space[20]
FPU stack registers ST0-ST7 (80-bit extended precision).
Definition lnx_arch_x86.hpp:91
long fip
FPU Instruction Pointer Offset.
Definition lnx_arch_x86.hpp:83
long swd
FPU Status Word.
Definition lnx_arch_x86.hpp:79
long twd
FPU Tag Word.
Definition lnx_arch_x86.hpp:81
Structure representing the x86 (32-bit) general-purpose registers as saved by the Linux kernel on the...
Definition lnx_arch_x86.hpp:13
unsigned long si
Source Index register (ESI/SI).
Definition lnx_arch_x86.hpp:21
unsigned long sp
Stack Pointer register (ESP/SP).
Definition lnx_arch_x86.hpp:45
unsigned long bp
Base Pointer register (EBP/BP).
Definition lnx_arch_x86.hpp:25
unsigned long di
Destination Index register (EDI/DI).
Definition lnx_arch_x86.hpp:23
unsigned long ip
Instruction Pointer register (EIP/IP).
Definition lnx_arch_x86.hpp:39
unsigned long flags
Flags register (EFLAGS).
Definition lnx_arch_x86.hpp:43
unsigned long gs
GS Segment selector.
Definition lnx_arch_x86.hpp:35
unsigned long cx
Counter register (ECX/CX).
Definition lnx_arch_x86.hpp:17
unsigned long es
Extra Segment selector (ES).
Definition lnx_arch_x86.hpp:31
unsigned long ss
Stack Segment selector (SS).
Definition lnx_arch_x86.hpp:47
unsigned long dx
Data register (EDX/DX).
Definition lnx_arch_x86.hpp:19
unsigned long ds
Data Segment selector (DS).
Definition lnx_arch_x86.hpp:29
unsigned long orig_ax
Original value of AX/EAX before a syscall (used to detect syscall return).
Definition lnx_arch_x86.hpp:37
unsigned long cs
Code Segment selector (CS).
Definition lnx_arch_x86.hpp:41
unsigned long bx
Base register (EBX/BX).
Definition lnx_arch_x86.hpp:15
unsigned long fs
FS Segment selector.
Definition lnx_arch_x86.hpp:33
unsigned long ax
Accumulator register (EAX/AX).
Definition lnx_arch_x86.hpp:27