ptrace.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
  3. ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
  4. */
  5. #ifndef _UAPI_PARISC_PTRACE_H
  6. #define _UAPI_PARISC_PTRACE_H
  7. #include <linux/types.h>
  8. /* This struct defines the way the registers are stored on the
  9. * stack during a system call.
  10. *
  11. * N.B. gdb/strace care about the size and offsets within this
  12. * structure. If you change things, you may break object compatibility
  13. * for those applications.
  14. *
  15. * Please do NOT use this structure for future programs, but use
  16. * user_regs_struct (see below) instead.
  17. *
  18. * It can be accessed through PTRACE_PEEKUSR/PTRACE_POKEUSR only.
  19. */
  20. struct pt_regs {
  21. unsigned long gr[32]; /* PSW is in gr[0] */
  22. __u64 fr[32];
  23. unsigned long sr[ 8];
  24. unsigned long iasq[2];
  25. unsigned long iaoq[2];
  26. unsigned long cr27;
  27. unsigned long pad0; /* available for other uses */
  28. unsigned long orig_r28;
  29. unsigned long ksp;
  30. unsigned long kpc;
  31. unsigned long sar; /* CR11 */
  32. unsigned long iir; /* CR19 */
  33. unsigned long isr; /* CR20 */
  34. unsigned long ior; /* CR21 */
  35. unsigned long ipsw; /* CR22 */
  36. };
  37. /**
  38. * struct user_regs_struct - User general purpose registers
  39. *
  40. * This is the user-visible general purpose register state structure
  41. * which is used to define the elf_gregset_t.
  42. *
  43. * It can be accessed through PTRACE_GETREGSET with NT_PRSTATUS
  44. * and through PTRACE_GETREGS.
  45. */
  46. struct user_regs_struct {
  47. unsigned long gr[32]; /* PSW is in gr[0] */
  48. unsigned long sr[8];
  49. unsigned long iaoq[2];
  50. unsigned long iasq[2];
  51. unsigned long sar; /* CR11 */
  52. unsigned long iir; /* CR19 */
  53. unsigned long isr; /* CR20 */
  54. unsigned long ior; /* CR21 */
  55. unsigned long ipsw; /* CR22 */
  56. unsigned long cr0;
  57. unsigned long cr24, cr25, cr26, cr27, cr28, cr29, cr30, cr31;
  58. unsigned long cr8, cr9, cr12, cr13, cr10, cr15;
  59. unsigned long _pad[80-64]; /* pad to ELF_NGREG (80) */
  60. };
  61. /**
  62. * struct user_fp_struct - User floating point registers
  63. *
  64. * This is the user-visible floating point register state structure.
  65. * It uses the same layout and size as elf_fpregset_t.
  66. *
  67. * It can be accessed through PTRACE_GETREGSET with NT_PRFPREG
  68. * and through PTRACE_GETFPREGS.
  69. */
  70. struct user_fp_struct {
  71. __u64 fr[32];
  72. };
  73. /*
  74. * The numbers chosen here are somewhat arbitrary but absolutely MUST
  75. * not overlap with any of the number assigned in <linux/ptrace.h>.
  76. *
  77. * These ones are taken from IA-64 on the assumption that theirs are
  78. * the most correct (and we also want to support PTRACE_SINGLEBLOCK
  79. * since we have taken branch traps too)
  80. */
  81. #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
  82. #define PTRACE_GETREGS 18
  83. #define PTRACE_SETREGS 19
  84. #define PTRACE_GETFPREGS 14
  85. #define PTRACE_SETFPREGS 15
  86. #endif /* _UAPI_PARISC_PTRACE_H */