]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
linux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807]
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / powerpc / sys / ptrace.h
1 /* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2018 Free Software Foundation, Inc.
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
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19 #ifndef _SYS_PTRACE_H
20 #define _SYS_PTRACE_H 1
21
22 #include <features.h>
23 #include <bits/types.h>
24
25 __BEGIN_DECLS
26
27 #if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H
28 /* Do not let Linux headers macros interfere with enum __ptrace_request. */
29 # undef PTRACE_ATTACH
30 # undef PTRACE_CONT
31 # undef PTRACE_DETACH
32 # undef PTRACE_GET_DEBUGREG
33 # undef PTRACE_GETEVENTMSG
34 # undef PTRACE_GETEVRREGS
35 # undef PTRACE_GETFPREGS
36 # undef PTRACE_GETREGS
37 # undef PTRACE_GETREGS64
38 # undef PTRACE_GETREGSET
39 # undef PTRACE_GETSIGINFO
40 # undef PTRACE_GETSIGMASK
41 # undef PTRACE_GETVRREGS
42 # undef PTRACE_GETVSRREGS
43 # undef PTRACE_INTERRUPT
44 # undef PTRACE_KILL
45 # undef PTRACE_LISTEN
46 # undef PTRACE_PEEKDATA
47 # undef PTRACE_PEEKSIGINFO
48 # undef PTRACE_PEEKTEXT
49 # undef PTRACE_POKEDATA
50 # undef PTRACE_POKETEXT
51 # undef PTRACE_SECCOMP_GET_FILTER
52 # undef PTRACE_SEIZE
53 # undef PTRACE_SET_DEBUGREG
54 # undef PTRACE_SETEVRREGS
55 # undef PTRACE_SETFPREGS
56 # undef PTRACE_SETOPTIONS
57 # undef PTRACE_SETREGS
58 # undef PTRACE_SETREGS64
59 # undef PTRACE_SETREGSET
60 # undef PTRACE_SETSIGINFO
61 # undef PTRACE_SETSIGMASK
62 # undef PTRACE_SETVRREGS
63 # undef PTRACE_SETVSRREGS
64 # undef PTRACE_SINGLEBLOCK
65 # undef PTRACE_SINGLESTEP
66 # undef PTRACE_SYSCALL
67 # undef PTRACE_TRACEME
68 #endif
69
70 /* Type of the REQUEST argument to `ptrace.' */
71 enum __ptrace_request
72 {
73 /* Indicate that the process making this request should be traced.
74 All signals received by this process can be intercepted by its
75 parent, and its parent can use the other `ptrace' requests. */
76 PTRACE_TRACEME = 0,
77 #define PT_TRACE_ME PTRACE_TRACEME
78
79 /* Return the word in the process's text space at address ADDR. */
80 PTRACE_PEEKTEXT = 1,
81 #define PT_READ_I PTRACE_PEEKTEXT
82
83 /* Return the word in the process's data space at address ADDR. */
84 PTRACE_PEEKDATA = 2,
85 #define PT_READ_D PTRACE_PEEKDATA
86
87 /* Return the word in the process's user area at offset ADDR. */
88 PTRACE_PEEKUSER = 3,
89 #define PT_READ_U PTRACE_PEEKUSER
90
91 /* Write the word DATA into the process's text space at address ADDR. */
92 PTRACE_POKETEXT = 4,
93 #define PT_WRITE_I PTRACE_POKETEXT
94
95 /* Write the word DATA into the process's data space at address ADDR. */
96 PTRACE_POKEDATA = 5,
97 #define PT_WRITE_D PTRACE_POKEDATA
98
99 /* Write the word DATA into the process's user area at offset ADDR. */
100 PTRACE_POKEUSER = 6,
101 #define PT_WRITE_U PTRACE_POKEUSER
102
103 /* Continue the process. */
104 PTRACE_CONT = 7,
105 #define PT_CONTINUE PTRACE_CONT
106
107 /* Kill the process. */
108 PTRACE_KILL = 8,
109 #define PT_KILL PTRACE_KILL
110
111 /* Single step the process. */
112 PTRACE_SINGLESTEP = 9,
113 #define PT_STEP PTRACE_SINGLESTEP
114
115 /* Get all general purpose registers used by a process. */
116 PTRACE_GETREGS = 12,
117 #define PT_GETREGS PTRACE_GETREGS
118
119 /* Set all general purpose registers used by a process. */
120 PTRACE_SETREGS = 13,
121 #define PT_SETREGS PTRACE_SETREGS
122
123 /* Get all floating point registers used by a process. */
124 PTRACE_GETFPREGS = 14,
125 #define PT_GETFPREGS PTRACE_GETFPREGS
126
127 /* Set all floating point registers used by a process. */
128 PTRACE_SETFPREGS = 15,
129 #define PT_SETFPREGS PTRACE_SETFPREGS
130
131 /* Attach to a process that is already running. */
132 PTRACE_ATTACH = 16,
133 #define PT_ATTACH PTRACE_ATTACH
134
135 /* Detach from a process attached to with PTRACE_ATTACH. */
136 PTRACE_DETACH = 17,
137 #define PT_DETACH PTRACE_DETACH
138
139 /* Get all altivec registers used by a process. */
140 PTRACE_GETVRREGS = 18,
141 #define PT_GETVRREGS PTRACE_GETVRREGS
142
143 /* Set all altivec registers used by a process. */
144 PTRACE_SETVRREGS = 19,
145 #define PT_SETVRREGS PTRACE_SETVRREGS
146
147 /* Get all SPE registers used by a process. */
148 PTRACE_GETEVRREGS = 20,
149 #define PT_GETEVRREGS PTRACE_GETEVRREGS
150
151 /* Set all SPE registers used by a process. */
152 PTRACE_SETEVRREGS = 21,
153 #define PT_SETEVRREGS PTRACE_SETEVRREGS
154
155 /* Same as PTRACE_GETREGS except a 32-bit process will obtain
156 the full 64-bit registers. Implemented by 64-bit kernels only. */
157 PTRACE_GETREGS64 = 22,
158 #define PT_GETREGS64 PTRACE_GETREGS64
159
160 /* Same as PTRACE_SETREGS except a 32-bit process will set
161 the full 64-bit registers. Implemented by 64-bit kernels only. */
162 PTRACE_SETREGS64 = 23,
163 #define PT_SETREGS64 PTRACE_SETREGS64
164
165 /* Continue and stop at the next entry to or return from syscall. */
166 PTRACE_SYSCALL = 24,
167 #define PT_SYSCALL PTRACE_SYSCALL
168
169 /* Get a debug register of a process. */
170 PTRACE_GET_DEBUGREG = 25,
171 #define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG
172
173 /* Set a debug register of a process. */
174 PTRACE_SET_DEBUGREG = 26,
175 #define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG
176
177 /* Get the first 32 VSX registers of a process. */
178 PTRACE_GETVSRREGS = 27,
179 #define PT_GETVSRREGS PTRACE_GETVSRREGS
180
181 /* Set the first 32 VSX registers of a process. */
182 PTRACE_SETVSRREGS = 28,
183 #define PT_SETVSRREGS PTRACE_SETVSRREGS
184
185 /* Execute process until next taken branch. */
186 PTRACE_SINGLEBLOCK = 256,
187 #define PT_STEPBLOCK PTRACE_SINGLEBLOCK
188
189 /* Set ptrace filter options. */
190 PTRACE_SETOPTIONS = 0x4200,
191 #define PT_SETOPTIONS PTRACE_SETOPTIONS
192
193 /* Get last ptrace message. */
194 PTRACE_GETEVENTMSG = 0x4201,
195 #define PT_GETEVENTMSG PTRACE_GETEVENTMSG
196
197 /* Get siginfo for process. */
198 PTRACE_GETSIGINFO = 0x4202,
199 #define PT_GETSIGINFO PTRACE_GETSIGINFO
200
201 /* Set new siginfo for process. */
202 PTRACE_SETSIGINFO = 0x4203,
203 #define PT_SETSIGINFO PTRACE_SETSIGINFO
204
205 /* Get register content. */
206 PTRACE_GETREGSET = 0x4204,
207 #define PTRACE_GETREGSET PTRACE_GETREGSET
208
209 /* Set register content. */
210 PTRACE_SETREGSET = 0x4205,
211 #define PTRACE_SETREGSET PTRACE_SETREGSET
212
213 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
214 signal or group stop state. */
215 PTRACE_SEIZE = 0x4206,
216 #define PTRACE_SEIZE PTRACE_SEIZE
217
218 /* Trap seized tracee. */
219 PTRACE_INTERRUPT = 0x4207,
220 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
221
222 /* Wait for next group event. */
223 PTRACE_LISTEN = 0x4208,
224 #define PTRACE_LISTEN PTRACE_LISTEN
225
226 /* Retrieve siginfo_t structures without removing signals from a queue. */
227 PTRACE_PEEKSIGINFO = 0x4209,
228 #define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
229
230 /* Get the mask of blocked signals. */
231 PTRACE_GETSIGMASK = 0x420a,
232 #define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
233
234 /* Change the mask of blocked signals. */
235 PTRACE_SETSIGMASK = 0x420b,
236 #define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
237
238 /* Get seccomp BPF filters. */
239 PTRACE_SECCOMP_GET_FILTER = 0x420c
240 #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
241 };
242
243
244 #include <bits/ptrace-shared.h>
245
246 __END_DECLS
247
248 #endif /* _SYS_PTRACE_H */