patch-signal_c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- strace-4.5.18.orig/signal.c 2008-08-20 03:59:40.000000000 +0200
  3. +++ strace-4.5.18/signal.c 2009-01-02 21:24:05.502094888 +0100
  4. @@ -1485,9 +1485,38 @@ struct tcb *tcp;
  5. }
  6. return 0;
  7. #else
  8. +#if defined(CRISV10) || defined(CRISV32)
  9. + struct sigcontext sc;
  10. +
  11. + if (entering(tcp)) {
  12. + long regs[PT_MAX+1];
  13. +
  14. + tcp->u_arg[0] = 0;
  15. +
  16. + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) {
  17. + perror("sigreturn: PTRACE_GETREGS");
  18. + return 0;
  19. + }
  20. + if (umove(tcp, regs[PT_USP], &sc) < 0)
  21. + return 0;
  22. + tcp->u_arg[0] = 1;
  23. + tcp->u_arg[1] = sc.oldmask;
  24. + } else {
  25. + sigset_t sigm;
  26. +
  27. + long_to_sigset(tcp->u_arg[1], &sigm);
  28. + tcp->u_rval = tcp->u_error = 0;
  29. + if (tcp->u_arg[0] == 0)
  30. + return 0;
  31. + tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
  32. + return RVAL_NONE | RVAL_STR;
  33. + }
  34. + return 0;
  35. +#else
  36. #warning No sys_sigreturn() for this architecture
  37. #warning (no problem, just a reminder :-)
  38. return 0;
  39. +#endif /* !CRISV10/!CRISV32 */
  40. #endif /* MIPS */
  41. #endif /* LINUX_MIPSN32 || LINUX_MIPSN64 */
  42. #endif /* SPARC || SPARC64 */