strace-fix-arm-bad-syscall.patch 417 B

123456789101112131415161718
  1. --- a/syscall.c
  2. +++ b/syscall.c
  3. @@ -1016,6 +1016,15 @@ struct tcb *tcp;
  4. /*
  5. * Note: we only deal with only 32-bit CPUs here.
  6. */
  7. +
  8. + if (!(tcp->flags & TCB_INSYSCALL) &&
  9. + (tcp->flags & TCB_WAITEXECVE)) {
  10. + /* caught a fake syscall from the execve's exit */
  11. + tcp->flags &= ~TCB_WAITEXECVE;
  12. + return 0;
  13. + }
  14. +
  15. +
  16. if (regs.ARM_cpsr & 0x20) {
  17. /*
  18. * Get the Thumb-mode system call number