uClibc: fix ptrace header files for powerpc
[openwrt/openwrt.git] / toolchain / uClibc / patches-0.9.33.2 / 460-powerpc_ptrace_h.patch
1 --- a/libc/sysdeps/linux/powerpc/sys/ptrace.h
2 +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h
3 @@ -1,5 +1,5 @@
4 /* `ptrace' debugger support interface. Linux version.
5 - Copyright (C) 2001 Free Software Foundation, Inc.
6 + Copyright (C) 2001, 2006, 2007, 2011 Free Software Foundation, Inc.
7 This file is part of the GNU C Library.
8
9 The GNU C Library is free software; you can redistribute it and/or
10 @@ -13,9 +13,8 @@
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public
14 - License along with the GNU C Library; if not, write to the Free
15 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
16 - 02111-1307 USA. */
17 + License along with the GNU C Library; if not, see
18 + <http://www.gnu.org/licenses/>. */
19
20 #ifndef _SYS_PTRACE_H
21 #define _SYS_PTRACE_H 1
22 @@ -79,8 +78,73 @@ enum __ptrace_request
23 #define PT_DETACH PTRACE_DETACH
24
25 /* Continue and stop at the next (return from) syscall. */
26 - PTRACE_SYSCALL = 24
27 + PTRACE_SYSCALL = 24,
28 #define PT_SYSCALL PTRACE_SYSCALL
29 +
30 + /* Set ptrace filter options. */
31 + PTRACE_SETOPTIONS = 0x4200,
32 +#define PT_SETOPTIONS PTRACE_SETOPTIONS
33 +
34 + /* Get last ptrace message. */
35 + PTRACE_GETEVENTMSG = 0x4201,
36 +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
37 +
38 + /* Get siginfo for process. */
39 + PTRACE_GETSIGINFO = 0x4202,
40 +#define PT_GETSIGINFO PTRACE_GETSIGINFO
41 +
42 + /* Set new siginfo for process. */
43 + PTRACE_SETSIGINFO = 0x4203,
44 +#define PT_SETSIGINFO PTRACE_SETSIGINFO
45 +
46 + /* Get register content. */
47 + PTRACE_GETREGSET = 0x4204,
48 +#define PTRACE_GETREGSET PTRACE_GETREGSET
49 +
50 + /* Set register content. */
51 + PTRACE_SETREGSET = 0x4205,
52 +#define PTRACE_SETREGSET PTRACE_SETREGSET
53 +
54 + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
55 + signal or group stop state. */
56 + PTRACE_SEIZE = 0x4206,
57 +#define PTRACE_SEIZE PTRACE_SEIZE
58 +
59 + /* Trap seized tracee. */
60 + PTRACE_INTERRUPT = 0x4207,
61 +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
62 +
63 + /* Wait for next group event. */
64 + PTRACE_LISTEN = 0x4208
65 +};
66 +
67 +
68 +/* Flag for PTRACE_LISTEN. */
69 +enum __ptrace_flags
70 +{
71 + PTRACE_SEIZE_DEVEL = 0x80000000
72 +};
73 +
74 +/* Options set using PTRACE_SETOPTIONS. */
75 +enum __ptrace_setoptions {
76 + PTRACE_O_TRACESYSGOOD = 0x00000001,
77 + PTRACE_O_TRACEFORK = 0x00000002,
78 + PTRACE_O_TRACEVFORK = 0x00000004,
79 + PTRACE_O_TRACECLONE = 0x00000008,
80 + PTRACE_O_TRACEEXEC = 0x00000010,
81 + PTRACE_O_TRACEVFORKDONE = 0x00000020,
82 + PTRACE_O_TRACEEXIT = 0x00000040,
83 + PTRACE_O_MASK = 0x0000007f
84 +};
85 +
86 +/* Wait extended result codes for the above trace options. */
87 +enum __ptrace_eventcodes {
88 + PTRACE_EVENT_FORK = 1,
89 + PTRACE_EVENT_VFORK = 2,
90 + PTRACE_EVENT_CLONE = 3,
91 + PTRACE_EVENT_EXEC = 4,
92 + PTRACE_EVENT_VFORK_DONE = 5,
93 + PTRACE_EVENT_EXIT = 6
94 };
95
96 /* Perform process tracing functions. REQUEST is one of the values