460-powerpc_ptrace_h.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --- a/libc/sysdeps/linux/powerpc/sys/ptrace.h
  2. +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h
  3. @@ -1,5 +1,5 @@
  4. /* `ptrace' debugger support interface. Linux version.
  5. - Copyright (C) 2001 Free Software Foundation, Inc.
  6. + Copyright (C) 2001, 2006, 2007, 2011 Free Software Foundation, Inc.
  7. This file is part of the GNU C Library.
  8. The GNU C Library is free software; you can redistribute it and/or
  9. @@ -13,9 +13,8 @@
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. - License along with the GNU C Library; if not, write to the Free
  13. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. - 02111-1307 USA. */
  15. + License along with the GNU C Library; if not, see
  16. + <http://www.gnu.org/licenses/>. */
  17. #ifndef _SYS_PTRACE_H
  18. #define _SYS_PTRACE_H 1
  19. @@ -79,8 +78,73 @@ enum __ptrace_request
  20. #define PT_DETACH PTRACE_DETACH
  21. /* Continue and stop at the next (return from) syscall. */
  22. - PTRACE_SYSCALL = 24
  23. + PTRACE_SYSCALL = 24,
  24. #define PT_SYSCALL PTRACE_SYSCALL
  25. +
  26. + /* Set ptrace filter options. */
  27. + PTRACE_SETOPTIONS = 0x4200,
  28. +#define PT_SETOPTIONS PTRACE_SETOPTIONS
  29. +
  30. + /* Get last ptrace message. */
  31. + PTRACE_GETEVENTMSG = 0x4201,
  32. +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
  33. +
  34. + /* Get siginfo for process. */
  35. + PTRACE_GETSIGINFO = 0x4202,
  36. +#define PT_GETSIGINFO PTRACE_GETSIGINFO
  37. +
  38. + /* Set new siginfo for process. */
  39. + PTRACE_SETSIGINFO = 0x4203,
  40. +#define PT_SETSIGINFO PTRACE_SETSIGINFO
  41. +
  42. + /* Get register content. */
  43. + PTRACE_GETREGSET = 0x4204,
  44. +#define PTRACE_GETREGSET PTRACE_GETREGSET
  45. +
  46. + /* Set register content. */
  47. + PTRACE_SETREGSET = 0x4205,
  48. +#define PTRACE_SETREGSET PTRACE_SETREGSET
  49. +
  50. + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
  51. + signal or group stop state. */
  52. + PTRACE_SEIZE = 0x4206,
  53. +#define PTRACE_SEIZE PTRACE_SEIZE
  54. +
  55. + /* Trap seized tracee. */
  56. + PTRACE_INTERRUPT = 0x4207,
  57. +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
  58. +
  59. + /* Wait for next group event. */
  60. + PTRACE_LISTEN = 0x4208
  61. +};
  62. +
  63. +
  64. +/* Flag for PTRACE_LISTEN. */
  65. +enum __ptrace_flags
  66. +{
  67. + PTRACE_SEIZE_DEVEL = 0x80000000
  68. +};
  69. +
  70. +/* Options set using PTRACE_SETOPTIONS. */
  71. +enum __ptrace_setoptions {
  72. + PTRACE_O_TRACESYSGOOD = 0x00000001,
  73. + PTRACE_O_TRACEFORK = 0x00000002,
  74. + PTRACE_O_TRACEVFORK = 0x00000004,
  75. + PTRACE_O_TRACECLONE = 0x00000008,
  76. + PTRACE_O_TRACEEXEC = 0x00000010,
  77. + PTRACE_O_TRACEVFORKDONE = 0x00000020,
  78. + PTRACE_O_TRACEEXIT = 0x00000040,
  79. + PTRACE_O_MASK = 0x0000007f
  80. +};
  81. +
  82. +/* Wait extended result codes for the above trace options. */
  83. +enum __ptrace_eventcodes {
  84. + PTRACE_EVENT_FORK = 1,
  85. + PTRACE_EVENT_VFORK = 2,
  86. + PTRACE_EVENT_CLONE = 3,
  87. + PTRACE_EVENT_EXEC = 4,
  88. + PTRACE_EVENT_VFORK_DONE = 5,
  89. + PTRACE_EVENT_EXIT = 6
  90. };
  91. /* Perform process tracing functions. REQUEST is one of the values