77b2c2e92562c1f8be0fd6f9d9b5c49aab4fe560
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0064-sparc-update-ptrace.h-to-latest-from-glibc.patch
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
5
6 Update sys/ptrace.h to latest glibc release for a lot of missing
7 definitions.
8
9 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
10 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 ---
12  libc/sysdeps/linux/sparc/sys/ptrace.h | 97 +++++++++++++++++++++++++++++++++--
13  1 file changed, 92 insertions(+), 5 deletions(-)
14
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
19 @@ -1,5 +1,5 @@
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.
24  
25     The GNU C Library is free software; you can redistribute it and/or
26 @@ -20,7 +20,7 @@
27  #define _SYS_PTRACE_H  1
28  
29  #include <features.h>
30 -
31 +#include <bits/types.h>
32  #include <bits/wordsize.h>
33  
34  /* Linux/SPARC kernels up to 2.3.18 do not care much
35 @@ -147,12 +147,11 @@ enum __ptrace_request
36  #endif
37  
38    /* Continue and stop at the next (return from) syscall.  */
39 -  PTRACE_SYSCALL = 24
40 +  PTRACE_SYSCALL = 24,
41  #define PTRACE_SYSCALL PTRACE_SYSCALL
42  
43  #if __WORDSIZE == 64
44  
45 -  ,
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
50  
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
56  
57  #endif
58 +
59 +  /* Set ptrace filter options.  */
60 +  PTRACE_SETOPTIONS = 0x4200,
61 +#define PT_SETOPTIONS PTRACE_SETOPTIONS
62 +
63 +  /* Get last ptrace message.  */
64 +  PTRACE_GETEVENTMSG = 0x4201,
65 +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
66 +
67 +  /* Get siginfo for process.  */
68 +  PTRACE_GETSIGINFO = 0x4202,
69 +#define PT_GETSIGINFO PTRACE_GETSIGINFO
70 +
71 +  /* Set new siginfo for process.  */
72 +  PTRACE_SETSIGINFO = 0x4203,
73 +#define PT_SETSIGINFO PTRACE_SETSIGINFO
74 +
75 +  /* Get register content.  */
76 +  PTRACE_GETREGSET = 0x4204,
77 +#define PTRACE_GETREGSET PTRACE_GETREGSET
78 +
79 +  /* Set register content.  */
80 +  PTRACE_SETREGSET = 0x4205,
81 +#define PTRACE_SETREGSET PTRACE_SETREGSET
82 +
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
87 +
88 +  /* Trap seized tracee.  */
89 +  PTRACE_INTERRUPT = 0x4207,
90 +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
91 +
92 +  /* Wait for next group event.  */
93 +  PTRACE_LISTEN = 0x4208,
94 +#define PTRACE_LISTEN PTRACE_LISTEN
95 +
96 +  PTRACE_PEEKSIGINFO = 0x4209
97 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
98 +};
99 +
100 +
101 +/* Flag for PTRACE_LISTEN.  */
102 +enum __ptrace_flags
103 +{
104 +  PTRACE_SEIZE_DEVEL = 0x80000000
105 +};
106 +
107 +/* Options set using PTRACE_SETOPTIONS.  */
108 +enum __ptrace_setoptions
109 +{
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
120 +};
121 +
122 +/* Wait extended result codes for the above trace options.  */
123 +enum __ptrace_eventcodes
124 +{
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
132 +};
133 +
134 +/* Arguments for PTRACE_PEEKSIGINFO.  */
135 +struct __ptrace_peeksiginfo_args
136 +{
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.  */
140 +};
141 +
142 +enum __ptrace_peeksiginfo_flags
143 +{
144 +  /* Read signals from a shared (process wide) queue.  */
145 +  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
146  };
147  
148  /* Perform process tracing functions.  REQUEST is one of the values
149 -- 
150 2.0.4
151