1 From 085465e5c507822b25daec6c0fc1a78da48bff9e Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Sun, 7 Sep 2014 12:01:34 -0300
4 Subject: [PATCH] sparc: 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/sparc/sys/ptrace.h | 97 +++++++++++++++++++++++++++++++++--
13 1 file changed, 92 insertions(+), 5 deletions(-)
15 diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h
16 index 26fa4b3..0f6c2cc 100644
17 --- a/libc/sysdeps/linux/sparc/sys/ptrace.h
18 +++ b/libc/sysdeps/linux/sparc/sys/ptrace.h
20 /* `ptrace' debugger support interface. Linux/SPARC version.
21 - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
22 + Copyright (C) 1996-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
31 +#include <bits/types.h>
32 #include <bits/wordsize.h>
34 /* Linux/SPARC kernels up to 2.3.18 do not care much
35 @@ -147,12 +147,11 @@ enum __ptrace_request
38 /* Continue and stop at the next (return from) syscall. */
40 + PTRACE_SYSCALL = 24,
41 #define PTRACE_SYSCALL PTRACE_SYSCALL
46 /* Get all floating point registers used by a processes.
47 This is not supported on all machines. */
48 PTRACE_GETFPREGS = 25,
49 @@ -160,10 +159,98 @@ enum __ptrace_request
51 /* Set all floating point registers used by a processes.
52 This is not supported on all machines. */
53 - PTRACE_SETFPREGS = 26
54 + PTRACE_SETFPREGS = 26,
55 #define PT_SETFPREGS PTRACE_SETFPREGS
59 + /* Set ptrace filter options. */
60 + PTRACE_SETOPTIONS = 0x4200,
61 +#define PT_SETOPTIONS PTRACE_SETOPTIONS
63 + /* Get last ptrace message. */
64 + PTRACE_GETEVENTMSG = 0x4201,
65 +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
67 + /* Get siginfo for process. */
68 + PTRACE_GETSIGINFO = 0x4202,
69 +#define PT_GETSIGINFO PTRACE_GETSIGINFO
71 + /* Set new siginfo for process. */
72 + PTRACE_SETSIGINFO = 0x4203,
73 +#define PT_SETSIGINFO PTRACE_SETSIGINFO
75 + /* Get register content. */
76 + PTRACE_GETREGSET = 0x4204,
77 +#define PTRACE_GETREGSET PTRACE_GETREGSET
79 + /* Set register content. */
80 + PTRACE_SETREGSET = 0x4205,
81 +#define PTRACE_SETREGSET PTRACE_SETREGSET
83 + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
84 + signal or group stop state. */
85 + PTRACE_SEIZE = 0x4206,
86 +#define PTRACE_SEIZE PTRACE_SEIZE
88 + /* Trap seized tracee. */
89 + PTRACE_INTERRUPT = 0x4207,
90 +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
92 + /* Wait for next group event. */
93 + PTRACE_LISTEN = 0x4208,
94 +#define PTRACE_LISTEN PTRACE_LISTEN
96 + PTRACE_PEEKSIGINFO = 0x4209
97 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
101 +/* Flag for PTRACE_LISTEN. */
104 + PTRACE_SEIZE_DEVEL = 0x80000000
107 +/* Options set using PTRACE_SETOPTIONS. */
108 +enum __ptrace_setoptions
110 + PTRACE_O_TRACESYSGOOD = 0x00000001,
111 + PTRACE_O_TRACEFORK = 0x00000002,
112 + PTRACE_O_TRACEVFORK = 0x00000004,
113 + PTRACE_O_TRACECLONE = 0x00000008,
114 + PTRACE_O_TRACEEXEC = 0x00000010,
115 + PTRACE_O_TRACEVFORKDONE = 0x00000020,
116 + PTRACE_O_TRACEEXIT = 0x00000040,
117 + PTRACE_O_TRACESECCOMP = 0x00000080,
118 + PTRACE_O_EXITKILL = 0x00100000,
119 + PTRACE_O_MASK = 0x001000ff
122 +/* Wait extended result codes for the above trace options. */
123 +enum __ptrace_eventcodes
125 + PTRACE_EVENT_FORK = 1,
126 + PTRACE_EVENT_VFORK = 2,
127 + PTRACE_EVENT_CLONE = 3,
128 + PTRACE_EVENT_EXEC = 4,
129 + PTRACE_EVENT_VFORK_DONE = 5,
130 + PTRACE_EVENT_EXIT = 6,
131 + PTRACE_EVENT_SECCOMP = 7
134 +/* Arguments for PTRACE_PEEKSIGINFO. */
135 +struct __ptrace_peeksiginfo_args
137 + __uint64_t off; /* From which siginfo to start. */
138 + __uint32_t flags; /* Flags for peeksiginfo. */
139 + __int32_t nr; /* How many siginfos to take. */
142 +enum __ptrace_peeksiginfo_flags
144 + /* Read signals from a shared (process wide) queue. */
145 + PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
148 /* Perform process tracing functions. REQUEST is one of the values