ptrace.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* MN10300 Exception frame layout and ptrace constants
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _UAPI_ASM_PTRACE_H
  12. #define _UAPI_ASM_PTRACE_H
  13. #define PT_A3 0
  14. #define PT_A2 1
  15. #define PT_D3 2
  16. #define PT_D2 3
  17. #define PT_MCVF 4
  18. #define PT_MCRL 5
  19. #define PT_MCRH 6
  20. #define PT_MDRQ 7
  21. #define PT_E1 8
  22. #define PT_E0 9
  23. #define PT_E7 10
  24. #define PT_E6 11
  25. #define PT_E5 12
  26. #define PT_E4 13
  27. #define PT_E3 14
  28. #define PT_E2 15
  29. #define PT_SP 16
  30. #define PT_LAR 17
  31. #define PT_LIR 18
  32. #define PT_MDR 19
  33. #define PT_A1 20
  34. #define PT_A0 21
  35. #define PT_D1 22
  36. #define PT_D0 23
  37. #define PT_ORIG_D0 24
  38. #define PT_EPSW 25
  39. #define PT_PC 26
  40. #define NR_PTREGS 27
  41. /*
  42. * This defines the way registers are stored in the event of an exception
  43. * - the strange order is due to the MOVM instruction
  44. */
  45. struct pt_regs {
  46. unsigned long a3; /* syscall arg 3 */
  47. unsigned long a2; /* syscall arg 4 */
  48. unsigned long d3; /* syscall arg 5 */
  49. unsigned long d2; /* syscall arg 6 */
  50. unsigned long mcvf;
  51. unsigned long mcrl;
  52. unsigned long mcrh;
  53. unsigned long mdrq;
  54. unsigned long e1;
  55. unsigned long e0;
  56. unsigned long e7;
  57. unsigned long e6;
  58. unsigned long e5;
  59. unsigned long e4;
  60. unsigned long e3;
  61. unsigned long e2;
  62. unsigned long sp;
  63. unsigned long lar;
  64. unsigned long lir;
  65. unsigned long mdr;
  66. unsigned long a1;
  67. unsigned long a0; /* syscall arg 1 */
  68. unsigned long d1; /* syscall arg 2 */
  69. unsigned long d0; /* syscall ret */
  70. struct pt_regs *next; /* next frame pointer */
  71. unsigned long orig_d0; /* syscall number */
  72. unsigned long epsw;
  73. unsigned long pc;
  74. };
  75. /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
  76. #define PTRACE_GETREGS 12
  77. #define PTRACE_SETREGS 13
  78. #define PTRACE_GETFPREGS 14
  79. #define PTRACE_SETFPREGS 15
  80. #endif /* _UAPI_ASM_PTRACE_H */