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

Native register data for the I386 32-bit X86 ABI. More...

#include <i386.hxx>

+ Inheritance diagram for clues::RegisterDataI386:

Public Member Functions

SystemCallNrI386 syscallNr () const
 
auto syscallRes () const
 
SystemCallPars syscallPars () const
 
void clear ()
 
auto array () const
 Returns a std::array offering index-based access to registers.
 

Static Public Member Functions

static auto registerNames ()
 Returns the human-readable names for the registers in the order found in array()
 

Public Attributes

register_t ebx
 
register_t ecx
 
register_t edx
 
register_t esi
 
register_t edi
 
register_t ebp
 
register_t eax
 
register_t xds
 
register_t xes
 
register_t xfs
 
register_t xgs
 
register_t orig_eax
 
register_t eip
 
register_t xcs
 
register_t eflags
 
register_t esp
 
register_t xss
 

Static Public Attributes

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

Additional Inherited Members

- Public Types inherited from clues::RegisterData< uint32_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 I386 32-bit X86 ABI.

The kernel definition of this is found in user_regs_struct in x86/include/asm/user_32.h (last seen in linux 6.12).

Definition at line 14 of file i386.hxx.

Member Function Documentation

◆ array()

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

Returns a std::array offering index-based access to registers.

Definition at line 50 of file i386.hxx.

50 {
51 return std::array<register_t, NUM_REGS>({
52 ebx, ecx, edx, esi, edi, ebp, eax, xds,
53 xes, xfs, xgs, orig_eax, eip, xcs, eflags,
54 esp, xss
55 });
56 }

◆ clear()

void clues::RegisterDataI386::clear ( )
inline

Definition at line 36 of file i386.hxx.

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

◆ registerNames()

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

Returns the human-readable names for the registers in the order found in array()

Definition at line 41 of file i386.hxx.

41 {
42 return std::array<const char*, NUM_REGS>({
43 "ebx", "ecx", "edx", "esi", "edi", "ebp", "eax",
44 "xds", "xes", "xfs", "xgs", "orig_eax", "eip", "xcs",
45 "eflags", "esp", "xss"
46 });
47 }

◆ syscallNr()

SystemCallNrI386 clues::RegisterDataI386::syscallNr ( ) const
inline

Definition at line 22 of file i386.hxx.

22 {
23 return SystemCallNrI386{orig_eax};
24 }
SystemCallNrI386
Native system call numbers as used by Linux on the i386 ABI.
Definition i386.hxx:32

◆ syscallPars()

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

Definition at line 30 of file i386.hxx.

30 {
31 return SystemCallPars{
32 ebx, ecx, edx, esi, edi, ebp
33 };
34 }
std::array< register_t, NUM_SYSCALL_PARS > SystemCallPars

◆ syscallRes()

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

Definition at line 26 of file i386.hxx.

26 {
27 return eax;
28 }

Member Data Documentation

◆ eax

register_t clues::RegisterDataI386::eax

Definition at line 66 of file i386.hxx.

◆ ebp

register_t clues::RegisterDataI386::ebp

Definition at line 65 of file i386.hxx.

◆ ebx

register_t clues::RegisterDataI386::ebx

Definition at line 60 of file i386.hxx.

◆ ecx

register_t clues::RegisterDataI386::ecx

Definition at line 61 of file i386.hxx.

◆ edi

register_t clues::RegisterDataI386::edi

Definition at line 64 of file i386.hxx.

◆ edx

register_t clues::RegisterDataI386::edx

Definition at line 62 of file i386.hxx.

◆ eflags

register_t clues::RegisterDataI386::eflags

Definition at line 74 of file i386.hxx.

◆ eip

register_t clues::RegisterDataI386::eip

Definition at line 72 of file i386.hxx.

◆ esi

register_t clues::RegisterDataI386::esi

Definition at line 63 of file i386.hxx.

◆ esp

register_t clues::RegisterDataI386::esp

Definition at line 75 of file i386.hxx.

◆ NUM_REGS

auto clues::RegisterDataI386::NUM_REGS = 17
staticconstexpr

Definition at line 18 of file i386.hxx.

◆ orig_eax

register_t clues::RegisterDataI386::orig_eax

Definition at line 71 of file i386.hxx.

◆ xcs

register_t clues::RegisterDataI386::xcs

Definition at line 73 of file i386.hxx.

◆ xds

register_t clues::RegisterDataI386::xds

Definition at line 67 of file i386.hxx.

◆ xes

register_t clues::RegisterDataI386::xes

Definition at line 68 of file i386.hxx.

◆ xfs

register_t clues::RegisterDataI386::xfs

Definition at line 69 of file i386.hxx.

◆ xgs

register_t clues::RegisterDataI386::xgs

Definition at line 70 of file i386.hxx.

◆ xss

register_t clues::RegisterDataI386::xss

Definition at line 76 of file i386.hxx.


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