Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


user.h
001: /* Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: #ifndef _SYS_USER_H
020: #define _SYS_USER_H     1
021: 
022: /* The whole purpose of this file is for GDB and GDB only.  Don't read
023:    too much into it.  Don't use it for anything other than GDB unless
024:    you know what you are doing.  */
025: 
026: #include <bits/wordsize.h>
027: #include <unistd.h>
028: 
029: #if __WORDSIZE == 64
030: 
031: struct user_fpregs_struct
032: {
033:   unsigned short int    cwd;
034:   unsigned short int    swd;
035:   unsigned short int    ftw;
036:   unsigned short int    fop;
037:   unsigned long int     rip;
038:   unsigned long int     rdp;
039:   unsigned int          mxcsr;
040:   unsigned int          mxcr_mask;
041:   unsigned int          st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
042:   unsigned int          xmm_space[64];  /* 16*16 bytes for each XMM-reg = 256 bytes */
043:   unsigned int          padding[24];
044: };
045: 
046: struct user_regs_struct
047: {
048:   unsigned long int r15;
049:   unsigned long int r14;
050:   unsigned long int r13;
051:   unsigned long int r12;
052:   unsigned long int rbp;
053:   unsigned long int rbx;
054:   unsigned long int r11;
055:   unsigned long int r10;
056:   unsigned long int r9;
057:   unsigned long int r8;
058:   unsigned long int rax;
059:   unsigned long int rcx;
060:   unsigned long int rdx;
061:   unsigned long int rsi;
062:   unsigned long int rdi;
063:   unsigned long int orig_rax;
064:   unsigned long int rip;
065:   unsigned long int cs;
066:   unsigned long int eflags;
067:   unsigned long int rsp;
068:   unsigned long int ss;
069:   unsigned long int fs_base;
070:   unsigned long int gs_base;
071:   unsigned long int ds;
072:   unsigned long int es;
073:   unsigned long int fs;
074:   unsigned long int gs;
075: };
076: 
077: struct user
078: {
079:   struct user_regs_struct       regs;
080:   int                           u_fpvalid;
081:   struct user_fpregs_struct     i387;
082:   unsigned long int             u_tsize;
083:   unsigned long int             u_dsize;
084:   unsigned long int             u_ssize;
085:   unsigned long int             start_code;
086:   unsigned long int             start_stack;
087:   long int                      signal;
088:   int                           reserved;
089:   struct user_regs_struct*      u_ar0;
090:   struct user_fpregs_struct*    u_fpstate;
091:   unsigned long int             magic;
092:   char                          u_comm [32];
093:   unsigned long int             u_debugreg [8];
094: };
095: 
096: #else
097: /* These are the 32-bit x86 structures.  */
098: struct user_fpregs_struct
099: {
100:   long int cwd;
101:   long int swd;
102:   long int twd;
103:   long int fip;
104:   long int fcs;
105:   long int foo;
106:   long int fos;
107:   long int st_space [20];
108: };
109: 
110: struct user_fpxregs_struct
111: {
112:   unsigned short int cwd;
113:   unsigned short int swd;
114:   unsigned short int twd;
115:   unsigned short int fop;
116:   long int fip;
117:   long int fcs;
118:   long int foo;
119:   long int fos;
120:   long int mxcsr;
121:   long int reserved;
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];
125: };
126: 
127: struct user_regs_struct
128: {
129:   long int ebx;
130:   long int ecx;
131:   long int edx;
132:   long int esi;
133:   long int edi;
134:   long int ebp;
135:   long int eax;
136:   long int xds;
137:   long int xes;
138:   long int xfs;
139:   long int xgs;
140:   long int orig_eax;
141:   long int eip;
142:   long int xcs;
143:   long int eflags;
144:   long int esp;
145:   long int xss;
146: };
147: 
148: struct user
149: {
150:   struct user_regs_struct       regs;
151:   int                           u_fpvalid;
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 int             start_code;
157:   unsigned long int             start_stack;
158:   long int                      signal;
159:   int                           reserved;
160:   struct user_regs_struct*      u_ar0;
161:   struct user_fpregs_struct*    u_fpstate;
162:   unsigned long int             magic;
163:   char                          u_comm [32];
164:   int                           u_debugreg [8];
165: };
166: #endif  /* __WORDSIZE */
167: 
168: #define PAGE_SIZE               (sysconf(_SC_PAGESIZE))
169: #define PAGE_MASK               (~(PAGE_SIZE-1))
170: #define NBPG                    PAGE_SIZE
171: #define UPAGES                  1
172: #define HOST_TEXT_START_ADDR    (u.start_code)
173: #define HOST_STACK_END_ADDR     (u.start_stack + u.u_ssize * NBPG)
174: 
175: #endif  /* _SYS_USER_H */
176: 


for client 18.223.107.149
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/