Back to index

glibc  2.9
user.h
Go to the documentation of this file.
00001 /* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _SYS_USER_H
00020 #define _SYS_USER_H  1
00021 
00022 /* The whole purpose of this file is for GDB and GDB only.  Don't read
00023    too much into it.  Don't use it for anything other than GDB unless
00024    you know what you are doing.  */
00025 
00026 struct user_fpregs_struct
00027 {
00028   long int cwd;
00029   long int swd;
00030   long int twd;
00031   long int fip;
00032   long int fcs;
00033   long int foo;
00034   long int fos;
00035   long int st_space [20];
00036 };
00037 
00038 struct user_fpxregs_struct
00039 {
00040   unsigned short int cwd;
00041   unsigned short int swd;
00042   unsigned short int twd;
00043   unsigned short int fop;
00044   long int fip;
00045   long int fcs;
00046   long int foo;
00047   long int fos;
00048   long int mxcsr;
00049   long int reserved;
00050   long int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
00051   long int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
00052   long int padding[56];
00053 };
00054 
00055 struct user_regs_struct
00056 {
00057   long int ebx;
00058   long int ecx;
00059   long int edx;
00060   long int esi;
00061   long int edi;
00062   long int ebp;
00063   long int eax;
00064   long int xds;
00065   long int xes;
00066   long int xfs;
00067   long int xgs;
00068   long int orig_eax;
00069   long int eip;
00070   long int xcs;
00071   long int eflags;
00072   long int esp;
00073   long int xss;
00074 };
00075 
00076 struct user
00077 {
00078   struct user_regs_struct   regs;
00079   int                       u_fpvalid;
00080   struct user_fpregs_struct i387;
00081   unsigned long int         u_tsize;
00082   unsigned long int         u_dsize;
00083   unsigned long int         u_ssize;
00084   unsigned long                    start_code;
00085   unsigned long                    start_stack;
00086   long int                  signal;
00087   int                       reserved;
00088   struct user_regs_struct*  u_ar0;
00089   struct user_fpregs_struct*       u_fpstate;
00090   unsigned long int         magic;
00091   char                      u_comm [32];
00092   int                       u_debugreg [8];
00093 };
00094 
00095 #define PAGE_SHIFT          12
00096 #define PAGE_SIZE           (1UL << PAGE_SHIFT)
00097 #define PAGE_MASK           (~(PAGE_SIZE-1))
00098 #define NBPG                PAGE_SIZE
00099 #define UPAGES                     1
00100 #define HOST_TEXT_START_ADDR       (u.start_code)
00101 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
00102 
00103 #endif /* _SYS_USER_H */