1 /* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
21 #define _SYS_PTRACE_H 1
24 #include <bits/types.h>
28 /* Type of the REQUEST argument to `ptrace.' */
31 /* Indicate that the process making this request should be traced.
32 All signals received by this process can be intercepted by its
33 parent, and its parent can use the other `ptrace' requests. */
35 #define PT_TRACE_ME PTRACE_TRACEME
37 /* Return the word in the process's text space at address ADDR. */
39 #define PT_READ_I PTRACE_PEEKTEXT
41 /* Return the word in the process's data space at address ADDR. */
43 #define PT_READ_D PTRACE_PEEKDATA
45 /* Return the word in the process's user area at offset ADDR. */
47 #define PT_READ_U PTRACE_PEEKUSER
49 /* Write the word DATA into the process's text space at address ADDR. */
51 #define PT_WRITE_I PTRACE_POKETEXT
53 /* Write the word DATA into the process's data space at address ADDR. */
55 #define PT_WRITE_D PTRACE_POKEDATA
57 /* Write the word DATA into the process's user area at offset ADDR. */
59 #define PT_WRITE_U PTRACE_POKEUSER
61 /* Continue the process. */
63 #define PT_CONTINUE PTRACE_CONT
65 /* Kill the process. */
67 #define PT_KILL PTRACE_KILL
69 /* Single step the process. */
70 PTRACE_SINGLESTEP
= 9,
71 #define PT_STEP PTRACE_SINGLESTEP
73 /* Get all general purpose registers used by a process. */
75 #define PT_GETREGS PTRACE_GETREGS
77 /* Set all general purpose registers used by a process. */
79 #define PT_SETREGS PTRACE_SETREGS
81 /* Get all floating point registers used by a process. */
82 PTRACE_GETFPREGS
= 14,
83 #define PT_GETFPREGS PTRACE_GETFPREGS
85 /* Set all floating point registers used by a process. */
86 PTRACE_SETFPREGS
= 15,
87 #define PT_SETFPREGS PTRACE_SETFPREGS
89 /* Attach to a process that is already running. */
91 #define PT_ATTACH PTRACE_ATTACH
93 /* Detach from a process attached to with PTRACE_ATTACH. */
95 #define PT_DETACH PTRACE_DETACH
97 /* Get the iWMMXt state of a process. */
98 PTRACE_GETWMMXREGS
= 18,
99 #define PT_GETWMMXREGS PTRACE_GETWMMXREGS
101 /* Set the iWMMXt state of a process. */
102 PTRACE_SETWMMXREGS
= 19,
103 #define PT_SETWMMXREGS PTRACE_SETWMMXREGS
105 /* Get the thread pointer of a process. */
106 PTRACE_GET_THREAD_AREA
= 22,
107 #define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
109 /* Change the syscall number of a process. */
110 PTRACE_SET_SYSCALL
= 23,
111 #define PT_SET_SYSCALL PTRACE_SET_SYSCALL
113 /* Continue and stop at the next entry to or return from syscall. */
115 #define PT_SYSCALL PTRACE_SYSCALL
117 /* Get the Crunch state of a process. */
118 PTRACE_GETCRUNCHREGS
= 25,
119 #define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
121 /* Set the Crunch state of a process. */
122 PTRACE_SETCRUNCHREGS
= 26,
123 #define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
125 /* Get all VFP registers used by a process. */
126 PTRACE_GETVFPREGS
= 27,
127 #define PT_GETVFPREGS PTRACE_GETVFPREGS
129 /* Set all VFP registers used by a process. */
130 PTRACE_SETVFPREGS
= 28,
131 #define PT_SETVFPREGS PTRACE_SETVFPREGS
133 /* Get all hardware breakpoint registers. */
134 PTRACE_GETHBPREGS
= 29,
135 #define PT_GETHBPREGS PTRACE_GETHBPREGS
137 /* Set all hardware breakpoint registers. */
138 PTRACE_SETHBPREGS
= 30,
139 #define PT_SETHBPREGS PTRACE_SETHBPREGS
141 /* Get the ELF fdpic loadmap address. */
142 PTRACE_GETFDPIC
= 31,
143 #define PT_GETFDPIC PTRACE_GETFDPIC
145 /* Set ptrace filter options. */
146 PTRACE_SETOPTIONS
= 0x4200,
147 #define PT_SETOPTIONS PTRACE_SETOPTIONS
149 /* Get last ptrace message. */
150 PTRACE_GETEVENTMSG
= 0x4201,
151 #define PT_GETEVENTMSG PTRACE_GETEVENTMSG
153 /* Get siginfo for process. */
154 PTRACE_GETSIGINFO
= 0x4202,
155 #define PT_GETSIGINFO PTRACE_GETSIGINFO
157 /* Set new siginfo for process. */
158 PTRACE_SETSIGINFO
= 0x4203,
159 #define PT_SETSIGINFO PTRACE_SETSIGINFO
161 /* Get register content. */
162 PTRACE_GETREGSET
= 0x4204,
163 #define PTRACE_GETREGSET PTRACE_GETREGSET
165 /* Set register content. */
166 PTRACE_SETREGSET
= 0x4205,
167 #define PTRACE_SETREGSET PTRACE_SETREGSET
169 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
170 signal or group stop state. */
171 PTRACE_SEIZE
= 0x4206,
172 #define PTRACE_SEIZE PTRACE_SEIZE
174 /* Trap seized tracee. */
175 PTRACE_INTERRUPT
= 0x4207,
176 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
178 /* Wait for next group event. */
179 PTRACE_LISTEN
= 0x4208,
180 #define PTRACE_LISTEN PTRACE_LISTEN
182 /* Retrieve siginfo_t structures without removing signals from a queue. */
183 PTRACE_PEEKSIGINFO
= 0x4209,
184 #define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
186 /* Get the mask of blocked signals. */
187 PTRACE_GETSIGMASK
= 0x420a,
188 #define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
190 /* Change the mask of blocked signals. */
191 PTRACE_SETSIGMASK
= 0x420b,
192 #define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
194 /* Get seccomp BPF filters. */
195 PTRACE_SECCOMP_GET_FILTER
= 0x420c,
196 #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
198 /* Get seccomp BPF filter metadata. */
199 PTRACE_SECCOMP_GET_METADATA
= 0x420d,
200 #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO
= 0x420e,
204 #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
206 /* Get rseq configuration information. */
207 PTRACE_GET_RSEQ_CONFIGURATION
= 0x420f,
208 #define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
210 /* Set configuration for syscall user dispatch. */
211 PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
= 0x4210,
212 #define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \
213 PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
215 /* Get configuration for syscall user dispatch. */
216 PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
= 0x4211
217 #define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \
218 PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
222 #include <bits/ptrace-shared.h>
226 #endif /* _SYS_PTRACE_H */