4eb8a733ac9d3aa7b08f22c792814be4bec662b3
[openwrt/svn-archive/archive.git] / utils / strace / patches / 002-arm_bad_syscall.patch
1 Index: strace-4.5.16/syscall.c
2 ===================================================================
3 --- strace-4.5.16.orig/syscall.c 2008-05-11 15:35:45.000000000 +0200
4 +++ strace-4.5.16/syscall.c 2008-05-11 15:36:09.000000000 +0200
5 @@ -1045,6 +1045,15 @@
6 /*
7 * Note: we only deal with only 32-bit CPUs here.
8 */
9 +
10 + if (!(tcp->flags & TCB_INSYSCALL) &&
11 + (tcp->flags & TCB_WAITEXECVE)) {
12 + /* caught a fake syscall from the execve's exit */
13 + tcp->flags &= ~TCB_WAITEXECVE;
14 + return 0;
15 + }
16 +
17 +
18 if (regs.ARM_cpsr & 0x20) {
19 /*
20 * Get the Thumb-mode system call number