ptrace-abi.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _X86_64_PTRACE_ABI_H
  2. #define _X86_64_PTRACE_ABI_H
  3. #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
  4. #define R15 0
  5. #define R14 8
  6. #define R13 16
  7. #define R12 24
  8. #define RBP 32
  9. #define RBX 40
  10. /* arguments: interrupts/non tracing syscalls only save upto here*/
  11. #define R11 48
  12. #define R10 56
  13. #define R9 64
  14. #define R8 72
  15. #define RAX 80
  16. #define RCX 88
  17. #define RDX 96
  18. #define RSI 104
  19. #define RDI 112
  20. #define ORIG_RAX 120 /* = ERROR */
  21. /* end of arguments */
  22. /* cpu exception frame or undefined in case of fast syscall. */
  23. #define RIP 128
  24. #define CS 136
  25. #define EFLAGS 144
  26. #define RSP 152
  27. #define SS 160
  28. #define ARGOFFSET R11
  29. #endif /* __ASSEMBLY__ */
  30. /* top of stack page */
  31. #define FRAME_SIZE 168
  32. #define PTRACE_OLDSETOPTIONS 21
  33. /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
  34. #define PTRACE_GETREGS 12
  35. #define PTRACE_SETREGS 13
  36. #define PTRACE_GETFPREGS 14
  37. #define PTRACE_SETFPREGS 15
  38. #define PTRACE_GETFPXREGS 18
  39. #define PTRACE_SETFPXREGS 19
  40. /* only useful for access 32bit programs */
  41. #define PTRACE_GET_THREAD_AREA 25
  42. #define PTRACE_SET_THREAD_AREA 26
  43. #define PTRACE_ARCH_PRCTL 30 /* arch_prctl for child */
  44. #endif