1 #ifndef _LINUX_PTRACE_H
2 #define _LINUX_PTRACE_H
3
4
5
6
7
8 #define PTRACE_TRACEME 0
9 #define PTRACE_PEEKTEXT 1
10 #define PTRACE_PEEKDATA 2
11 #define PTRACE_PEEKUSR 3
12 #define PTRACE_POKETEXT 4
13 #define PTRACE_POKEDATA 5
14 #define PTRACE_POKEUSR 6
15 #define PTRACE_CONT 7
16 #define PTRACE_KILL 8
17 #define PTRACE_SINGLESTEP 9
18
19 #define PTRACE_ATTACH 0x10
20 #define PTRACE_DETACH 0x11
21
22 #define PTRACE_SYSCALL 24
23
24
25
26
27 #define EBX 0
28 #define ECX 1
29 #define EDX 2
30 #define ESI 3
31 #define EDI 4
32 #define EBP 5
33 #define EAX 6
34 #define DS 7
35 #define ES 8
36 #define FS 9
37 #define GS 10
38 #define ORIG_EAX 11
39 #define EIP 12
40 #define CS 13
41 #define EFL 14
42 #define UESP 15
43 #define SS 16
44
45
46
47
48
49 struct pt_regs {
50 long ebx;
51 long ecx;
52 long edx;
53 long esi;
54 long edi;
55 long ebp;
56 long eax;
57 long ds;
58 long es;
59 long fs;
60 long gs;
61 long orig_eax;
62 long eip;
63 long cs;
64 long eflags;
65 long esp;
66 long ss;
67 };
68
69 #endif