summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-12 12:50:10 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-12 12:50:10 +0100
commitd27809c978f3c8c3271f7d726dc92dd0eefa8a0f (patch)
treef5fda797ab4375a2e35ae88d22248f4fb4a719be /defs.h
parent3e759d4293076b9358a25bb61d50d3e6fff5b0e2 (diff)
downloadstrace-d27809c978f3c8c3271f7d726dc92dd0eefa8a0f.tar.gz
strace-d27809c978f3c8c3271f7d726dc92dd0eefa8a0f.tar.bz2
strace-d27809c978f3c8c3271f7d726dc92dd0eefa8a0f.tar.xz
Remove old kernel hacks for architectures which require new kernels
* defs.h: Do not define TCB_WAITEXECVE for AVR32, BFIN and TILE. * util.c (change_syscall): For AVR32, BFIN and TILE, replace code with dummy "return 0" and a comment explaining why that is ok for these architectures. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/defs.h b/defs.h
index 78df638..50620b3 100644
--- a/defs.h
+++ b/defs.h
@@ -118,8 +118,8 @@ extern char *stpcpy(char *dst, const char *src);
#ifndef DEFAULT_SORTBY
# define DEFAULT_SORTBY "time"
#endif
-
-/* Experimental code using PTRACE_SEIZE can be enabled here.
+/*
+ * Experimental code using PTRACE_SEIZE can be enabled here.
* This needs Linux kernel 3.4.x or later to work.
*/
#define USE_SEIZE 1
@@ -427,15 +427,23 @@ struct tcb {
#define TCB_REPRINT 00200 /* We should reprint this syscall on exit */
#define TCB_FILTERED 00400 /* This system call has been filtered out */
/* x86 does not need TCB_WAITEXECVE.
- * It can detect SIGTRAP by looking at eax/rax.
- * See "not a syscall entry (eax = %ld)\n" message
- * in syscall_fixup_on_sysenter().
+ * It can detect post-execve SIGTRAP by looking at eax/rax.
+ * See "not a syscall entry (eax = %ld)\n" message.
+ *
+ * Note! On new kernels (about 2.5.46+), we use PTRACE_O_TRACEEXEC, which
+ * suppresses post-execve SIGTRAP. If you are adding a new arch which is
+ * only supported by newer kernels, you most likely don't need to define
+ * TCB_WAITEXECVE!
*/
-#if defined(ALPHA) || defined(AVR32) || defined(SPARC) || defined(SPARC64) \
- || defined(POWERPC) || defined(IA64) || defined(HPPA) \
- || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) \
- || defined(ARM) || defined(AARCH64) || defined(MIPS) || defined(BFIN) \
- || defined(TILE)
+#if defined(ALPHA) \
+ || defined(SPARC) || defined(SPARC64) \
+ || defined(POWERPC) \
+ || defined(IA64) \
+ || defined(HPPA) \
+ || defined(SH) || defined(SH64) \
+ || defined(S390) || defined(S390X) \
+ || defined(ARM) || defined(AARCH64) \
+ || defined(MIPS)
/* This tracee has entered into execve syscall. Expect post-execve SIGTRAP
* to happen. (When it is detected, tracee is continued and this bit is cleared.)
*/