1#ifndef ARION_GLOBAL_DEFS_HPP
2#define ARION_GLOBAL_DEFS_HPP
13#define ARION_EXPORT __attribute__((visibility("default")))
15#define ARION_BUF_SZ 0x1000
17#define ARION_UUID_SZ 0x24
19#define ARION_SYSTEM_PAGE_SZ 0x1000
21#define ARION_FD_SZ 0x4
23#define ARION_UNIX_PATH_MAX 0x6C
25#define ARION_MAX_U32 0xFFFFFFFF
27#define ARION_MAX_U64 0xFFFFFFFFFFFFFFFF
29#define ARION_PROCESS_PID 0x1
31#define ARION_CYCLES_PER_THREAD 0x1000
#define ARION_EXPORT
Defines which symbols should be exported from the library.
Definition global_defs.hpp:13
Definition arch_x86-64.hpp:11
uint64_t SYS_PARAM
Identifies a syscall parameter.
Definition global_defs.hpp:58
uint64_t REG
Identifies a Unicorn register.
Definition global_defs.hpp:42
std::map< CPU_ARCH, std::string > NAME_FROM_ARCH
A map identifying a name corresponding a given CPU architecture.
Definition global_defs.hpp:181
std::map< std::string, CPU_ARCH > ARCH_FROM_NAME
A map identifying a CPU architecture given its name.
Definition global_defs.hpp:174
LINKAGE_TYPE
Identifies the method used to link an executable.
Definition global_defs.hpp:117
@ STATIC_LINKAGE
The executable was statically linked.
Definition global_defs.hpp:123
@ DYNAMIC_LINKAGE
The executable was dynamically linked.
Definition global_defs.hpp:121
@ UNKNOWN_LINKAGE
Unknown linkage method.
Definition global_defs.hpp:119
uint8_t RVAL8
Identifies a 8-bit register value.
Definition global_defs.hpp:44
uint32_t RVAL32
Identifies a 32-bit register value.
Definition global_defs.hpp:48
std::array< BYTE, 32 > RVAL256
Identifies a 256-bit register value.
Definition global_defs.hpp:54
uint64_t ADDR
Identifies a memory address.
Definition global_defs.hpp:36
uint16_t RVAL16
Identifies a 16-bit register value.
Definition global_defs.hpp:46
CPU_ARCH
Identifies a CPU architecture.
Definition global_defs.hpp:128
@ X8664_ARCH
The x86-64 CPU architecture.
Definition global_defs.hpp:134
@ UNKNOWN_ARCH
Unknown CPU architecture.
Definition global_defs.hpp:130
@ X86_ARCH
The x86 CPU architecture.
Definition global_defs.hpp:132
@ ARM64_ARCH
The ARM64 CPU architecture.
Definition global_defs.hpp:138
@ ARM_ARCH
The ARM CPU architecture.
Definition global_defs.hpp:136
std::array< BYTE, 64 > RVAL512
Identifies a 512-bit register value.
Definition global_defs.hpp:56
uint8_t BYTE
Identifies an 8-bit integer.
Definition global_defs.hpp:40
LOG_LEVEL
Identifies a logging level.
Definition global_defs.hpp:156
@ WARN
Potentially harmful situations or warnings.
Definition global_defs.hpp:164
@ OFF
Disables all logging output.
Definition global_defs.hpp:170
@ INFO
General informational messages about application progress.
Definition global_defs.hpp:162
@ TRACE
Fine-grained informational events, typically for debugging.
Definition global_defs.hpp:158
@ ERROR
Error events that might allow the application to continue running.
Definition global_defs.hpp:166
@ DEBUG
Debug-level messages, useful for development and troubleshooting.
Definition global_defs.hpp:160
@ CRITICAL
Severe error events that will likely lead to application termination.
Definition global_defs.hpp:168
const size_t EMPTY
A 64-bit zero-initialized value for various purposes.
Definition global_defs.hpp:61
uint8_t PROT_FLAGS
Identifies memory protection rights.
Definition global_defs.hpp:38
uint64_t RVAL64
Identifies a 64-bit register value.
Definition global_defs.hpp:50
std::array< BYTE, 16 > RVAL128
Identifies a 128-bit register value.
Definition global_defs.hpp:52
PLATFORM
Identifies an Operating System (OS).
Definition global_defs.hpp:143
@ UNKNOWN_PLATFORM
Unknown OS.
Definition global_defs.hpp:145
@ MACOS
macOS.
Definition global_defs.hpp:151
@ LINUX
Linux.
Definition global_defs.hpp:147
@ WINDOWS
Windows.
Definition global_defs.hpp:149
Identifies an OS memory segment.
Definition global_defs.hpp:83
std::string info
A string associated to this memory segment, for identification purpose.
Definition global_defs.hpp:85
PROT_FLAGS flags
Memory protection rights for this segment.
Definition global_defs.hpp:97
size_t align
The byte alignment value that this segment must respect when being mapped in memory.
Definition global_defs.hpp:91
ADDR virt_addr
The address where this segment should stand in memory.
Definition global_defs.hpp:87
size_t virt_sz
The size of this segment when allocated in memory.
Definition global_defs.hpp:93
ADDR file_addr
The offset where data for this segment holds in its associated file.
Definition global_defs.hpp:89
size_t phy_sz
The size of this segment in the file that describes it.
Definition global_defs.hpp:95
Identifies an OS signal.
Definition global_defs.hpp:102
SIGNAL(pid_t source_pid, int signo)
Definition global_defs.hpp:112
pid_t source_pid
PID of the process responsible for triggering this signal.
Definition global_defs.hpp:104
int signo
The signal number.
Definition global_defs.hpp:106
Identifies a size-agnostic register value.
Definition global_defs.hpp:64
RVAL8 r8
Used to store 8-bit register values.
Definition global_defs.hpp:66
RVAL64 r64
Used to store 64-bit register values.
Definition global_defs.hpp:72
RVAL512 r512
Used to store 512-bit register values.
Definition global_defs.hpp:78
RVAL256 r256
Used to store 256-bit register values.
Definition global_defs.hpp:76
RVAL16 r16
Used to store 16-bit register values.
Definition global_defs.hpp:68
RVAL128 r128
Used to store 128-bit register values.
Definition global_defs.hpp:74
RVAL32 r32
Used to store 32-bit register values.
Definition global_defs.hpp:70