user.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _SYS_USER_H
  2. #define _SYS_USER_H 1
  3. struct user_fpregs {
  4. unsigned long fsr; /* fpu status reg */
  5. unsigned long fesr; /* fpu exception status reg */
  6. unsigned long fp[32]; /* fpu general regs */
  7. };
  8. struct user_regs {
  9. #if defined(__CSKYABIV2__)
  10. unsigned long int uregs[34]; /* CSKY V2 has 32 general rgister */
  11. #else
  12. unsigned long int uregs[18]; /* CSKY V1 has 16 general rgister */
  13. #endif
  14. };
  15. /*
  16. * When the kernel dumps core, it starts by dumping the user struct -
  17. * this will be used by gdb to figure out where the data and stack segments
  18. * are within the file, and what virtual addresses to use.
  19. */
  20. struct user{
  21. /* We start with the registers, to mimic the way that "memory" is returned
  22. from the ptrace(3,...) function. */
  23. struct user_regs regs; /* Where the registers are actually stored */
  24. int u_fpvalid; /* True if math co-processor being used. */
  25. /* The rest of this junk is to help gdb figure out what goes where */
  26. unsigned long int u_tsize; /* Text segment size (pages). */
  27. unsigned long int u_dsize; /* Data segment size (pages). */
  28. unsigned long int u_ssize; /* Stack segment size (pages). */
  29. unsigned long start_code; /* Starting virtual address of text. */
  30. unsigned long start_stack;/* Starting virtual address of stack area.
  31. This is actually the bottom of the stack,
  32. the top of the stack is always found in
  33. the esp register. */
  34. long int signal; /* Signal that caused the core dump. */
  35. int reserved; /* No longer used */
  36. struct user_regs * u_ar0; /* Used by gdb to help find the values
  37. for the registers. */
  38. unsigned long magic; /* To uniquely identify a core file */
  39. char u_comm[32]; /* User command that was responsible */
  40. struct user_fpregs u_fp;
  41. struct user_fpregs* u_fpstate; /* Math Co-processor pointer. */
  42. };
  43. #endif /* _SYS_USER_H */