ptrace.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef _UAPI_ASM_X86_PTRACE_H
  2. #define _UAPI_ASM_X86_PTRACE_H
  3. #include <linux/compiler.h> /* For __user */
  4. #include <asm/ptrace-abi.h>
  5. #include <asm/processor-flags.h>
  6. #ifndef __ASSEMBLY__
  7. #ifdef __i386__
  8. /* this struct defines the way the registers are stored on the
  9. stack during a system call. */
  10. #ifndef __KERNEL__
  11. struct pt_regs {
  12. long ebx;
  13. long ecx;
  14. long edx;
  15. long esi;
  16. long edi;
  17. long ebp;
  18. long eax;
  19. int xds;
  20. int xes;
  21. int xfs;
  22. int xgs;
  23. long orig_eax;
  24. long eip;
  25. int xcs;
  26. long eflags;
  27. long esp;
  28. int xss;
  29. };
  30. #endif /* __KERNEL__ */
  31. #else /* __i386__ */
  32. #ifndef __KERNEL__
  33. struct pt_regs {
  34. unsigned long r15;
  35. unsigned long r14;
  36. unsigned long r13;
  37. unsigned long r12;
  38. unsigned long rbp;
  39. unsigned long rbx;
  40. /* arguments: non interrupts/non tracing syscalls only save up to here*/
  41. unsigned long r11;
  42. unsigned long r10;
  43. unsigned long r9;
  44. unsigned long r8;
  45. unsigned long rax;
  46. unsigned long rcx;
  47. unsigned long rdx;
  48. unsigned long rsi;
  49. unsigned long rdi;
  50. unsigned long orig_rax;
  51. /* end of arguments */
  52. /* cpu exception frame or undefined */
  53. unsigned long rip;
  54. unsigned long cs;
  55. unsigned long eflags;
  56. unsigned long rsp;
  57. unsigned long ss;
  58. /* top of stack page */
  59. };
  60. #endif /* __KERNEL__ */
  61. #endif /* !__i386__ */
  62. #endif /* !__ASSEMBLY__ */
  63. #endif /* _UAPI_ASM_X86_PTRACE_H */