1 /* Copyright (C) 1998, 2000 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 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. 8 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. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library; if not, see 16 <http://www.gnu.org/licenses/>. */ 17 18 #ifndef _SYS_USER_H 19 #define _SYS_USER_H 1 20 21 /* The whole purpose of this file is for GDB and GDB only. Don't read 22 too much into it. Don't use it for anything other than GDB unless 23 you know what you are doing. */ 24 25 struct user_fpregs_struct 26 { 27 long int cwd; 28 long int swd; 29 long int twd; 30 long int fip; 31 long int fcs; 32 long int foo; 33 long int fos; 34 long int st_space [20]; 35 }; 36 37 struct user_regs_struct 38 { 39 unsigned int gpr[32]; 40 unsigned int pc; 41 unsigned int msr; 42 unsigned int ear; 43 unsigned int esr; 44 unsigned int fsr; 45 unsigned int btr; 46 unsigned int pvr[12]; 47 }; 48 49 struct user 50 { 51 struct user_regs_struct regs; 52 int u_fpvalid; 53 struct user_fpregs_struct i387; 54 unsigned long int u_tsize; 55 unsigned long int u_dsize; 56 unsigned long int u_ssize; 57 unsigned long start_code; 58 unsigned long start_stack; 59 long int signal; 60 int reserved; 61 struct user_regs_struct* u_ar0; 62 struct user_fpregs_struct* u_fpstate; 63 unsigned long int magic; 64 char u_comm [32]; 65 int u_debugreg [8]; 66 }; 67 68 #define PAGE_SHIFT 12 69 #define PAGE_SIZE (1UL << PAGE_SHIFT) 70 #define PAGE_MASK (~(PAGE_SIZE-1)) 71 #define NBPG PAGE_SIZE 72 #define UPAGES 1 73 #define HOST_TEXT_START_ADDR (u.start_code) 74 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 75 76 #endif /* _SYS_USER_H */ 77