user.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef __ASM_CRIS_USER_H
  2. #define __ASM_CRIS_USER_H
  3. /* User-mode register used for core dumps. */
  4. struct user_fpregs {
  5. };
  6. struct user_regs_struct {
  7. unsigned long r0; /* General registers. */
  8. unsigned long r1;
  9. unsigned long r2;
  10. unsigned long r3;
  11. unsigned long r4;
  12. unsigned long r5;
  13. unsigned long r6;
  14. unsigned long r7;
  15. unsigned long r8;
  16. unsigned long r9;
  17. unsigned long r10;
  18. unsigned long r11;
  19. unsigned long r12;
  20. unsigned long r13;
  21. unsigned long sp; /* R14, Stack pointer. */
  22. unsigned long acr; /* R15, Address calculation register. */
  23. unsigned long bz; /* P0, Constant zero (8-bits). */
  24. unsigned long vr; /* P1, Version register (8-bits). */
  25. unsigned long pid; /* P2, Process ID (8-bits). */
  26. unsigned long srs; /* P3, Support register select (8-bits). */
  27. unsigned long wz; /* P4, Constant zero (16-bits). */
  28. unsigned long exs; /* P5, Exception status. */
  29. unsigned long eda; /* P6, Exception data address. */
  30. unsigned long mof; /* P7, Multiply overflow regiter. */
  31. unsigned long dz; /* P8, Constant zero (32-bits). */
  32. unsigned long ebp; /* P9, Exception base pointer. */
  33. unsigned long erp; /* P10, Exception return pointer. */
  34. unsigned long srp; /* P11, Subroutine return pointer. */
  35. unsigned long nrp; /* P12, NMI return pointer. */
  36. unsigned long ccs; /* P13, Condition code stack. */
  37. unsigned long usp; /* P14, User mode stack pointer. */
  38. unsigned long spc; /* P15, Single step PC. */
  39. };
  40. /*
  41. * Core file format: The core file is written in such a way that gdb
  42. * can understand it and provide useful information to the user (under
  43. * linux we use the `trad-core' bfd). The file contents are as follows:
  44. *
  45. * upage: 1 page consisting of a user struct that tells gdb
  46. * what is present in the file. Directly after this is a
  47. * copy of the task_struct, which is currently not used by gdb,
  48. * but it may come in handy at some point. All of the registers
  49. * are stored as part of the upage. The upage should always be
  50. * only one page long.
  51. * data: The data segment follows next. We use current->end_text to
  52. * current->brk to pick up all of the user variables, plus any memory
  53. * that may have been sbrk'ed. No attempt is made to determine if a
  54. * page is demand-zero or if a page is totally unused, we just cover
  55. * the entire range. All of the addresses are rounded in such a way
  56. * that an integral number of pages is written.
  57. * stack: We need the stack information in order to get a meaningful
  58. * backtrace. We need to write the data from usp to
  59. * current->start_stack, so we round each of these in order to be able
  60. * to write an integer number of pages.
  61. */
  62. struct user {
  63. struct user_regs_struct regs; /* entire machine state */
  64. size_t u_tsize; /* text size (pages) */
  65. size_t u_dsize; /* data size (pages) */
  66. size_t u_ssize; /* stack size (pages) */
  67. unsigned long start_code; /* text starting address */
  68. unsigned long start_data; /* data starting address */
  69. unsigned long start_stack; /* stack starting address */
  70. long int signal; /* signal causing core dump */
  71. unsigned long u_ar0; /* help gdb find registers */
  72. unsigned long magic; /* identifies a core file */
  73. char u_comm[32]; /* user command name */
  74. };
  75. #endif /* __ASM_CRIS_USER_H */