1 From 2d0c3a704afe6bdc7be129e9f9217ec1369c1bc8 Mon Sep 17 00:00:00 2001
2 From: James Hogan <james.hogan@imgtec.com>
3 Date: Fri, 30 Nov 2012 10:08:13 +0000
4 Subject: [PATCH] update ptrace.h to latest from glibc
6 Update libc/sysdeps/linux/common/sys/ptrace.h to latest from glibc's
7 sysdeps/unix/sysv/linux/sys/ptrace.h.
9 This adds definitions for operations:
20 - PTRACE_EVENT_SECCOMP
22 This is to allow access to the generic interface for accessing
23 architecture specific regsets using the corresponding NT_* types,
24 required for new Linux kernel architecture ports.
26 Signed-off-by: James Hogan <james.hogan@imgtec.com>
27 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
28 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
30 libc/sysdeps/linux/common/sys/ptrace.h | 42 +++++++++++++++++++++++++++-----
31 1 file changed, 36 insertions(+), 6 deletions(-)
33 diff --git a/libc/sysdeps/linux/common/sys/ptrace.h b/libc/sysdeps/linux/common/sys/ptrace.h
34 index 08658f9..95b3fdf 100644
35 --- a/libc/sysdeps/linux/common/sys/ptrace.h
36 +++ b/libc/sysdeps/linux/common/sys/ptrace.h
38 /* `ptrace' debugger support interface. Linux version.
39 - Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc.
40 + Copyright (C) 1996-2012 Free Software Foundation, Inc.
41 This file is part of the GNU C Library.
43 The GNU C Library is free software; you can redistribute it and/or
44 @@ -125,13 +125,40 @@ enum __ptrace_request
45 #define PT_GETSIGINFO PTRACE_GETSIGINFO
47 /* Set new siginfo for process. */
48 - PTRACE_SETSIGINFO = 0x4203
49 + PTRACE_SETSIGINFO = 0x4203,
50 #define PT_SETSIGINFO PTRACE_SETSIGINFO
52 + /* Get register content. */
53 + PTRACE_GETREGSET = 0x4204,
54 +#define PTRACE_GETREGSET PTRACE_GETREGSET
56 + /* Set register content. */
57 + PTRACE_SETREGSET = 0x4205,
58 +#define PTRACE_SETREGSET PTRACE_SETREGSET
60 + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
61 + signal or group stop state. */
62 + PTRACE_SEIZE = 0x4206,
63 +#define PTRACE_SEIZE PTRACE_SEIZE
65 + /* Trap seized tracee. */
66 + PTRACE_INTERRUPT = 0x4207,
67 +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
69 + /* Wait for next group event. */
70 + PTRACE_LISTEN = 0x4208
74 +/* Flag for PTRACE_LISTEN. */
77 + PTRACE_SEIZE_DEVEL = 0x80000000
80 /* Options set using PTRACE_SETOPTIONS. */
81 -enum __ptrace_setoptions {
82 +enum __ptrace_setoptions
84 PTRACE_O_TRACESYSGOOD = 0x00000001,
85 PTRACE_O_TRACEFORK = 0x00000002,
86 PTRACE_O_TRACEVFORK = 0x00000004,
87 @@ -139,17 +166,20 @@ enum __ptrace_setoptions {
88 PTRACE_O_TRACEEXEC = 0x00000010,
89 PTRACE_O_TRACEVFORKDONE = 0x00000020,
90 PTRACE_O_TRACEEXIT = 0x00000040,
91 - PTRACE_O_MASK = 0x0000007f
92 + PTRACE_O_TRACESECCOMP = 0x00000080,
93 + PTRACE_O_MASK = 0x000000ff
96 /* Wait extended result codes for the above trace options. */
97 -enum __ptrace_eventcodes {
98 +enum __ptrace_eventcodes
100 PTRACE_EVENT_FORK = 1,
101 PTRACE_EVENT_VFORK = 2,
102 PTRACE_EVENT_CLONE = 3,
103 PTRACE_EVENT_EXEC = 4,
104 PTRACE_EVENT_VFORK_DONE = 5,
105 - PTRACE_EVENT_EXIT = 6
106 + PTRACE_EVENT_EXIT = 6,
107 + PTRAVE_EVENT_SECCOMP = 7
110 /* Perform process tracing functions. REQUEST is one of the values