]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/mips/sys/ptrace.h
Test for stack alignment.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / mips / sys / ptrace.h
CommitLineData
935af0f2 1/* `ptrace' debugger support interface. Linux version.
918f187f 2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
935af0f2
AO
3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5
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.
10
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.
15
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. */
20
21#ifndef _SYS_PTRACE_H
22#define _SYS_PTRACE_H 1
23
24#include <features.h>
918f187f 25#include <sgidefs.h>
935af0f2
AO
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 /* 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
79
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
84
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
89
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
94
95 /* Attach to a process that is already running. */
96 PTRACE_ATTACH = 16,
97#define PT_ATTACH PTRACE_ATTACH
98
99 /* Detach from a process attached to with PTRACE_ATTACH. */
100 PTRACE_DETACH = 17,
101#define PT_DETACH PTRACE_DETACH
102
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
107
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
112
113 /* Continue and stop at the next (return from) syscall. */
114 PTRACE_SYSCALL = 24
115#define PT_SYSCALL PTRACE_SYSCALL
116};
117
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.
122
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. */
c997e9d4 127#if _MIPS_SIM == _ABIN32
935af0f2
AO
128__extension__ extern long long int ptrace
129 (enum __ptrace_request __request, ...) __THROW;
130#else
131extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
132#endif
133
134__END_DECLS
135
136#endif /* _SYS_PTRACE_H */