compat_ptrace.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef _PTRACE32_H
  2. #define _PTRACE32_H
  3. #include "compat_linux.h" /* needed for _psw_t32 */
  4. typedef struct {
  5. __u32 cr[3];
  6. } per_cr_words32;
  7. typedef struct {
  8. __u16 perc_atmid; /* 0x096 */
  9. __u32 address; /* 0x098 */
  10. __u8 access_id; /* 0x0a1 */
  11. } per_lowcore_words32;
  12. typedef struct {
  13. union {
  14. per_cr_words32 words;
  15. } control_regs;
  16. /*
  17. * Use these flags instead of setting em_instruction_fetch
  18. * directly they are used so that single stepping can be
  19. * switched on & off while not affecting other tracing
  20. */
  21. unsigned single_step : 1;
  22. unsigned instruction_fetch : 1;
  23. unsigned : 30;
  24. /*
  25. * These addresses are copied into cr10 & cr11 if single
  26. * stepping is switched off
  27. */
  28. __u32 starting_addr;
  29. __u32 ending_addr;
  30. union {
  31. per_lowcore_words32 words;
  32. } lowcore;
  33. } per_struct32;
  34. struct user_regs_struct32
  35. {
  36. _psw_t32 psw;
  37. u32 gprs[NUM_GPRS];
  38. u32 acrs[NUM_ACRS];
  39. u32 orig_gpr2;
  40. s390_fp_regs fp_regs;
  41. /*
  42. * These per registers are in here so that gdb can modify them
  43. * itself as there is no "official" ptrace interface for hardware
  44. * watchpoints. This is the way intel does it.
  45. */
  46. per_struct32 per_info;
  47. u32 ieee_instruction_pointer;
  48. /* Used to give failing instruction back to user for ieee exceptions */
  49. };
  50. struct user32 {
  51. /* We start with the registers, to mimic the way that "memory"
  52. is returned from the ptrace(3,...) function. */
  53. struct user_regs_struct32 regs; /* Where the registers are actually stored */
  54. /* The rest of this junk is to help gdb figure out what goes where */
  55. u32 u_tsize; /* Text segment size (pages). */
  56. u32 u_dsize; /* Data segment size (pages). */
  57. u32 u_ssize; /* Stack segment size (pages). */
  58. u32 start_code; /* Starting virtual address of text. */
  59. u32 start_stack; /* Starting virtual address of stack area.
  60. This is actually the bottom of the stack,
  61. the top of the stack is always found in the
  62. esp register. */
  63. s32 signal; /* Signal that caused the core dump. */
  64. u32 u_ar0; /* Used by gdb to help find the values for */
  65. /* the registers. */
  66. u32 magic; /* To uniquely identify a core file */
  67. char u_comm[32]; /* User command that was responsible */
  68. };
  69. typedef struct
  70. {
  71. __u32 len;
  72. __u32 kernel_addr;
  73. __u32 process_addr;
  74. } ptrace_area_emu31;
  75. #endif /* _PTRACE32_H */