1
0

patch-util_c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- strace-4.5.18.orig/util.c 2008-08-19 06:47:51.000000000 +0200
  3. +++ strace-4.5.18/util.c 2009-01-02 21:24:05.530098238 +0100
  4. @@ -1097,6 +1097,12 @@ struct tcb *tcp;
  5. #elif defined(SH64)
  6. if (upeek(tcp->pid, REG_PC ,&pc) < 0)
  7. return -1;
  8. +#elif defined(CRISV10)
  9. + if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0)
  10. + return -1;
  11. +#elif defined(CRISV32)
  12. + if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0)
  13. + return -1;
  14. #endif
  15. return pc;
  16. #endif /* LINUX */
  17. @@ -1245,6 +1251,22 @@ struct tcb *tcp;
  18. return;
  19. }
  20. tprintf("[%08lx] ", pc);
  21. +#elif defined(CRISV10)
  22. + long pc;
  23. +
  24. + if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) {
  25. + PRINTBADPC;
  26. + return;
  27. + }
  28. + tprintf("[%08lx] ", (unsigned long)pc);
  29. +#elif defined(CRISV32)
  30. + long pc;
  31. +
  32. + if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) {
  33. + PRINTBADPC;
  34. + return;
  35. + }
  36. + tprintf("[%08lx] ", (unsigned long)pc);
  37. #endif /* !architecture */
  38. #endif /* LINUX */
  39. @@ -1444,6 +1466,13 @@ typedef struct regs arg_setup_state;
  40. # define arg0_offset (REG_OFFSET+16)
  41. # define arg1_offset (REG_OFFSET+24)
  42. # define restore_arg0(tcp, state, val) 0
  43. +# elif defined CRISV10 || defined CRISV32
  44. +# define arg0_offset (4*PT_R11)
  45. +# define arg1_offset (4*PT_ORIG_R10)
  46. +# define restore_arg0(tcp, state, val) 0
  47. +# define restore_arg1(tcp, state, val) 0
  48. +# define arg0_index 1
  49. +# define arg1_index 0
  50. # else
  51. # define arg0_offset 0
  52. # define arg1_offset 4