]> granicus.if.org Git - strace/blobdiff - ptrace.h
io: handle data_size of -1 as unlimited data in print_iovec
[strace] / ptrace.h
index d8af9760170a9d2ab4003f74cea7226847d51309..ddb46cb4010e2d7ec733c9d99825fdc6286c3cb1 100644 (file)
--- a/ptrace.h
+++ b/ptrace.h
@@ -5,7 +5,7 @@
  * Copyright (c) 2004 Roland McGrath <roland@redhat.com>
  * Copyright (c) 2010 Wang Chao <wang.chao@cn.fujitsu.com>
  * Copyright (c) 2011-2013 Denys Vlasenko <vda.linux@googlemail.com>
- * Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
  * Copyright (c) 2013 Ali Polatel <alip@exherbo.org>
  * Copyright (c) 2015 Mike Frysinger <vapier@gentoo.org>
  * All rights reserved.
@@ -33,6 +33,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef STRACE_PTRACE_H
+#define STRACE_PTRACE_H
+
 #ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND
 # define ptrace xptrace
 # include <sys/ptrace.h>
@@ -64,6 +67,16 @@ extern long ptrace(int, int, char *, long);
 # undef ptrace_peeksiginfo_args
 #endif
 
+#if defined(SPARC) || defined(SPARC64)
+/*
+ * SPARC has a different PTRACE_DETACH value correctly defined in sys/ptrace.h,
+ * but linux/ptrace.h clobbers it with the standard one.  PTRACE_SUNDETACH is
+ * also defined to the correct value by sys/ptrace.h, so use that instead.
+ */
+# undef PTRACE_DETACH
+# define PTRACE_DETACH PTRACE_SUNDETACH
+#endif
+
 #ifndef PTRACE_EVENT_FORK
 # define PTRACE_EVENT_FORK     1
 #endif
@@ -162,6 +175,9 @@ extern long ptrace(int, int, char *, long);
 #ifndef PTRACE_SETSIGMASK
 # define PTRACE_SETSIGMASK     0x420b
 #endif
+#ifndef PTRACE_SECCOMP_GET_FILTER
+# define PTRACE_SECCOMP_GET_FILTER     0x420c
+#endif
 
 #if !HAVE_DECL_PTRACE_PEEKUSER
 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
@@ -169,3 +185,5 @@ extern long ptrace(int, int, char *, long);
 #if !HAVE_DECL_PTRACE_POKEUSER
 # define PTRACE_POKEUSER PTRACE_POKEUSR
 #endif
+
+#endif /* !STRACE_PTRACE_H */