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>
31 struct user_fpregs_struct
41 __uint32_t st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
42 __uint32_t xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
43 __uint32_t padding[24];
46 struct user_regs_struct
63 unsigned long orig_rax;
69 unsigned long fs_base;
70 unsigned long gs_base;
79 struct user_regs_struct regs;
81 struct user_fpregs_struct i387;
82 unsigned long int u_tsize;
83 unsigned long int u_dsize;
84 unsigned long int u_ssize;
85 unsigned long start_code;
86 unsigned long start_stack;
89 struct user_regs_struct* u_ar0;
90 struct user_fpregs_struct* u_fpstate;
91 unsigned long int magic;
93 unsigned long int u_debugreg [8];
97 /* These are the 32-bit x86 structures. */
98 struct user_fpregs_struct
107 long int st_space [20];
110 struct user_fpxregs_struct
112 unsigned short int cwd;
113 unsigned short int swd;
114 unsigned short int twd;
115 unsigned short int fop;
122 long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
123 long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
124 long int padding[56];
127 struct user_regs_struct
150 struct user_regs_struct regs;
152 struct user_fpregs_struct i387;
153 unsigned long int u_tsize;
154 unsigned long int u_dsize;
155 unsigned long int u_ssize;
156 unsigned long start_code;
157 unsigned long start_stack;
160 struct user_regs_struct* u_ar0;
161 struct user_fpregs_struct* u_fpstate;
162 unsigned long int magic;
166 #endif /* __WORDSIZE */
168 #define PAGE_SIZE sysconf(_SC_PAGESIZE)
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 */