|
|
1.1 root 1: /* ptrace.h */
2: /* structs and defines to help the user use the ptrace system call. */
3:
4: #ifndef _SYS_PTRACE_H
5: #define _SYS_PTRACE_H
6: /* has the defines to get at the registers. */
1.1.1.2 ! root 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:
1.1 root 22: /* use ptrace (3 or 6, pid, PT_EXCL, data); to read or write
23: the processes registers. */
24:
25: #define EBX 0
26: #define ECX 1
27: #define EDX 2
28: #define ESI 3
29: #define EDI 4
30: #define EBP 5
31: #define EAX 6
32: #define DS 7
33: #define ES 8
34: #define FS 9
35: #define GS 10
36: #define ORIG_EAX 11
37: #define EIP 12
38: #define CS 13
39: #define EFL 14
40: #define UESP 15
41: #define SS 16
42:
43:
44: /* this struct defines the way the registers are stored on the
45: stack during a system call. */
46:
47: struct pt_regs {
48: long ebx;
49: long ecx;
50: long edx;
51: long esi;
52: long edi;
53: long ebp;
54: long eax;
55: long ds;
56: long es;
57: long fs;
58: long gs;
59: long orig_eax;
60: long eip;
61: long cs;
62: long eflags;
63: long esp;
64: long ss;
65: };
66:
67: #endif /* _SYS_PTRACE_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.