|
54 | 54 | /* flags in @data for PTRACE_SEIZE */
|
55 | 55 | #define PTRACE_SEIZE_DEVEL 0x80000000 /* temp flag for development */
|
56 | 56 |
|
57 |
| -/* options set using PTRACE_SETOPTIONS */ |
58 |
| -#define PTRACE_O_TRACESYSGOOD 0x00000001 |
59 |
| -#define PTRACE_O_TRACEFORK 0x00000002 |
60 |
| -#define PTRACE_O_TRACEVFORK 0x00000004 |
61 |
| -#define PTRACE_O_TRACECLONE 0x00000008 |
62 |
| -#define PTRACE_O_TRACEEXEC 0x00000010 |
63 |
| -#define PTRACE_O_TRACEVFORKDONE 0x00000020 |
64 |
| -#define PTRACE_O_TRACEEXIT 0x00000040 |
65 |
| - |
66 |
| -#define PTRACE_O_MASK 0x0000007f |
67 |
| - |
68 | 57 | /* Wait extended result codes for the above trace options. */
|
69 | 58 | #define PTRACE_EVENT_FORK 1
|
70 | 59 | #define PTRACE_EVENT_VFORK 2
|
|
74 | 63 | #define PTRACE_EVENT_EXIT 6
|
75 | 64 | #define PTRACE_EVENT_STOP 7
|
76 | 65 |
|
| 66 | +/* options set using PTRACE_SETOPTIONS */ |
| 67 | +#define PTRACE_O_TRACESYSGOOD 1 |
| 68 | +#define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK) |
| 69 | +#define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK) |
| 70 | +#define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE) |
| 71 | +#define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC) |
| 72 | +#define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE) |
| 73 | +#define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT) |
| 74 | + |
| 75 | +#define PTRACE_O_MASK 0x0000007f |
| 76 | + |
77 | 77 | #include <asm/ptrace.h>
|
78 | 78 |
|
79 | 79 | #ifdef __KERNEL__
|
|
88 | 88 | #define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */
|
89 | 89 | #define PT_PTRACED 0x00000001
|
90 | 90 | #define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */
|
91 |
| -#define PT_TRACESYSGOOD 0x00000004 |
92 |
| -#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */ |
| 91 | +#define PT_PTRACE_CAP 0x00000004 /* ptracer can follow suid-exec */ |
93 | 92 |
|
| 93 | +#define PT_OPT_FLAG_SHIFT 3 |
94 | 94 | /* PT_TRACE_* event enable flags */
|
95 |
| -#define PT_EVENT_FLAG_SHIFT 4 |
96 |
| -#define PT_EVENT_FLAG(event) (1 << (PT_EVENT_FLAG_SHIFT + (event) - 1)) |
97 |
| - |
| 95 | +#define PT_EVENT_FLAG(event) (1 << (PT_OPT_FLAG_SHIFT + (event))) |
| 96 | +#define PT_TRACESYSGOOD PT_EVENT_FLAG(0) |
98 | 97 | #define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK)
|
99 | 98 | #define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK)
|
100 | 99 | #define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE)
|
101 | 100 | #define PT_TRACE_EXEC PT_EVENT_FLAG(PTRACE_EVENT_EXEC)
|
102 | 101 | #define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE)
|
103 | 102 | #define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT)
|
104 | 103 |
|
105 |
| -#define PT_TRACE_MASK 0x000003f4 |
106 |
| - |
107 | 104 | /* single stepping state bits (used on ARM and PA-RISC) */
|
108 | 105 | #define PT_SINGLESTEP_BIT 31
|
109 | 106 | #define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT)
|
|
0 commit comments