1 /* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 /* The whole purpose of this file is for GDB and GDB only. Don't read
23 too much into it. Don't use it for anything other than GDB unless
24 you know what you are doing. */
26 #include <bits/wordsize.h>
30 struct user_fpregs_struct
40 __uint32_t st_space
[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
41 __uint32_t xmm_space
[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
42 __uint32_t padding
[24];
45 struct user_regs_struct
62 unsigned long orig_rax
;
68 unsigned long fs_base
;
69 unsigned long gs_base
;
78 struct user_regs_struct regs
;
80 struct user_fpregs_struct i387
;
81 unsigned long int u_tsize
;
82 unsigned long int u_dsize
;
83 unsigned long int u_ssize
;
84 unsigned long start_code
;
85 unsigned long start_stack
;
88 struct user_regs_struct
* u_ar0
;
89 struct user_fpregs_struct
* u_fpstate
;
90 unsigned long int magic
;
92 unsigned long int u_debugreg
[8];
96 /* These are the 32-bit x86 structures. */
97 struct user_fpregs_struct
106 long int st_space
[20];
109 struct user_fpxregs_struct
111 unsigned short int cwd
;
112 unsigned short int swd
;
113 unsigned short int twd
;
114 unsigned short int fop
;
121 long int st_space
[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
122 long int xmm_space
[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
123 long int padding
[56];
126 struct user_regs_struct
149 struct user_regs_struct regs
;
151 struct user_fpregs_struct i387
;
152 unsigned long int u_tsize
;
153 unsigned long int u_dsize
;
154 unsigned long int u_ssize
;
155 unsigned long start_code
;
156 unsigned long start_stack
;
159 struct user_regs_struct
* u_ar0
;
160 struct user_fpregs_struct
* u_fpstate
;
161 unsigned long int magic
;
165 #endif /* __WORDSIZE */
167 #define PAGE_SHIFT 12
168 #define PAGE_SIZE (1UL << PAGE_SHIFT)
169 #define PAGE_MASK (~(PAGE_SIZE-1))
170 #define NBPG PAGE_SIZE
172 #define HOST_TEXT_START_ADDR (u.start_code)
173 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
175 #endif /* _SYS_USER_H */