ptrace.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef _ASM_X86_PTRACE_H
  2. #define _ASM_X86_PTRACE_H
  3. /* For */
  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. struct pt_regs {
  11. long ebx;
  12. long ecx;
  13. long edx;
  14. long esi;
  15. long edi;
  16. long ebp;
  17. long eax;
  18. int xds;
  19. int xes;
  20. int xfs;
  21. int xgs;
  22. long orig_eax;
  23. long eip;
  24. int xcs;
  25. long eflags;
  26. long esp;
  27. int xss;
  28. };
  29. #else /* __i386__ */
  30. struct pt_regs {
  31. unsigned long r15;
  32. unsigned long r14;
  33. unsigned long r13;
  34. unsigned long r12;
  35. unsigned long rbp;
  36. unsigned long rbx;
  37. /* arguments: non interrupts/non tracing syscalls only save upto here*/
  38. unsigned long r11;
  39. unsigned long r10;
  40. unsigned long r9;
  41. unsigned long r8;
  42. unsigned long rax;
  43. unsigned long rcx;
  44. unsigned long rdx;
  45. unsigned long rsi;
  46. unsigned long rdi;
  47. unsigned long orig_rax;
  48. /* end of arguments */
  49. /* cpu exception frame or undefined */
  50. unsigned long rip;
  51. unsigned long cs;
  52. unsigned long eflags;
  53. unsigned long rsp;
  54. unsigned long ss;
  55. /* top of stack page */
  56. };
  57. #endif /* !__i386__ */
  58. #endif /* !__ASSEMBLY__ */
  59. #endif /* _ASM_X86_PTRACE_H */