libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
i386.hxx
1
#pragma once
2
3
// clues
4
#include <clues/regs/RegisterData.hxx>
5
#include <clues/sysnrs/i386.hxx>
6
7
namespace
clues
{
8
10
14
struct
RegisterDataI386
:
15
public
RegisterData
<uint32_t, 6> {
16
public
:
// constants
17
18
static
constexpr
auto
NUM_REGS = 17;
19
20
public
:
// functions
21
22
SystemCallNrI386
syscallNr()
const
{
23
return
SystemCallNrI386
{orig_eax};
24
}
25
26
auto
syscallRes()
const
{
27
return
eax;
28
}
29
30
SystemCallPars
syscallPars()
const
{
31
return
SystemCallPars
{
32
ebx, ecx, edx, esi, edi, ebp
33
};
34
}
35
36
void
clear() {
37
cosmos::zero_object(*
this
);
38
}
39
41
static
auto
registerNames
() {
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
}
48
50
auto
array
()
const
{
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
}
57
58
public
:
// data
59
60
register_t ebx;
61
register_t ecx;
62
register_t edx;
63
register_t esi;
64
register_t edi;
65
register_t ebp;
66
register_t eax;
67
register_t xds;
68
register_t xes;
69
register_t xfs;
70
register_t xgs;
71
register_t orig_eax;
72
register_t eip;
73
register_t xcs;
74
register_t eflags;
75
register_t esp;
76
register_t xss;
77
};
78
79
}
// end ns
clues
Definition
AutoAttachedTracee.cxx:12
clues::SystemCallNrI386
SystemCallNrI386
Native system call numbers as used by Linux on the i386 ABI.
Definition
i386.hxx:32
clues::RegisterDataI386
Native register data for the I386 32-bit X86 ABI.
Definition
i386.hxx:15
clues::RegisterDataI386::array
auto array() const
Returns a std::array offering index-based access to registers.
Definition
i386.hxx:50
clues::RegisterDataI386::registerNames
static auto registerNames()
Returns the human-readable names for the registers in the order found in array()
Definition
i386.hxx:41
clues::RegisterData
Base class for ABI specific register data.
Definition
RegisterData.hxx:40
clues::RegisterData< uint32_t, 6 >::SystemCallPars
std::array< register_t, NUM_SYSCALL_PARS > SystemCallPars
Definition
RegisterData.hxx:49
include
regs
i386.hxx
Generated by
1.13.2