]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
linux: move a shared part of sys/ptrace.h to bits/ptrace-shared.h
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / ia64 / sys / ptrace.h
CommitLineData
d5efd131 1/* `ptrace' debugger support interface. Linux/ia64 version.
bfff8b1b 2 Copyright (C) 2001-2017 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.' */
30enum __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
70 /* Single step the process.
71 This is not supported on all machines. */
72 PTRACE_SINGLESTEP = 9,
73#define PT_STEP PTRACE_SINGLESTEP
74
75 /* Execute process until next taken branch. */
76 PTRACE_SINGLEBLOCK = 12,
77#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
78
79 /* Attach to a process that is already running. */
80 PTRACE_ATTACH = 16,
81#define PT_ATTACH PTRACE_ATTACH
82
83 /* Detach from a process attached to with PTRACE_ATTACH. */
84 PTRACE_DETACH = 17,
85#define PT_DETACH PTRACE_DETACH
86
87 /* Get all registers (pt_all_user_regs) in one shot */
88 PTRACE_GETREGS = 18,
89#define PT_GETREGS PTRACE_GETREGS
90
91 /* Set all registers (pt_all_user_regs) in one shot */
92 PTRACE_SETREGS = 19,
93#define PT_SETREGS PTRACE_SETREGS
94
95 /* Continue and stop at the next (return from) syscall. */
96 PTRACE_SYSCALL = 24,
97#define PT_SYSCALL PTRACE_SYSCALL
98
99 /* Set ptrace filter options. */
100 PTRACE_SETOPTIONS = 0x4200,
101#define PT_SETOPTIONS PTRACE_SETOPTIONS
102
103 /* Get last ptrace message. */
104 PTRACE_GETEVENTMSG = 0x4201,
105#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
106
107 /* Get siginfo for process. */
108 PTRACE_GETSIGINFO = 0x4202,
109#define PT_GETSIGINFO PTRACE_GETSIGINFO
110
111 /* Set new siginfo for process. */
112 PTRACE_SETSIGINFO = 0x4203,
113#define PT_SETSIGINFO PTRACE_SETSIGINFO
114
115 /* Get register content. */
116 PTRACE_GETREGSET = 0x4204,
117#define PTRACE_GETREGSET PTRACE_GETREGSET
118
119 /* Set register content. */
120 PTRACE_SETREGSET = 0x4205,
121#define PTRACE_SETREGSET PTRACE_SETREGSET
122
123 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
124 signal or group stop state. */
125 PTRACE_SEIZE = 0x4206,
126#define PTRACE_SEIZE PTRACE_SEIZE
127
128 /* Trap seized tracee. */
129 PTRACE_INTERRUPT = 0x4207,
130#define PTRACE_INTERRUPT PTRACE_INTERRUPT
131
132 /* Wait for next group event. */
521c6785
AJ
133 PTRACE_LISTEN = 0x4208,
134#define PTRACE_LISTEN PTRACE_LISTEN
135
fb53a27c 136 PTRACE_PEEKSIGINFO = 0x4209,
521c6785 137#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
fb53a27c
JM
138
139 PTRACE_GETSIGMASK = 0x420a,
140#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
141
142 PTRACE_SETSIGMASK = 0x420b,
143#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
144
145 PTRACE_SECCOMP_GET_FILTER = 0x420c
146#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
d5efd131
MF
147};
148
149
d5efd131 150/* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */
c8c9ab8b 151struct __pt_all_user_regs
d5efd131
MF
152 {
153 unsigned long nat;
154 unsigned long cr_iip;
155 unsigned long cfm;
156 unsigned long cr_ipsr;
157 unsigned long pr;
158
159 unsigned long gr[32];
160 unsigned long br[8];
161 unsigned long ar[128];
c8c9ab8b 162 struct __ia64_fpreg fr[128];
d5efd131
MF
163 };
164
7e21972b 165#include <bits/ptrace-shared.h>
d5efd131
MF
166
167__END_DECLS
168
169#endif /* _SYS_PTRACE_H */