Back to index

glibc  2.9
user.h
Go to the documentation of this file.
00001 /* Copyright (C) 2002 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 #include <features.h>
00023 #include <sys/types.h>
00024 
00025 /* This definition comes directly from the kernel headers.  If
00026    anything changes in them this header has to be changed, too.  */
00027 
00028 
00029 /* The definition in the kernel has the comment "XXX fix me".  */
00030 #define EF_SIZE             3072
00031 
00032 
00033 struct user
00034 {
00035   unsigned long int regs[EF_SIZE / 8 + 32];      /* Integer and fp regs.  */
00036   size_t u_tsize;                         /* Text size (pages).  */
00037   size_t u_dsize;                         /* Data size (pages).  */
00038   size_t u_ssize;                         /* Stack size (pages).  */
00039   unsigned long int start_code;                  /* Text starting address.  */
00040   unsigned long int start_data;                  /* Data starting address.  */
00041   unsigned long int start_stack;          /* Stack starting address.  */
00042   long int signal;                        /* Signal causing core dump. */
00043   struct regs *u_ar0;                            /* Help gdb find registers.  */
00044   unsigned long int magic;                /* Identifies a core file.  */
00045   char u_comm[32];                        /* User command name.  */
00046 };
00047 
00048 #define NBPG                PAGE_SIZE
00049 #define UPAGES                     1
00050 #define HOST_TEXT_START_ADDR       (u.start_code)
00051 #define HOST_DATA_START_ADDR       (u.start_data)
00052 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
00053 
00054 #endif /* sys/user.h */