ptrace.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef _UAPI_ASMAXP_PTRACE_H
  2. #define _UAPI_ASMAXP_PTRACE_H
  3. /*
  4. * This struct defines the way the registers are stored on the
  5. * kernel stack during a system call or other kernel entry
  6. *
  7. * NOTE! I want to minimize the overhead of system calls, so this
  8. * struct has as little information as possible. I does not have
  9. *
  10. * - floating point regs: the kernel doesn't change those
  11. * - r9-15: saved by the C compiler
  12. *
  13. * This makes "fork()" and "exec()" a bit more complex, but should
  14. * give us low system call latency.
  15. */
  16. struct pt_regs {
  17. unsigned long r0;
  18. unsigned long r1;
  19. unsigned long r2;
  20. unsigned long r3;
  21. unsigned long r4;
  22. unsigned long r5;
  23. unsigned long r6;
  24. unsigned long r7;
  25. unsigned long r8;
  26. unsigned long r19;
  27. unsigned long r20;
  28. unsigned long r21;
  29. unsigned long r22;
  30. unsigned long r23;
  31. unsigned long r24;
  32. unsigned long r25;
  33. unsigned long r26;
  34. unsigned long r27;
  35. unsigned long r28;
  36. unsigned long hae;
  37. /* JRP - These are the values provided to a0-a2 by PALcode */
  38. unsigned long trap_a0;
  39. unsigned long trap_a1;
  40. unsigned long trap_a2;
  41. /* These are saved by PAL-code: */
  42. unsigned long ps;
  43. unsigned long pc;
  44. unsigned long gp;
  45. unsigned long r16;
  46. unsigned long r17;
  47. unsigned long r18;
  48. };
  49. /*
  50. * This is the extended stack used by signal handlers and the context
  51. * switcher: it's pushed after the normal "struct pt_regs".
  52. */
  53. struct switch_stack {
  54. unsigned long r9;
  55. unsigned long r10;
  56. unsigned long r11;
  57. unsigned long r12;
  58. unsigned long r13;
  59. unsigned long r14;
  60. unsigned long r15;
  61. unsigned long r26;
  62. unsigned long fp[32]; /* fp[31] is fpcr */
  63. };
  64. #endif /* _UAPI_ASMAXP_PTRACE_H */