user.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #ifndef _SYS_USER_H
  16. #define _SYS_USER_H 1
  17. /* The whole purpose of this file is for GDB and GDB only. Don't read
  18. too much into it. Don't use it for anything other than GDB unless
  19. you know what you are doing. */
  20. struct user_fpregs_struct
  21. {
  22. long int cwd;
  23. long int swd;
  24. long int twd;
  25. long int fip;
  26. long int fcs;
  27. long int foo;
  28. long int fos;
  29. long int st_space [20];
  30. };
  31. struct user_fpxregs_struct
  32. {
  33. unsigned short int cwd;
  34. unsigned short int swd;
  35. unsigned short int twd;
  36. unsigned short int fop;
  37. long int fip;
  38. long int fcs;
  39. long int foo;
  40. long int fos;
  41. long int mxcsr;
  42. long int reserved;
  43. long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
  44. long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
  45. long int padding[56];
  46. };
  47. struct user_regs_struct
  48. {
  49. long int ebx;
  50. long int ecx;
  51. long int edx;
  52. long int esi;
  53. long int edi;
  54. long int ebp;
  55. long int eax;
  56. long int xds;
  57. long int xes;
  58. long int xfs;
  59. long int xgs;
  60. long int orig_eax;
  61. long int eip;
  62. long int xcs;
  63. long int eflags;
  64. long int esp;
  65. long int xss;
  66. };
  67. struct user
  68. {
  69. struct user_regs_struct regs;
  70. int u_fpvalid;
  71. struct user_fpregs_struct i387;
  72. unsigned long int u_tsize;
  73. unsigned long int u_dsize;
  74. unsigned long int u_ssize;
  75. unsigned long start_code;
  76. unsigned long start_stack;
  77. long int signal;
  78. int reserved;
  79. struct user_regs_struct* u_ar0;
  80. struct user_fpregs_struct* u_fpstate;
  81. unsigned long int magic;
  82. char u_comm [32];
  83. int u_debugreg [8];
  84. };
  85. #define PAGE_SHIFT 12
  86. #define PAGE_SIZE (1UL << PAGE_SHIFT)
  87. #define PAGE_MASK (~(PAGE_SIZE-1))
  88. #define NBPG PAGE_SIZE
  89. #define UPAGES 1
  90. #define HOST_TEXT_START_ADDR (u.start_code)
  91. #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
  92. #endif /* _SYS_USER_H */