make includes fix from trunk
[minix.git] / include / sys / ptrace.h
blob7299db9f234b9180eaae8bca4c43da263a16404f
1 /* <sys/ptrace.h>
2 * definitions for ptrace(2)
3 */
5 #ifndef _PTRACE_H
6 #define _PTRACE_H
8 /* Trace requests. */
9 #define T_STOP -1 /* stop the process */
10 #define T_OK 0 /* enable tracing by parent for this process */
11 #define T_GETINS 1 /* return value from instruction space */
12 #define T_GETDATA 2 /* return value from data space */
13 #define T_GETUSER 3 /* return value from user process table */
14 #define T_SETINS 4 /* set value from instruction space */
15 #define T_SETDATA 5 /* set value from data space */
16 #define T_SETUSER 6 /* set value in user process table */
17 #define T_RESUME 7 /* resume execution */
18 #define T_EXIT 8 /* exit */
19 #define T_STEP 9 /* set trace bit */
20 #define T_SYSCALL 10 /* trace system call */
21 #define T_ATTACH 11 /* attach to a running process */
22 #define T_DETACH 12 /* detach from a traced process */
23 #define T_SETOPT 13 /* set trace options */
24 #define T_GETRANGE 14 /* get range of values */
25 #define T_SETRANGE 15 /* set range of values */
27 #define T_READB_INS 100 /* Read a byte from the text segment of an
28 * untraced process (only for root)
30 #define T_WRITEB_INS 101 /* Write a byte in the text segment of an
31 * untraced process (only for root)
34 /* Trace options. */
35 #define TO_TRACEFORK 0x1 /* automatically attach to forked children */
36 #define TO_ALTEXEC 0x2 /* send SIGSTOP on successful exec() */
37 #define TO_NOEXEC 0x4 /* do not send signal on successful exec() */
39 /* Trace spaces. */
40 #define TS_INS 0 /* text space */
41 #define TS_DATA 1 /* data space */
43 /* Trance range structure. */
44 struct ptrace_range {
45 int pr_space; /* space in traced process */
46 long pr_addr; /* address in traced process */
47 void *pr_ptr; /* buffer in caller process */
48 size_t pr_size; /* size of range, in bytes */
51 /* Function Prototypes. */
52 #ifndef _ANSI_H
53 #include <ansi.h>
54 #endif
56 _PROTOTYPE( long ptrace, (int _req, pid_t _pid, long _addr, long _data) );
58 #endif /* _PTRACE_H */