(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / sysv / linux / mips / sys / ptrace.h
blobd05853da77cdf2a69caac9323141df6e0bbc05fa
1 /* `ptrace' debugger support interface. Linux version.
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
3 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, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #ifndef _SYS_PTRACE_H
22 #define _SYS_PTRACE_H 1
24 #include <features.h>
25 #include <sgidefs.h>
27 __BEGIN_DECLS
29 /* Type of the REQUEST argument to `ptrace.' */
30 enum __ptrace_request
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
38 /* Return the word in the process's text space at address ADDR. */
39 PTRACE_PEEKTEXT = 1,
40 #define PT_READ_I PTRACE_PEEKTEXT
42 /* Return the word in the process's data space at address ADDR. */
43 PTRACE_PEEKDATA = 2,
44 #define PT_READ_D PTRACE_PEEKDATA
46 /* Return the word in the process's user area at offset ADDR. */
47 PTRACE_PEEKUSER = 3,
48 #define PT_READ_U PTRACE_PEEKUSER
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
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
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
62 /* Continue the process. */
63 PTRACE_CONT = 7,
64 #define PT_CONTINUE PTRACE_CONT
66 /* Kill the process. */
67 PTRACE_KILL = 8,
68 #define PT_KILL PTRACE_KILL
70 /* Single step the process.
71 This is not supported on all machines. */
72 PTRACE_SINGLESTEP = 9,
73 #define PT_STEP PTRACE_SINGLESTEP
75 /* Get all general purpose registers used by a processes.
76 This is not supported on all machines. */
77 PTRACE_GETREGS = 12,
78 #define PT_GETREGS PTRACE_GETREGS
80 /* Set all general purpose registers used by a processes.
81 This is not supported on all machines. */
82 PTRACE_SETREGS = 13,
83 #define PT_SETREGS PTRACE_SETREGS
85 /* Get all floating point registers used by a processes.
86 This is not supported on all machines. */
87 PTRACE_GETFPREGS = 14,
88 #define PT_GETFPREGS PTRACE_GETFPREGS
90 /* Set all floating point registers used by a processes.
91 This is not supported on all machines. */
92 PTRACE_SETFPREGS = 15,
93 #define PT_SETFPREGS PTRACE_SETFPREGS
95 /* Attach to a process that is already running. */
96 PTRACE_ATTACH = 16,
97 #define PT_ATTACH PTRACE_ATTACH
99 /* Detach from a process attached to with PTRACE_ATTACH. */
100 PTRACE_DETACH = 17,
101 #define PT_DETACH PTRACE_DETACH
103 /* Get all extended floating point registers used by a processes.
104 This is not supported on all machines. */
105 PTRACE_GETFPXREGS = 18,
106 #define PT_GETFPXREGS PTRACE_GETFPXREGS
108 /* Set all extended floating point registers used by a processes.
109 This is not supported on all machines. */
110 PTRACE_SETFPXREGS = 19,
111 #define PT_SETFPXREGS PTRACE_SETFPXREGS
113 /* Continue and stop at the next (return from) syscall. */
114 PTRACE_SYSCALL = 24
115 #define PT_SYSCALL PTRACE_SYSCALL
118 /* Perform process tracing functions. REQUEST is one of the values
119 above, and determines the action to be taken.
120 For all requests except PTRACE_TRACEME, PID specifies the process to be
121 traced.
123 PID and the other arguments described above for the various requests should
124 appear (those that are used for the particular request) as:
125 pid_t PID, void *ADDR, int DATA, void *ADDR2
126 after REQUEST. */
127 #if _MIPS_SIM == _ABIN32
128 __extension__ extern long long int ptrace
129 (enum __ptrace_request __request, ...) __THROW;
130 #else
131 extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
132 #endif
134 __END_DECLS
136 #endif /* _SYS_PTRACE_H */