wok diff coreutils/stuff/sigcontext.h @ rev 9444
Add metasploit.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Apr 01 09:41:12 2011 +0000 (2011-04-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/coreutils/stuff/sigcontext.h Fri Apr 01 09:41:12 2011 +0000 1.3 @@ -0,0 +1,143 @@ 1.4 +#ifndef _ASM_X86_SIGCONTEXT_H 1.5 +#define _ASM_X86_SIGCONTEXT_H 1.6 + 1.7 +#include <asm/types.h> 1.8 + 1.9 +#ifdef __i386__ 1.10 +/* 1.11 + * As documented in the iBCS2 standard.. 1.12 + * 1.13 + * The first part of "struct _fpstate" is just the normal i387 1.14 + * hardware setup, the extra "status" word is used to save the 1.15 + * coprocessor status word before entering the handler. 1.16 + * 1.17 + * Pentium III FXSR, SSE support 1.18 + * Gareth Hughes <gareth@valinux.com>, May 2000 1.19 + * 1.20 + * The FPU state data structure has had to grow to accommodate the 1.21 + * extended FPU state required by the Streaming SIMD Extensions. 1.22 + * There is no documented standard to accomplish this at the moment. 1.23 + */ 1.24 +struct _fpreg { 1.25 + unsigned short significand[4]; 1.26 + unsigned short exponent; 1.27 +}; 1.28 + 1.29 +struct _fpxreg { 1.30 + unsigned short significand[4]; 1.31 + unsigned short exponent; 1.32 + unsigned short padding[3]; 1.33 +}; 1.34 + 1.35 +struct _xmmreg { 1.36 + unsigned long element[4]; 1.37 +}; 1.38 + 1.39 +struct _fpstate { 1.40 + /* Regular FPU environment */ 1.41 + unsigned long cw; 1.42 + unsigned long sw; 1.43 + unsigned long tag; 1.44 + unsigned long ipoff; 1.45 + unsigned long cssel; 1.46 + unsigned long dataoff; 1.47 + unsigned long datasel; 1.48 + struct _fpreg _st[8]; 1.49 + unsigned short status; 1.50 + unsigned short magic; /* 0xffff = regular FPU data only */ 1.51 + 1.52 + /* FXSR FPU environment */ 1.53 + unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ 1.54 + unsigned long mxcsr; 1.55 + unsigned long reserved; 1.56 + struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ 1.57 + struct _xmmreg _xmm[8]; 1.58 + unsigned long padding[56]; 1.59 +}; 1.60 + 1.61 +#define X86_FXSR_MAGIC 0x0000 1.62 + 1.63 +/* 1.64 + * User-space might still rely on the old definition: 1.65 + */ 1.66 +struct sigcontext { 1.67 + unsigned short gs, __gsh; 1.68 + unsigned short fs, __fsh; 1.69 + unsigned short es, __esh; 1.70 + unsigned short ds, __dsh; 1.71 + unsigned long edi; 1.72 + unsigned long esi; 1.73 + unsigned long ebp; 1.74 + unsigned long esp; 1.75 + unsigned long ebx; 1.76 + unsigned long edx; 1.77 + unsigned long ecx; 1.78 + unsigned long eax; 1.79 + unsigned long trapno; 1.80 + unsigned long err; 1.81 + unsigned long eip; 1.82 + unsigned short cs, __csh; 1.83 + unsigned long eflags; 1.84 + unsigned long esp_at_signal; 1.85 + unsigned short ss, __ssh; 1.86 + struct _fpstate * fpstate; 1.87 + unsigned long oldmask; 1.88 + unsigned long cr2; 1.89 +}; 1.90 + 1.91 +#else /* __i386__ */ 1.92 + 1.93 +/* FXSAVE frame */ 1.94 +/* Note: reserved1/2 may someday contain valuable data. Always save/restore 1.95 + them when you change signal frames. */ 1.96 +struct _fpstate { 1.97 + __u16 cwd; 1.98 + __u16 swd; 1.99 + __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */ 1.100 + __u16 fop; 1.101 + __u64 rip; 1.102 + __u64 rdp; 1.103 + __u32 mxcsr; 1.104 + __u32 mxcsr_mask; 1.105 + __u32 st_space[32]; /* 8*16 bytes for each FP-reg */ 1.106 + __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */ 1.107 + __u32 reserved2[24]; 1.108 +}; 1.109 + 1.110 +/* 1.111 + * User-space might still rely on the old definition: 1.112 + */ 1.113 +struct sigcontext { 1.114 + unsigned long r8; 1.115 + unsigned long r9; 1.116 + unsigned long r10; 1.117 + unsigned long r11; 1.118 + unsigned long r12; 1.119 + unsigned long r13; 1.120 + unsigned long r14; 1.121 + unsigned long r15; 1.122 + unsigned long rdi; 1.123 + unsigned long rsi; 1.124 + unsigned long rbp; 1.125 + unsigned long rbx; 1.126 + unsigned long rdx; 1.127 + unsigned long rax; 1.128 + unsigned long rcx; 1.129 + unsigned long rsp; 1.130 + unsigned long rip; 1.131 + unsigned long eflags; /* RFLAGS */ 1.132 + unsigned short cs; 1.133 + unsigned short gs; 1.134 + unsigned short fs; 1.135 + unsigned short __pad0; 1.136 + unsigned long err; 1.137 + unsigned long trapno; 1.138 + unsigned long oldmask; 1.139 + unsigned long cr2; 1.140 + struct _fpstate *fpstate; /* zero when no FPU context */ 1.141 + unsigned long reserved1[8]; 1.142 +}; 1.143 + 1.144 +#endif /* !__i386__ */ 1.145 + 1.146 +#endif