Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_USER32_H
0003 #define _ASM_X86_USER32_H
0004 
0005 /* IA32 compatible user structures for ptrace.
0006  * These should be used for 32bit coredumps too. */
0007 
0008 struct user_i387_ia32_struct {
0009     u32 cwd;
0010     u32 swd;
0011     u32 twd;
0012     u32 fip;
0013     u32 fcs;
0014     u32 foo;
0015     u32 fos;
0016     u32 st_space[20];   /* 8*10 bytes for each FP-reg = 80 bytes */
0017 };
0018 
0019 /* FSAVE frame with extensions */
0020 struct user32_fxsr_struct {
0021     unsigned short  cwd;
0022     unsigned short  swd;
0023     unsigned short  twd;    /* not compatible to 64bit twd */
0024     unsigned short  fop;
0025     int fip;
0026     int fcs;
0027     int foo;
0028     int fos;
0029     int mxcsr;
0030     int reserved;
0031     int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
0032     int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
0033     int padding[56];
0034 };
0035 
0036 struct user_regs_struct32 {
0037     __u32 ebx, ecx, edx, esi, edi, ebp, eax;
0038     unsigned short ds, __ds, es, __es;
0039     unsigned short fs, __fs, gs, __gs;
0040     __u32 orig_eax, eip;
0041     unsigned short cs, __cs;
0042     __u32 eflags, esp;
0043     unsigned short ss, __ss;
0044 };
0045 
0046 struct user32 {
0047   struct user_regs_struct32 regs; /* Where the registers are actually stored */
0048   int u_fpvalid;        /* True if math co-processor being used. */
0049                 /* for this mess. Not yet used. */
0050   struct user_i387_ia32_struct i387;    /* Math Co-processor registers. */
0051 /* The rest of this junk is to help gdb figure out what goes where */
0052   __u32 u_tsize;    /* Text segment size (pages). */
0053   __u32 u_dsize;    /* Data segment size (pages). */
0054   __u32 u_ssize;    /* Stack segment size (pages). */
0055   __u32 start_code;     /* Starting virtual address of text. */
0056   __u32 start_stack;    /* Starting virtual address of stack area.
0057                    This is actually the bottom of the stack,
0058                    the top of the stack is always found in the
0059                    esp register.  */
0060   __u32 signal;             /* Signal that caused the core dump. */
0061   int reserved;         /* No __u32er used */
0062   __u32 u_ar0;  /* Used by gdb to help find the values for */
0063                 /* the registers. */
0064   __u32 u_fpstate;  /* Math Co-processor pointer. */
0065   __u32 magic;      /* To uniquely identify a core file */
0066   char u_comm[32];      /* User command that was responsible */
0067   int u_debugreg[8];
0068 };
0069 
0070 
0071 #endif /* _ASM_X86_USER32_H */