patch-defs_h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --- strace-4.8.orig/defs.h 2013-05-14 16:10:42.000000000 +0200
  2. +++ strace-4.8/defs.h 2014-01-15 12:10:01.000000000 +0100
  3. @@ -37,6 +37,28 @@
  4. # endif
  5. #endif
  6. +#ifdef ARM
  7. +struct pt_regs { long uregs[18]; };
  8. +#define ARM_cpsr uregs[16]
  9. +#define ARM_pc uregs[15]
  10. +#define ARM_lr uregs[14]
  11. +#define ARM_sp uregs[13]
  12. +#define ARM_ip uregs[12]
  13. +#define ARM_fp uregs[11]
  14. +#define ARM_r10 uregs[10]
  15. +#define ARM_r9 uregs[9]
  16. +#define ARM_r8 uregs[8]
  17. +#define ARM_r7 uregs[7]
  18. +#define ARM_r6 uregs[6]
  19. +#define ARM_r5 uregs[5]
  20. +#define ARM_r4 uregs[4]
  21. +#define ARM_r3 uregs[3]
  22. +#define ARM_r2 uregs[2]
  23. +#define ARM_r1 uregs[1]
  24. +#define ARM_r0 uregs[0]
  25. +#define ARM_ORIG_r0 uregs[17]
  26. +#endif
  27. +
  28. #ifdef MIPS
  29. # include <sgidefs.h>
  30. # if _MIPS_SIM == _MIPS_SIM_ABI64
  31. @@ -155,14 +177,14 @@ extern char *stpcpy(char *dst, const cha
  32. || defined(METAG) \
  33. || defined(TILE) \
  34. || defined(XTENSA) \
  35. - ) && defined(__GLIBC__)
  36. + ) && defined(__linux__)
  37. # include <sys/ptrace.h>
  38. #else
  39. /* Work around awkward prototype in ptrace.h. */
  40. # define ptrace xptrace
  41. # include <sys/ptrace.h>
  42. # undef ptrace
  43. -# ifdef POWERPC
  44. +# if defined(ARM)
  45. # define __KERNEL__
  46. # include <asm/ptrace.h>
  47. # undef __KERNEL__
  48. @@ -222,11 +244,6 @@ extern long ptrace(int, int, char *, lon
  49. # define PTRACE_EVENT_EXIT 6
  50. #endif
  51. -#if !defined(__GLIBC__)
  52. -# define PTRACE_PEEKUSER PTRACE_PEEKUSR
  53. -# define PTRACE_POKEUSER PTRACE_POKEUSR
  54. -#endif
  55. -
  56. #if USE_SEIZE
  57. # undef PTRACE_SEIZE
  58. # define PTRACE_SEIZE 0x4206