uClibc-0.9.31.1-powerpc-ptrace-fix.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [PATCH] powerpc: add PTRACE_EVENT_ defines needed by ltrace
  2. Equivalent to the common version and kernel headers.
  3. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  4. ---
  5. libc/sysdeps/linux/powerpc/sys/ptrace.h | 41 +++++++++++++++++++++++++++++++-
  6. 1 file changed, 40 insertions(+), 1 deletion(-)
  7. Index: uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h
  8. ===================================================================
  9. --- uClibc-0.9.31.orig/libc/sysdeps/linux/powerpc/sys/ptrace.h
  10. +++ uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h
  11. @@ -79,8 +79,47 @@ enum __ptrace_request
  12. #define PT_DETACH PTRACE_DETACH
  13. /* Continue and stop at the next (return from) syscall. */
  14. - PTRACE_SYSCALL = 24
  15. + PTRACE_SYSCALL = 24,
  16. #define PT_SYSCALL PTRACE_SYSCALL
  17. +
  18. + /* Set ptrace filter options. */
  19. + PTRACE_SETOPTIONS = 0x4200,
  20. +#define PT_SETOPTIONS PTRACE_SETOPTIONS
  21. +
  22. + /* Get last ptrace message. */
  23. + PTRACE_GETEVENTMSG = 0x4201,
  24. +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
  25. +
  26. + /* Get siginfo for process. */
  27. + PTRACE_GETSIGINFO = 0x4202,
  28. +#define PT_GETSIGINFO PTRACE_GETSIGINFO
  29. +
  30. + /* Set new siginfo for process. */
  31. + PTRACE_SETSIGINFO = 0x4203
  32. +#define PT_SETSIGINFO PTRACE_SETSIGINFO
  33. +};
  34. +
  35. +
  36. +/* Options set using PTRACE_SETOPTIONS. */
  37. +enum __ptrace_setoptions {
  38. + PTRACE_O_TRACESYSGOOD = 0x00000001,
  39. + PTRACE_O_TRACEFORK = 0x00000002,
  40. + PTRACE_O_TRACEVFORK = 0x00000004,
  41. + PTRACE_O_TRACECLONE = 0x00000008,
  42. + PTRACE_O_TRACEEXEC = 0x00000010,
  43. + PTRACE_O_TRACEVFORKDONE = 0x00000020,
  44. + PTRACE_O_TRACEEXIT = 0x00000040,
  45. + PTRACE_O_MASK = 0x0000007f
  46. +};
  47. +
  48. +/* Wait extended result codes for the above trace options. */
  49. +enum __ptrace_eventcodes {
  50. + PTRACE_EVENT_FORK = 1,
  51. + PTRACE_EVENT_VFORK = 2,
  52. + PTRACE_EVENT_CLONE = 3,
  53. + PTRACE_EVENT_EXEC = 4,
  54. + PTRACE_EVENT_VFORK_DONE = 5,
  55. + PTRACE_EVENT_EXIT = 6
  56. };
  57. /* Perform process tracing functions. REQUEST is one of the values