00db10
commit 521c6785e1fc94d1f501743e9a40af9e02797df3
00db10
Author: Andreas Jaeger <aj@suse.de>
00db10
Date:   Thu Jul 4 09:45:12 2013 +0200
00db10
00db10
    Sync sys/ptrace with Linux 3.10
00db10
00db10
diff -rup a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h	2018-05-08 22:10:50.628796132 -0400
00db10
+++ b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h	2018-05-08 22:33:59.528930354 -0400
00db10
@@ -21,6 +21,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 
00db10
@@ -123,7 +124,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -159,6 +164,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h	2018-05-08 22:10:51.979794763 -0400
00db10
+++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h	2018-05-08 22:33:59.532930337 -0400
00db10
@@ -21,6 +21,7 @@
00db10
 
00db10
 #include <features.h>
00db10
 #include <sys/ucontext.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 
00db10
@@ -128,7 +129,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -179,6 +184,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h	2012-12-24 22:02:13.000000000 -0500
00db10
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h	2018-05-08 22:33:59.539930307 -0400
00db10
@@ -20,6 +20,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 
00db10
@@ -115,7 +116,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -151,6 +156,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h	2012-12-24 22:02:13.000000000 -0500
00db10
+++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h	2018-05-08 22:33:59.542930293 -0400
00db10
@@ -21,6 +21,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 #ifdef _LINUX_PTRACE_H
00db10
@@ -154,7 +155,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -190,6 +195,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h	2012-12-24 22:02:13.000000000 -0500
00db10
+++ b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h	2018-05-08 22:33:59.546930276 -0400
00db10
@@ -20,7 +20,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
-
00db10
+#include <bits/types.h>
00db10
 #include <bits/wordsize.h>
00db10
 
00db10
 /* Linux/SPARC kernels up to 2.3.18 do not care much
00db10
@@ -198,7 +198,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -234,6 +238,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/sys/ptrace.h	2012-12-24 22:02:13.000000000 -0500
00db10
+++ b/sysdeps/unix/sysv/linux/sys/ptrace.h	2018-05-08 22:33:59.550930259 -0400
00db10
@@ -20,6 +20,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 
00db10
@@ -145,7 +146,11 @@ enum __ptrace_request
00db10
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
 
00db10
   /* Wait for next group event.  */
00db10
-  PTRACE_LISTEN = 0x4208
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -181,6 +186,20 @@ enum __ptrace_eventcodes
00db10
   PTRAVE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+};
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be
00db10
diff -rup a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h
00db10
--- a/sysdeps/unix/sysv/linux/tile/sys/ptrace.h	2018-05-08 22:10:48.688798100 -0400
00db10
+++ b/sysdeps/unix/sysv/linux/tile/sys/ptrace.h	2018-05-08 22:33:59.535930324 -0400
00db10
@@ -20,6 +20,7 @@
00db10
 #define _SYS_PTRACE_H	1
00db10
 
00db10
 #include <features.h>
00db10
+#include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
 
00db10
@@ -101,8 +102,28 @@ enum __ptrace_request
00db10
 #define PT_GETSIGINFO PTRACE_GETSIGINFO
00db10
 
00db10
   /* Set new siginfo for process.  */
00db10
-  PTRACE_SETSIGINFO = 0x4203
00db10
+  PTRACE_SETSIGINFO = 0x4203,
00db10
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
00db10
+
00db10
+  /* Set register content.  */
00db10
+  PTRACE_SETREGSET = 0x4205,
00db10
+#define PTRACE_SETREGSET PTRACE_SETREGSET
00db10
+
00db10
+  /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
00db10
+     signal or group stop state.  */
00db10
+  PTRACE_SEIZE = 0x4206,
00db10
+#define PTRACE_SEIZE PTRACE_SEIZE
00db10
+
00db10
+  /* Trap seized tracee.  */
00db10
+  PTRACE_INTERRUPT = 0x4207,
00db10
+#define PTRACE_INTERRUPT PTRACE_INTERRUPT
00db10
+
00db10
+  /* Wait for next group event.  */
00db10
+  PTRACE_LISTEN = 0x4208,
00db10
+#define PTRACE_LISTEN PTRACE_LISTEN
00db10
+
00db10
+  PTRACE_PEEKSIGINFO = 0x4209
00db10
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
00db10
 };
00db10
 
00db10
 
00db10
@@ -132,6 +153,20 @@ enum __ptrace_eventcodes
00db10
   PTRACE_EVENT_SECCOMP  = 7
00db10
 };
00db10
 
00db10
+/* Arguments for PTRACE_PEEKSIGINFO.  */
00db10
+struct __ptrace_peeksiginfo_args
00db10
+{
00db10
+  __uint64_t off;	/* From which siginfo to start.  */
00db10
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
00db10
+  __int32_t nr;		/* How many siginfos to take.  */
00db10
+};
00db10
+
00db10
+enum __ptrace_peeksiginfo_flags
00db10
+{
00db10
+  /* Read signals from a shared (process wide) queue.  */
00db10
+  PTRACE_PEEKSIGINFO_SHARED = (1 << 0)
00db10
+}
00db10
+
00db10
 /* Perform process tracing functions.  REQUEST is one of the values
00db10
    above, and determines the action to be taken.
00db10
    For all requests except PTRACE_TRACEME, PID specifies the process to be