This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Sync with Linux 3.10: ptrace.h question



Looking at Linux 3.10 kernel headers, I created the following patch
for <sys/ptrace.h>. Would this one be ok in general? In that case I
send a patch for all architectures...

Andreas

2013-07-03  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_LISTEN): Add
	define.
	(PTRACE_PEEKSIGINFO): Add new value from Linux 3.10.
	(ptrace_peeksiginfo_args): Add.
	(__ptrace_peeksiginfo_flags): Add.

diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
index 08709bf..737e209 100644
--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
@@ -20,6 +20,7 @@
 #define _SYS_PTRACE_H	1

 #include <features.h>
+#include <bits/types.h>

 __BEGIN_DECLS

@@ -145,7 +146,11 @@ enum __ptrace_request
 #define PTRACE_INTERRUPT PTRACE_INTERRUPT

   /* Wait for next group event.  */
-  PTRACE_LISTEN = 0x4208
+  PTRACE_LISTEN = 0x4208,
+#define PTRACE_LISTEN PTRACE_LISTEN
+
+  PTRACE_PEEKSIGINFO = 0x4209
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
 };


@@ -182,6 +187,20 @@ enum __ptrace_eventcodes
   PTRAVE_EVENT_SECCOMP  = 7
 };

+/* Arguments for PTRACE_PEEKSIGINFO.  */
+struct ptrace_peeksiginfo_args
+{
+  __uint64_t off;	/* From which siginfo to start.  */
+  __uint32_t flags;	/* Flags for peeksiginfo.  */
+  __int32_t nr;		/* How may siginfos to take.  */
+};
+
+enum __ptrace_peeksiginfo_flags
+{
+    /* Read signals from a shared (process wide) queue.  */
+  PTRACE_PEEKSIGINFO_SHARED	= (1 << 0)
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be

--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]