ptrace.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (C) 2012 Regents of the University of California
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _UAPI_ASM_RISCV_PTRACE_H
  14. #define _UAPI_ASM_RISCV_PTRACE_H
  15. #ifndef __ASSEMBLY__
  16. #include <linux/types.h>
  17. /*
  18. * User-mode register state for core dumps, ptrace, sigcontext
  19. *
  20. * This decouples struct pt_regs from the userspace ABI.
  21. * struct user_regs_struct must form a prefix of struct pt_regs.
  22. */
  23. struct user_regs_struct {
  24. unsigned long pc;
  25. unsigned long ra;
  26. unsigned long sp;
  27. unsigned long gp;
  28. unsigned long tp;
  29. unsigned long t0;
  30. unsigned long t1;
  31. unsigned long t2;
  32. unsigned long s0;
  33. unsigned long s1;
  34. unsigned long a0;
  35. unsigned long a1;
  36. unsigned long a2;
  37. unsigned long a3;
  38. unsigned long a4;
  39. unsigned long a5;
  40. unsigned long a6;
  41. unsigned long a7;
  42. unsigned long s2;
  43. unsigned long s3;
  44. unsigned long s4;
  45. unsigned long s5;
  46. unsigned long s6;
  47. unsigned long s7;
  48. unsigned long s8;
  49. unsigned long s9;
  50. unsigned long s10;
  51. unsigned long s11;
  52. unsigned long t3;
  53. unsigned long t4;
  54. unsigned long t5;
  55. unsigned long t6;
  56. };
  57. struct __riscv_f_ext_state {
  58. __u32 f[32];
  59. __u32 fcsr;
  60. };
  61. struct __riscv_d_ext_state {
  62. __u64 f[32];
  63. __u32 fcsr;
  64. };
  65. struct __riscv_q_ext_state {
  66. __u64 f[64] __attribute__((aligned(16)));
  67. __u32 fcsr;
  68. /*
  69. * Reserved for expansion of sigcontext structure. Currently zeroed
  70. * upon signal, and must be zero upon sigreturn.
  71. */
  72. __u32 reserved[3];
  73. };
  74. union __riscv_fp_state {
  75. struct __riscv_f_ext_state f;
  76. struct __riscv_d_ext_state d;
  77. struct __riscv_q_ext_state q;
  78. };
  79. #endif /* __ASSEMBLY__ */
  80. #endif /* _UAPI_ASM_RISCV_PTRACE_H */