Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
global_defs.hpp File Reference
#include <array>
#include <cstdint>
#include <cstring>
#include <map>
#include <stddef.h>
#include <string>
#include <sys/types.h>

Go to the source code of this file.

Classes

union  arion::RVAL
 Identifies a size-agnostic register value. More...
 
struct  arion::SEGMENT
 Identifies an OS memory segment. More...
 
struct  arion::SIGNAL
 Identifies an OS signal. More...
 

Namespaces

namespace  arion
 

Macros

#define ARION_EXPORT   __attribute__((visibility("default")))
 Defines which symbols should be exported from the library.
 
#define ARION_BUF_SZ   0x1000
 Defines a generic value that many buffers use to initialize their size.
 
#define ARION_UUID_SZ   0x24
 Size of a UUID buffer.
 
#define ARION_SYSTEM_PAGE_SZ   0x1000
 The 4 KB memory page size that most systems use.
 
#define ARION_FD_SZ   0x4
 Size of a file descriptor (int).
 
#define ARION_UNIX_PATH_MAX   0x6C
 Maximum size for a UNIX path.
 
#define ARION_MAX_U32   0xFFFFFFFF
 Maximum number for an unsigned 32-bit integer.
 
#define ARION_MAX_U64   0xFFFFFFFFFFFFFFFF
 Maximum number for an unsigned 64-bit integer.
 
#define ARION_PROCESS_PID   0x1
 First PID value to be associated with an emulated process.
 
#define ARION_CYCLES_PER_THREAD   0x1000
 Number of CPU cycles for a thread before switching to another one.
 

Typedefs

using arion::ADDR = uint64_t
 Identifies a memory address.
 
using arion::PROT_FLAGS = uint8_t
 Identifies memory protection rights.
 
using arion::BYTE = uint8_t
 Identifies an 8-bit integer.
 
using arion::REG = uint64_t
 Identifies a Unicorn register.
 
using arion::RVAL8 = uint8_t
 Identifies a 8-bit register value.
 
using arion::RVAL16 = uint16_t
 Identifies a 16-bit register value.
 
using arion::RVAL32 = uint32_t
 Identifies a 32-bit register value.
 
using arion::RVAL64 = uint64_t
 Identifies a 64-bit register value.
 
using arion::RVAL128 = std::array< BYTE, 16 >
 Identifies a 128-bit register value.
 
using arion::RVAL256 = std::array< BYTE, 32 >
 Identifies a 256-bit register value.
 
using arion::RVAL512 = std::array< BYTE, 64 >
 Identifies a 512-bit register value.
 
using arion::SYS_PARAM = uint64_t
 Identifies a syscall parameter.
 

Enumerations

enum  arion::LINKAGE_TYPE { arion::UNKNOWN_LINKAGE , arion::DYNAMIC_LINKAGE , arion::STATIC_LINKAGE }
 Identifies the method used to link an executable. More...
 
enum  arion::CPU_ARCH {
  arion::UNKNOWN_ARCH , arion::X86_ARCH , arion::X8664_ARCH , arion::ARM_ARCH ,
  arion::ARM64_ARCH
}
 Identifies a CPU architecture. More...
 
enum  arion::PLATFORM { arion::UNKNOWN_PLATFORM , arion::LINUX , arion::WINDOWS , arion::MACOS }
 Identifies an Operating System (OS). More...
 
enum  arion::LOG_LEVEL {
  arion::TRACE , arion::DEBUG , arion::INFO , arion::WARN ,
  arion::ERROR , arion::CRITICAL , arion::OFF
}
 Identifies a logging level. More...
 

Variables

const size_t arion::EMPTY = 0
 A 64-bit zero-initialized value for various purposes.
 
std::map< std::string, CPU_ARCHarion::ARCH_FROM_NAME
 A map identifying a CPU architecture given its name.
 
std::map< CPU_ARCH, std::string > arion::NAME_FROM_ARCH
 A map identifying a name corresponding a given CPU architecture.
 

Macro Definition Documentation

◆ ARION_BUF_SZ

#define ARION_BUF_SZ   0x1000

Defines a generic value that many buffers use to initialize their size.

◆ ARION_CYCLES_PER_THREAD

#define ARION_CYCLES_PER_THREAD   0x1000

Number of CPU cycles for a thread before switching to another one.

◆ ARION_EXPORT

#define ARION_EXPORT   __attribute__((visibility("default")))

Defines which symbols should be exported from the library.

◆ ARION_FD_SZ

#define ARION_FD_SZ   0x4

Size of a file descriptor (int).

◆ ARION_MAX_U32

#define ARION_MAX_U32   0xFFFFFFFF

Maximum number for an unsigned 32-bit integer.

◆ ARION_MAX_U64

#define ARION_MAX_U64   0xFFFFFFFFFFFFFFFF

Maximum number for an unsigned 64-bit integer.

◆ ARION_PROCESS_PID

#define ARION_PROCESS_PID   0x1

First PID value to be associated with an emulated process.

◆ ARION_SYSTEM_PAGE_SZ

#define ARION_SYSTEM_PAGE_SZ   0x1000

The 4 KB memory page size that most systems use.

◆ ARION_UNIX_PATH_MAX

#define ARION_UNIX_PATH_MAX   0x6C

Maximum size for a UNIX path.

◆ ARION_UUID_SZ

#define ARION_UUID_SZ   0x24

Size of a UUID buffer.