]>
Commit | Line | Data |
---|---|---|
d5efd131 | 1 | /* `ptrace' debugger support interface. Linux/ia64 version. |
688903eb | 2 | Copyright (C) 2001-2018 Free Software Foundation, Inc. |
d5efd131 MF |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
75efb018 MF |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
d5efd131 MF |
18 | |
19 | #ifndef _SYS_PTRACE_H | |
20 | #define _SYS_PTRACE_H 1 | |
21 | ||
22 | #include <features.h> | |
23 | #include <sys/ucontext.h> | |
4fa9b3bf | 24 | #include <bits/sigcontext.h> |
521c6785 | 25 | #include <bits/types.h> |
d5efd131 MF |
26 | |
27 | __BEGIN_DECLS | |
28 | ||
29 | /* Type of the REQUEST argument to `ptrace.' */ | |
30 | enum __ptrace_request | |
31 | { | |
32 | /* Indicate that the process making this request should be traced. | |
33 | All signals received by this process can be intercepted by its | |
34 | parent, and its parent can use the other `ptrace' requests. */ | |
35 | PTRACE_TRACEME = 0, | |
36 | #define PT_TRACE_ME PTRACE_TRACEME | |
37 | ||
38 | /* Return the word in the process's text space at address ADDR. */ | |
39 | PTRACE_PEEKTEXT = 1, | |
40 | #define PT_READ_I PTRACE_PEEKTEXT | |
41 | ||
42 | /* Return the word in the process's data space at address ADDR. */ | |
43 | PTRACE_PEEKDATA = 2, | |
44 | #define PT_READ_D PTRACE_PEEKDATA | |
45 | ||
46 | /* Return the word in the process's user area at offset ADDR. */ | |
47 | PTRACE_PEEKUSER = 3, | |
48 | #define PT_READ_U PTRACE_PEEKUSER | |
49 | ||
50 | /* Write the word DATA into the process's text space at address ADDR. */ | |
51 | PTRACE_POKETEXT = 4, | |
52 | #define PT_WRITE_I PTRACE_POKETEXT | |
53 | ||
54 | /* Write the word DATA into the process's data space at address ADDR. */ | |
55 | PTRACE_POKEDATA = 5, | |
56 | #define PT_WRITE_D PTRACE_POKEDATA | |
57 | ||
58 | /* Write the word DATA into the process's user area at offset ADDR. */ | |
59 | PTRACE_POKEUSER = 6, | |
60 | #define PT_WRITE_U PTRACE_POKEUSER | |
61 | ||
62 | /* Continue the process. */ | |
63 | PTRACE_CONT = 7, | |
64 | #define PT_CONTINUE PTRACE_CONT | |
65 | ||
66 | /* Kill the process. */ | |
67 | PTRACE_KILL = 8, | |
68 | #define PT_KILL PTRACE_KILL | |
69 | ||
ac583f50 | 70 | /* Single step the process. */ |
d5efd131 MF |
71 | PTRACE_SINGLESTEP = 9, |
72 | #define PT_STEP PTRACE_SINGLESTEP | |
73 | ||
74 | /* Execute process until next taken branch. */ | |
75 | PTRACE_SINGLEBLOCK = 12, | |
76 | #define PT_STEPBLOCK PTRACE_SINGLEBLOCK | |
77 | ||
78 | /* Attach to a process that is already running. */ | |
79 | PTRACE_ATTACH = 16, | |
80 | #define PT_ATTACH PTRACE_ATTACH | |
81 | ||
82 | /* Detach from a process attached to with PTRACE_ATTACH. */ | |
83 | PTRACE_DETACH = 17, | |
84 | #define PT_DETACH PTRACE_DETACH | |
85 | ||
86 | /* Get all registers (pt_all_user_regs) in one shot */ | |
87 | PTRACE_GETREGS = 18, | |
88 | #define PT_GETREGS PTRACE_GETREGS | |
89 | ||
90 | /* Set all registers (pt_all_user_regs) in one shot */ | |
91 | PTRACE_SETREGS = 19, | |
92 | #define PT_SETREGS PTRACE_SETREGS | |
93 | ||
ac583f50 | 94 | /* Continue and stop at the next entry to or return from syscall. */ |
d5efd131 MF |
95 | PTRACE_SYSCALL = 24, |
96 | #define PT_SYSCALL PTRACE_SYSCALL | |
97 | ||
98 | /* Set ptrace filter options. */ | |
99 | PTRACE_SETOPTIONS = 0x4200, | |
100 | #define PT_SETOPTIONS PTRACE_SETOPTIONS | |
101 | ||
102 | /* Get last ptrace message. */ | |
103 | PTRACE_GETEVENTMSG = 0x4201, | |
104 | #define PT_GETEVENTMSG PTRACE_GETEVENTMSG | |
105 | ||
106 | /* Get siginfo for process. */ | |
107 | PTRACE_GETSIGINFO = 0x4202, | |
108 | #define PT_GETSIGINFO PTRACE_GETSIGINFO | |
109 | ||
110 | /* Set new siginfo for process. */ | |
111 | PTRACE_SETSIGINFO = 0x4203, | |
112 | #define PT_SETSIGINFO PTRACE_SETSIGINFO | |
113 | ||
114 | /* Get register content. */ | |
115 | PTRACE_GETREGSET = 0x4204, | |
116 | #define PTRACE_GETREGSET PTRACE_GETREGSET | |
117 | ||
118 | /* Set register content. */ | |
119 | PTRACE_SETREGSET = 0x4205, | |
120 | #define PTRACE_SETREGSET PTRACE_SETREGSET | |
121 | ||
122 | /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect | |
123 | signal or group stop state. */ | |
124 | PTRACE_SEIZE = 0x4206, | |
125 | #define PTRACE_SEIZE PTRACE_SEIZE | |
126 | ||
127 | /* Trap seized tracee. */ | |
128 | PTRACE_INTERRUPT = 0x4207, | |
129 | #define PTRACE_INTERRUPT PTRACE_INTERRUPT | |
130 | ||
131 | /* Wait for next group event. */ | |
521c6785 AJ |
132 | PTRACE_LISTEN = 0x4208, |
133 | #define PTRACE_LISTEN PTRACE_LISTEN | |
134 | ||
ac583f50 | 135 | /* Retrieve siginfo_t structures without removing signals from a queue. */ |
fb53a27c | 136 | PTRACE_PEEKSIGINFO = 0x4209, |
521c6785 | 137 | #define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO |
fb53a27c | 138 | |
ac583f50 | 139 | /* Get the mask of blocked signals. */ |
fb53a27c JM |
140 | PTRACE_GETSIGMASK = 0x420a, |
141 | #define PTRACE_GETSIGMASK PTRACE_GETSIGMASK | |
142 | ||
ac583f50 | 143 | /* Change the mask of blocked signals. */ |
fb53a27c JM |
144 | PTRACE_SETSIGMASK = 0x420b, |
145 | #define PTRACE_SETSIGMASK PTRACE_SETSIGMASK | |
146 | ||
ac583f50 | 147 | /* Get seccomp BPF filters. */ |
9320ca88 | 148 | PTRACE_SECCOMP_GET_FILTER = 0x420c, |
fb53a27c | 149 | #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER |
9320ca88 JM |
150 | |
151 | /* Get seccomp BPF filter metadata. */ | |
152 | PTRACE_SECCOMP_GET_METADATA = 0x420d | |
153 | #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA | |
d5efd131 MF |
154 | }; |
155 | ||
156 | ||
d5efd131 | 157 | /* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */ |
c8c9ab8b | 158 | struct __pt_all_user_regs |
d5efd131 MF |
159 | { |
160 | unsigned long nat; | |
161 | unsigned long cr_iip; | |
162 | unsigned long cfm; | |
163 | unsigned long cr_ipsr; | |
164 | unsigned long pr; | |
165 | ||
166 | unsigned long gr[32]; | |
167 | unsigned long br[8]; | |
168 | unsigned long ar[128]; | |
c8c9ab8b | 169 | struct __ia64_fpreg fr[128]; |
d5efd131 MF |
170 | }; |
171 | ||
7e21972b | 172 | #include <bits/ptrace-shared.h> |
d5efd131 MF |
173 | |
174 | __END_DECLS | |
175 | ||
176 | #endif /* _SYS_PTRACE_H */ |