1
0

patch-process_c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- strace-4.5.18.orig/process.c 2008-07-18 04:16:47.000000000 +0200
  3. +++ strace-4.5.18/process.c 2009-01-02 21:24:05.490094969 +0100
  4. @@ -584,7 +584,7 @@ extern void print_ldt_entry();
  5. # define ARG_PTID (known_scno(tcp) == SYS_clone2 ? 3 : 2)
  6. # define ARG_CTID (known_scno(tcp) == SYS_clone2 ? 4 : 3)
  7. # define ARG_TLS (known_scno(tcp) == SYS_clone2 ? 5 : 4)
  8. -# elif defined S390 || defined S390X
  9. +# elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32
  10. # define ARG_STACK 0
  11. # define ARG_FLAGS 1
  12. # define ARG_PTID 2
  13. @@ -740,6 +740,10 @@ int new;
  14. 0x100000 | new) < 0)
  15. return -1;
  16. return 0;
  17. +#elif defined(CRISV10) || defined(CRISV32)
  18. + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0)
  19. + return -1;
  20. + return 0;
  21. #elif defined(ARM)
  22. /* Some kernels support this, some (pre-2.6.16 or so) don't. */
  23. # ifndef PTRACE_SET_SYSCALL
  24. @@ -3003,7 +3007,77 @@ const struct xlat struct_user_offsets[]
  25. { 69, "fpcsr" },
  26. { 70, "fpeir" },
  27. #endif
  28. +#ifdef CRISV10
  29. + { 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" },
  30. + { 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
  31. + { 4*PT_R13, "4*PT_R13" },
  32. + { 4*PT_R12, "4*PT_R12" },
  33. + { 4*PT_R11, "4*PT_R11" },
  34. + { 4*PT_R10, "4*PT_R10" },
  35. + { 4*PT_R9, "4*PT_R9" },
  36. + { 4*PT_R8, "4*PT_R8" },
  37. + { 4*PT_R7, "4*PT_R7" },
  38. + { 4*PT_R6, "4*PT_R6" },
  39. + { 4*PT_R5, "4*PT_R5" },
  40. + { 4*PT_R4, "4*PT_R4" },
  41. + { 4*PT_R3, "4*PT_R3" },
  42. + { 4*PT_R2, "4*PT_R2" },
  43. + { 4*PT_R1, "4*PT_R1" },
  44. + { 4*PT_R0, "4*PT_R0" },
  45. + { 4*PT_MOF, "4*PT_MOF" },
  46. + { 4*PT_DCCR, "4*PT_DCCR" },
  47. + { 4*PT_SRP, "4*PT_SRP" },
  48. + { 4*PT_IRP, "4*PT_IRP" },
  49. + { 4*PT_CSRINSTR, "4*PT_CSRINSTR" },
  50. + { 4*PT_CSRADDR, "4*PT_CSRADDR" },
  51. + { 4*PT_CSRDATA, "4*PT_CSRDATA" },
  52. + { 4*PT_USP, "4*PT_USP" },
  53. +#endif
  54. +#ifdef CRISV32
  55. + { 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
  56. + { 4*PT_R0, "4*PT_R0" },
  57. + { 4*PT_R1, "4*PT_R1" },
  58. + { 4*PT_R2, "4*PT_R2" },
  59. + { 4*PT_R3, "4*PT_R3" },
  60. + { 4*PT_R4, "4*PT_R4" },
  61. + { 4*PT_R5, "4*PT_R5" },
  62. + { 4*PT_R6, "4*PT_R6" },
  63. + { 4*PT_R7, "4*PT_R7" },
  64. + { 4*PT_R8, "4*PT_R8" },
  65. + { 4*PT_R9, "4*PT_R9" },
  66. + { 4*PT_R10, "4*PT_R10" },
  67. + { 4*PT_R11, "4*PT_R11" },
  68. + { 4*PT_R12, "4*PT_R12" },
  69. + { 4*PT_R13, "4*PT_R13" },
  70. + { 4*PT_ACR, "4*PT_ACR" },
  71. + { 4*PT_SRS, "4*PT_SRS" },
  72. + { 4*PT_MOF, "4*PT_MOF" },
  73. + { 4*PT_SPC, "4*PT_SPC" },
  74. + { 4*PT_CCS, "4*PT_CCS" },
  75. + { 4*PT_SRP, "4*PT_SRP" },
  76. + { 4*PT_ERP, "4*PT_ERP" },
  77. + { 4*PT_EXS, "4*PT_EXS" },
  78. + { 4*PT_EDA, "4*PT_EDA" },
  79. + { 4*PT_USP, "4*PT_USP" },
  80. + { 4*PT_PPC, "4*PT_PPC" },
  81. + { 4*PT_BP_CTRL, "4*PT_BP_CTRL" },
  82. + { 4*PT_BP+4, "4*PT_BP+4" },
  83. + { 4*PT_BP+8, "4*PT_BP+8" },
  84. + { 4*PT_BP+12, "4*PT_BP+12" },
  85. + { 4*PT_BP+16, "4*PT_BP+16" },
  86. + { 4*PT_BP+20, "4*PT_BP+20" },
  87. + { 4*PT_BP+24, "4*PT_BP+24" },
  88. + { 4*PT_BP+28, "4*PT_BP+28" },
  89. + { 4*PT_BP+32, "4*PT_BP+32" },
  90. + { 4*PT_BP+36, "4*PT_BP+36" },
  91. + { 4*PT_BP+40, "4*PT_BP+40" },
  92. + { 4*PT_BP+44, "4*PT_BP+44" },
  93. + { 4*PT_BP+48, "4*PT_BP+48" },
  94. + { 4*PT_BP+52, "4*PT_BP+52" },
  95. + { 4*PT_BP+56, "4*PT_BP+56" },
  96. +#endif
  97. +#if !defined(CRISV10) && !defined(CRISV32)
  98. #if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
  99. { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
  100. #endif
  101. @@ -3041,6 +3115,7 @@ const struct xlat struct_user_offsets[]
  102. #if defined(I386) || defined(X86_64)
  103. { uoff(u_debugreg), "offsetof(struct user, u_debugreg)" },
  104. #endif /* I386 */
  105. +#endif /* !CRISV10/!CRISV32 */
  106. #endif /* !IA64 */
  107. #endif /* !ALPHA */
  108. #endif /* !POWERPC/!SPARC */