ptrace.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * linux/arch/unicore32/include/asm/ptrace.h
  3. *
  4. * Code specific to PKUnity SoC and UniCore ISA
  5. *
  6. * Copyright (C) 2001-2010 GUAN Xue-tao
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef _UAPI__UNICORE_PTRACE_H__
  13. #define _UAPI__UNICORE_PTRACE_H__
  14. #define PTRACE_GET_THREAD_AREA 22
  15. /*
  16. * PSR bits
  17. */
  18. #define USER_MODE 0x00000010
  19. #define REAL_MODE 0x00000011
  20. #define INTR_MODE 0x00000012
  21. #define PRIV_MODE 0x00000013
  22. #define ABRT_MODE 0x00000017
  23. #define EXTN_MODE 0x0000001b
  24. #define SUSR_MODE 0x0000001f
  25. #define MODE_MASK 0x0000001f
  26. #define PSR_R_BIT 0x00000040
  27. #define PSR_I_BIT 0x00000080
  28. #define PSR_V_BIT 0x10000000
  29. #define PSR_C_BIT 0x20000000
  30. #define PSR_Z_BIT 0x40000000
  31. #define PSR_S_BIT 0x80000000
  32. /*
  33. * Groups of PSR bits
  34. */
  35. #define PSR_f 0xff000000 /* Flags */
  36. #define PSR_c 0x000000ff /* Control */
  37. #ifndef __ASSEMBLY__
  38. /*
  39. * This struct defines the way the registers are stored on the
  40. * stack during a system call. Note that sizeof(struct pt_regs)
  41. * has to be a multiple of 8.
  42. */
  43. struct pt_regs {
  44. unsigned long uregs[34];
  45. };
  46. #define UCreg_asr uregs[32]
  47. #define UCreg_pc uregs[31]
  48. #define UCreg_lr uregs[30]
  49. #define UCreg_sp uregs[29]
  50. #define UCreg_ip uregs[28]
  51. #define UCreg_fp uregs[27]
  52. #define UCreg_26 uregs[26]
  53. #define UCreg_25 uregs[25]
  54. #define UCreg_24 uregs[24]
  55. #define UCreg_23 uregs[23]
  56. #define UCreg_22 uregs[22]
  57. #define UCreg_21 uregs[21]
  58. #define UCreg_20 uregs[20]
  59. #define UCreg_19 uregs[19]
  60. #define UCreg_18 uregs[18]
  61. #define UCreg_17 uregs[17]
  62. #define UCreg_16 uregs[16]
  63. #define UCreg_15 uregs[15]
  64. #define UCreg_14 uregs[14]
  65. #define UCreg_13 uregs[13]
  66. #define UCreg_12 uregs[12]
  67. #define UCreg_11 uregs[11]
  68. #define UCreg_10 uregs[10]
  69. #define UCreg_09 uregs[9]
  70. #define UCreg_08 uregs[8]
  71. #define UCreg_07 uregs[7]
  72. #define UCreg_06 uregs[6]
  73. #define UCreg_05 uregs[5]
  74. #define UCreg_04 uregs[4]
  75. #define UCreg_03 uregs[3]
  76. #define UCreg_02 uregs[2]
  77. #define UCreg_01 uregs[1]
  78. #define UCreg_00 uregs[0]
  79. #define UCreg_ORIG_00 uregs[33]
  80. #endif /* __ASSEMBLY__ */
  81. #endif /* _UAPI__UNICORE_PTRACE_H__ */