libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
clues::RegisterDataAARCH64 Struct Reference

Native register data for the aarch64 ABI. More...

#include <aarch64.hxx>

+ Inheritance diagram for clues::RegisterDataAARCH64:

Public Member Functions

SystemCallNrAARCH64 syscallNr () const
 
auto syscallRes () const
 
SystemCallPars syscallPars () const
 
void clear ()
 
auto array () const
 

Static Public Member Functions

static auto registerNames ()
 

Public Attributes

uint64_t regs [31]
 
uint64_t sp
 
uint64_t pc
 
uint64_t pstate
 

Static Public Attributes

static constexpr auto NUM_REGS = 34
 
- Static Public Attributes inherited from clues::RegisterData< uint64_t, 6 >
static constexpr auto NUM_SYSCALL_PARS
 

Additional Inherited Members

- Public Types inherited from clues::RegisterData< uint64_t, 6 >
using register_t
 
using SystemCallPars
 This type is used to return the values of all system call parameter values in order of occurrence.
 

Detailed Description

Native register data for the aarch64 ABI.

Definition at line 13 of file aarch64.hxx.

Member Function Documentation

◆ array()

auto clues::RegisterDataAARCH64::array ( ) const
inline

Definition at line 49 of file aarch64.hxx.

49 {
50 return std::array<register_t, NUM_REGS>({
51 regs[0], regs[1], regs[2], regs[3], regs[4], regs[5], regs[6], regs[7], regs[8],
52 regs[9], regs[10], regs[11], regs[12], regs[13], regs[14], regs[15], regs[16],
53 regs[17], regs[18], regs[19], regs[20], regs[21], regs[22], regs[23], regs[24],
54 regs[25], regs[26], regs[27], regs[28], regs[29], regs[30],
55 sp, pc, pstate
56 });
57 }

◆ clear()

void clues::RegisterDataAARCH64::clear ( )
inline

Definition at line 36 of file aarch64.hxx.

36 {
37 cosmos::zero_object(*this);
38 }

◆ registerNames()

static auto clues::RegisterDataAARCH64::registerNames ( )
inlinestatic

Definition at line 40 of file aarch64.hxx.

40 {
41 return std::array<const char*, NUM_REGS>({
42 "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10",
43 "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20",
44 "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "x29", "x30",
45 "sp", "pc", "pstate"
46 });
47 }

◆ syscallNr()

SystemCallNrAARCH64 clues::RegisterDataAARCH64::syscallNr ( ) const
inline

Definition at line 19 of file aarch64.hxx.

19 {
20 // w8 (32-bit wide register access) contains the system call
21 // number, thus make sure the upper 4 bytes are ignored to be
22 // on the safe side.
23 return SystemCallNrAARCH64{regs[8] & std::numeric_limits<uint32_t>::max()};
24 }
SystemCallNrAARCH64
Native system call numbers as used by Linux on the aarch64 ABI.
Definition aarch64.hxx:31

◆ syscallPars()

SystemCallPars clues::RegisterDataAARCH64::syscallPars ( ) const
inline

Definition at line 30 of file aarch64.hxx.

30 {
31 return SystemCallPars{
32 regs[0], regs[1], regs[2], regs[3], regs[4], regs[5]
33 };
34 }
std::array< register_t, NUM_SYSCALL_PARS > SystemCallPars

◆ syscallRes()

auto clues::RegisterDataAARCH64::syscallRes ( ) const
inline

Definition at line 26 of file aarch64.hxx.

26 {
27 return regs[0];
28 }

Member Data Documentation

◆ NUM_REGS

auto clues::RegisterDataAARCH64::NUM_REGS = 34
staticconstexpr

Definition at line 17 of file aarch64.hxx.

◆ pc

uint64_t clues::RegisterDataAARCH64::pc

Definition at line 67 of file aarch64.hxx.

◆ pstate

uint64_t clues::RegisterDataAARCH64::pstate

Definition at line 68 of file aarch64.hxx.

◆ regs

uint64_t clues::RegisterDataAARCH64::regs[31]

Definition at line 65 of file aarch64.hxx.

◆ sp

uint64_t clues::RegisterDataAARCH64::sp

Definition at line 66 of file aarch64.hxx.


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