]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/microblaze/sys/ptrace.h
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / microblaze / sys / ptrace.h
1 /* `ptrace' debugger support interface.  Linux/microblaze version.
2    Copyright (C) 2001, 2002 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, see
17    <http://www.gnu.org/licenses/>.  */
18
19 #ifndef _SYS_PTRACE_H
20 #define _SYS_PTRACE_H   1
21
22 #include <features.h>
23
24 __BEGIN_DECLS
25
26 /* Type of the REQUEST argument to `ptrace.'  */
27 enum __ptrace_request
28 {
29   /* Indicate that the process making this request should be traced.
30      All signals received by this process can be intercepted by its
31      parent, and its parent can use the other `ptrace' requests.  */
32   PTRACE_TRACEME = 0,
33 #define PT_TRACE_ME PTRACE_TRACEME
34
35   /* Return the word in the process's text space at address ADDR.  */
36   PTRACE_PEEKTEXT = 1,
37 #define PT_READ_I PTRACE_PEEKTEXT
38
39   /* Return the word in the process's data space at address ADDR.  */
40   PTRACE_PEEKDATA = 2,
41 #define PT_READ_D PTRACE_PEEKDATA
42
43   /* Return the word in the process's user area at offset ADDR.  */
44   PTRACE_PEEKUSER = 3,
45 #define PT_READ_U PTRACE_PEEKUSER
46
47   /* Write the word DATA into the process's text space at address ADDR.  */
48   PTRACE_POKETEXT = 4,
49 #define PT_WRITE_I PTRACE_POKETEXT
50
51   /* Write the word DATA into the process's data space at address ADDR.  */
52   PTRACE_POKEDATA = 5,
53 #define PT_WRITE_D PTRACE_POKEDATA
54
55   /* Write the word DATA into the process's user area at offset ADDR.  */
56   PTRACE_POKEUSER = 6,
57 #define PT_WRITE_U PTRACE_POKEUSER
58
59   /* Continue the process.  */
60   PTRACE_CONT = 7,
61 #define PT_CONTINUE PTRACE_CONT
62
63   /* Kill the process.  */
64   PTRACE_KILL = 8,
65 #define PT_KILL PTRACE_KILL
66
67   /* Single step the process.  */
68   PTRACE_SINGLESTEP = 9,
69 #define PT_STEP PTRACE_SINGLESTEP
70
71   /* Attach to a process that is already running. */
72   PTRACE_ATTACH = 16,
73 #define PT_ATTACH PTRACE_ATTACH
74
75   /* Detach from a process attached to with PTRACE_ATTACH.  */
76   PTRACE_DETACH = 17,
77 #define PT_DETACH PTRACE_DETACH
78
79   /* Continue and stop at the next (return from) syscall.  */
80   PTRACE_SYSCALL = 24
81 #define PT_SYSCALL PTRACE_SYSCALL
82 };
83
84 /* Perform process tracing functions.  REQUEST is one of the values
85    above, and determines the action to be taken.
86    For all requests except PTRACE_TRACEME, PID specifies the process to be
87    traced.
88
89    PID and the other arguments described above for the various requests should
90    appear (those that are used for the particular request) as:
91      pid_t PID, void *ADDR, int DATA, void *ADDR2
92    after REQUEST.  */
93 extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
94
95 __END_DECLS
96
97 #endif /* _SYS_PTRACE_H */