1 From 56824024e4f3fa8b5c6f696934c51fbc86946a80 Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Sun, 7 Sep 2014 12:01:33 -0300
4 Subject: [PATCH] powerpc: update ptrace.h to latest from glibc
6 Update sys/ptrace.h to latest glibc release for a lot of missing
9 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
10 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 libc/sysdeps/linux/powerpc/sys/ptrace.h | 93 ++++++++++++++++++++++++++++++++-
13 1 file changed, 91 insertions(+), 2 deletions(-)
15 diff --git a/libc/sysdeps/linux/powerpc/sys/ptrace.h b/libc/sysdeps/linux/powerpc/sys/ptrace.h
16 index 02c303c..dd81efc 100644
17 --- a/libc/sysdeps/linux/powerpc/sys/ptrace.h
18 +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h
20 /* `ptrace' debugger support interface. Linux version.
21 - Copyright (C) 2001 Free Software Foundation, Inc.
22 + Copyright (C) 2001-2014 Free Software Foundation, Inc.
23 This file is part of the GNU C Library.
25 The GNU C Library is free software; you can redistribute it and/or
27 #define _SYS_PTRACE_H 1
30 +#include <bits/types.h>
34 @@ -78,8 +79,96 @@ enum __ptrace_request
35 #define PT_DETACH PTRACE_DETACH
37 /* Continue and stop at the next (return from) syscall. */
39 + PTRACE_SYSCALL = 24,
40 #define PT_SYSCALL PTRACE_SYSCALL
42 + /* Set ptrace filter options. */
43 + PTRACE_SETOPTIONS = 0x4200,
44 +#define PT_SETOPTIONS PTRACE_SETOPTIONS
46 + /* Get last ptrace message. */
47 + PTRACE_GETEVENTMSG = 0x4201,
48 +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
50 + /* Get siginfo for process. */
51 + PTRACE_GETSIGINFO = 0x4202,
52 +#define PT_GETSIGINFO PTRACE_GETSIGINFO
54 + /* Set new siginfo for process. */
55 + PTRACE_SETSIGINFO = 0x4203,
56 +#define PT_SETSIGINFO PTRACE_SETSIGINFO
58 + /* Get register content. */
59 + PTRACE_GETREGSET = 0x4204,
60 +#define PTRACE_GETREGSET PTRACE_GETREGSET
62 + /* Set register content. */
63 + PTRACE_SETREGSET = 0x4205,
64 +#define PTRACE_SETREGSET PTRACE_SETREGSET
66 + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
67 + signal or group stop state. */
68 + PTRACE_SEIZE = 0x4206,
69 +#define PTRACE_SEIZE PTRACE_SEIZE
71 + /* Trap seized tracee. */
72 + PTRACE_INTERRUPT = 0x4207,
73 +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
75 + /* Wait for next group event. */
76 + PTRACE_LISTEN = 0x4208,
77 +#define PTRACE_LISTEN PTRACE_LISTEN
79 + PTRACE_PEEKSIGINFO = 0x4209
80 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
84 +/* Flag for PTRACE_LISTEN. */
87 + PTRACE_SEIZE_DEVEL = 0x80000000
90 +/* Options set using PTRACE_SETOPTIONS. */
91 +enum __ptrace_setoptions
93 + PTRACE_O_TRACESYSGOOD = 0x00000001,
94 + PTRACE_O_TRACEFORK = 0x00000002,
95 + PTRACE_O_TRACEVFORK = 0x00000004,
96 + PTRACE_O_TRACECLONE = 0x00000008,
97 + PTRACE_O_TRACEEXEC = 0x00000010,
98 + PTRACE_O_TRACEVFORKDONE = 0x00000020,
99 + PTRACE_O_TRACEEXIT = 0x00000040,
100 + PTRACE_O_TRACESECCOMP = 0x00000080,
101 + PTRACE_O_EXITKILL = 0x00100000,
102 + PTRACE_O_MASK = 0x001000ff
105 +/* Wait extended result codes for the above trace options. */
106 +enum __ptrace_eventcodes
108 + PTRACE_EVENT_FORK = 1,
109 + PTRACE_EVENT_VFORK = 2,
110 + PTRACE_EVENT_CLONE = 3,
111 + PTRACE_EVENT_EXEC = 4,
112 + PTRACE_EVENT_VFORK_DONE = 5,
113 + PTRACE_EVENT_EXIT = 6,
114 + PTRACE_EVENT_SECCOMP = 7
117 +/* Arguments for PTRACE_PEEKSIGINFO. */
118 +struct __ptrace_peeksiginfo_args
120 + __uint64_t off; /* From which siginfo to start. */
121 + __uint32_t flags; /* Flags for peeksiginfo. */
122 + __int32_t nr; /* How many siginfos to take. */
125 +enum __ptrace_peeksiginfo_flags
127 + /* Read signals from a shared (process wide) queue. */
128 + PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
131 /* Perform process tracing functions. REQUEST is one of the values