compat_ptrace.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _PTRACE32_H
  2. #define _PTRACE32_H
  3. #include <asm/ptrace.h> /* needed for NUM_CR_WORDS */
  4. #include "compat_linux.h" /* needed for psw_compat_t */
  5. struct compat_per_struct_kernel {
  6. __u32 cr9; /* PER control bits */
  7. __u32 cr10; /* PER starting address */
  8. __u32 cr11; /* PER ending address */
  9. __u32 bits; /* Obsolete software bits */
  10. __u32 starting_addr; /* User specified start address */
  11. __u32 ending_addr; /* User specified end address */
  12. __u16 perc_atmid; /* PER trap ATMID */
  13. __u32 address; /* PER trap instruction address */
  14. __u8 access_id; /* PER trap access identification */
  15. };
  16. struct compat_user_regs_struct
  17. {
  18. psw_compat_t psw;
  19. u32 gprs[NUM_GPRS];
  20. u32 acrs[NUM_ACRS];
  21. u32 orig_gpr2;
  22. /* nb: there's a 4-byte hole here */
  23. s390_fp_regs fp_regs;
  24. /*
  25. * These per registers are in here so that gdb can modify them
  26. * itself as there is no "official" ptrace interface for hardware
  27. * watchpoints. This is the way intel does it.
  28. */
  29. struct compat_per_struct_kernel per_info;
  30. u32 ieee_instruction_pointer; /* obsolete, always 0 */
  31. };
  32. struct compat_user {
  33. /* We start with the registers, to mimic the way that "memory"
  34. is returned from the ptrace(3,...) function. */
  35. struct compat_user_regs_struct regs;
  36. /* The rest of this junk is to help gdb figure out what goes where */
  37. u32 u_tsize; /* Text segment size (pages). */
  38. u32 u_dsize; /* Data segment size (pages). */
  39. u32 u_ssize; /* Stack segment size (pages). */
  40. u32 start_code; /* Starting virtual address of text. */
  41. u32 start_stack; /* Starting virtual address of stack area.
  42. This is actually the bottom of the stack,
  43. the top of the stack is always found in the
  44. esp register. */
  45. s32 signal; /* Signal that caused the core dump. */
  46. u32 u_ar0; /* Used by gdb to help find the values for */
  47. /* the registers. */
  48. u32 magic; /* To uniquely identify a core file */
  49. char u_comm[32]; /* User command that was responsible */
  50. };
  51. typedef struct
  52. {
  53. __u32 len;
  54. __u32 kernel_addr;
  55. __u32 process_addr;
  56. } compat_ptrace_area;
  57. #endif /* _PTRACE32_H */