user.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _SYS_USER_H
  15. #define _SYS_USER_H 1
  16. /* The whole purpose of this file is for GDB and GDB only. Don't read
  17. too much into it. Don't use it for anything other than GDB unless
  18. you know what you are doing. */
  19. struct user_fpregs_struct
  20. {
  21. long int cwd;
  22. long int swd;
  23. long int twd;
  24. long int fip;
  25. long int fcs;
  26. long int foo;
  27. long int fos;
  28. long int st_space [20];
  29. };
  30. struct user_regs_struct
  31. {
  32. unsigned int gpr[32];
  33. unsigned int pc;
  34. unsigned int msr;
  35. unsigned int ear;
  36. unsigned int esr;
  37. unsigned int fsr;
  38. unsigned int btr;
  39. unsigned int pvr[12];
  40. };
  41. struct user
  42. {
  43. struct user_regs_struct regs;
  44. int u_fpvalid;
  45. struct user_fpregs_struct i387;
  46. unsigned long int u_tsize;
  47. unsigned long int u_dsize;
  48. unsigned long int u_ssize;
  49. unsigned long start_code;
  50. unsigned long start_stack;
  51. long int signal;
  52. int reserved;
  53. struct user_regs_struct* u_ar0;
  54. struct user_fpregs_struct* u_fpstate;
  55. unsigned long int magic;
  56. char u_comm [32];
  57. int u_debugreg [8];
  58. };
  59. #define PAGE_SHIFT 12
  60. #define PAGE_SIZE (1UL << PAGE_SHIFT)
  61. #define PAGE_MASK (~(PAGE_SIZE-1))
  62. #define NBPG PAGE_SIZE
  63. #define UPAGES 1
  64. #define HOST_TEXT_START_ADDR (u.start_code)
  65. #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
  66. #endif /* _SYS_USER_H */