]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
Update.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / ia64 / sys / ptrace.h
1 /* `ptrace' debugger support interface. Linux/ia64 version.
2 Copyright (C) 2001 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20 #ifndef _SYS_PTRACE_H
21 #define _SYS_PTRACE_H 1
22
23 #include <features.h>
24 #include <sys/ucontext.h>
25
26 __BEGIN_DECLS
27
28 /* Type of the REQUEST argument to `ptrace.' */
29 enum __ptrace_request
30 {
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. */
34 PTRACE_TRACEME = 0,
35 #define PT_TRACE_ME PTRACE_TRACEME
36
37 /* Return the word in the process's text space at address ADDR. */
38 PTRACE_PEEKTEXT = 1,
39 #define PT_READ_I PTRACE_PEEKTEXT
40
41 /* Return the word in the process's data space at address ADDR. */
42 PTRACE_PEEKDATA = 2,
43 #define PT_READ_D PTRACE_PEEKDATA
44
45 /* Return the word in the process's user area at offset ADDR. */
46 PTRACE_PEEKUSER = 3,
47 #define PT_READ_U PTRACE_PEEKUSER
48
49 /* Write the word DATA into the process's text space at address ADDR. */
50 PTRACE_POKETEXT = 4,
51 #define PT_WRITE_I PTRACE_POKETEXT
52
53 /* Write the word DATA into the process's data space at address ADDR. */
54 PTRACE_POKEDATA = 5,
55 #define PT_WRITE_D PTRACE_POKEDATA
56
57 /* Write the word DATA into the process's user area at offset ADDR. */
58 PTRACE_POKEUSER = 6,
59 #define PT_WRITE_U PTRACE_POKEUSER
60
61 /* Continue the process. */
62 PTRACE_CONT = 7,
63 #define PT_CONTINUE PTRACE_CONT
64
65 /* Kill the process. */
66 PTRACE_KILL = 8,
67 #define PT_KILL PTRACE_KILL
68
69 /* Single step the process.
70 This is not supported on all machines. */
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 /* Get siginfo for process. */
79 PTRACE_GETSIGINFO = 13,
80 #define PT_GETSIGINFO PTRACE_GETSIGINFO
81
82 /* Set new siginfo for process. */
83 PTRACE_SETSIGINFO = 14,
84 #define PT_GETSIGINFO PTRACE_GETSIGINFO
85
86 /* Attach to a process that is already running. */
87 PTRACE_ATTACH = 16,
88 #define PT_ATTACH PTRACE_ATTACH
89
90 /* Detach from a process attached to with PTRACE_ATTACH. */
91 PTRACE_DETACH = 17,
92 #define PT_DETACH PTRACE_DETACH
93
94 /* Get all registers (pt_all_user_regs) in one shot */
95 PTRACE_GETREGS = 18,
96 #define PT_GETREGS PTRACE_GETREGS
97
98 /* Set all registers (pt_all_user_regs) in one shot */
99 PTRACE_SETREGS = 19,
100 #define PT_SETREGS PTRACE_SETREGS
101
102 /* Continue and stop at the next (return from) syscall. */
103 PTRACE_SYSCALL = 24
104 #define PT_SYSCALL PTRACE_SYSCALL
105 };
106
107 /* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */
108 struct pt_all_user_regs
109 {
110 unsigned long nat;
111 unsigned long cr_iip;
112 unsigned long cfm;
113 unsigned long cr_ipsr;
114 unsigned long pr;
115
116 unsigned long gr[32];
117 unsigned long br[8];
118 unsigned long ar[128];
119 struct ia64_fpreg fr[128];
120 };
121
122 /* Perform process tracing functions. REQUEST is one of the values
123 above, and determines the action to be taken.
124 For all requests except PTRACE_TRACEME, PID specifies the process to be
125 traced.
126
127 PID and the other arguments described above for the various requests should
128 appear (those that are used for the particular request) as:
129 pid_t PID, void *ADDR, int DATA, void *ADDR2
130 after REQUEST. */
131 extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
132
133 __END_DECLS
134
135 #endif /* _SYS_PTRACE_H */