sigcontext.h
001:
002:
003:
004:
005:
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016:
017:
018:
019: #ifndef _BITS_SIGCONTEXT_H
020: #define _BITS_SIGCONTEXT_H 1
021:
022: #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
023: # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
024: #endif
025:
026: #include <bits/wordsize.h>
027:
028: struct _fpreg
029: {
030: unsigned short significand[4];
031: unsigned short exponent;
032: };
033:
034: struct _fpxreg
035: {
036: unsigned short significand[4];
037: unsigned short exponent;
038: unsigned short padding[3];
039: };
040:
041: struct _xmmreg
042: {
043: __uint32_t element[4];
044: };
045:
046:
047:
048: #if __WORDSIZE == 32
049:
050: struct _fpstate
051: {
052:
053: __uint32_t cw;
054: __uint32_t sw;
055: __uint32_t tag;
056: __uint32_t ipoff;
057: __uint32_t cssel;
058: __uint32_t dataoff;
059: __uint32_t datasel;
060: struct _fpreg _st[8];
061: unsigned short status;
062: unsigned short magic;
063:
064:
065: __uint32_t _fxsr_env[6];
066: __uint32_t mxcsr;
067: __uint32_t reserved;
068: struct _fpxreg _fxsr_st[8];
069: struct _xmmreg _xmm[8];
070: __uint32_t padding[56];
071: };
072:
073: #ifndef sigcontext_struct
074:
075:
076:
077:
078: # define sigcontext_struct sigcontext
079: #endif
080:
081: struct sigcontext
082: {
083: unsigned short gs, __gsh;
084: unsigned short fs, __fsh;
085: unsigned short es, __esh;
086: unsigned short ds, __dsh;
087: unsigned long edi;
088: unsigned long esi;
089: unsigned long ebp;
090: unsigned long esp;
091: unsigned long ebx;
092: unsigned long edx;
093: unsigned long ecx;
094: unsigned long eax;
095: unsigned long trapno;
096: unsigned long err;
097: unsigned long eip;
098: unsigned short cs, __csh;
099: unsigned long eflags;
100: unsigned long esp_at_signal;
101: unsigned short ss, __ssh;
102: struct _fpstate * fpstate;
103: unsigned long oldmask;
104: unsigned long cr2;
105: };
106:
107: #else
108:
109: struct _fpstate
110: {
111:
112: __uint16_t cwd;
113: __uint16_t swd;
114: __uint16_t ftw;
115: __uint16_t fop;
116: __uint64_t rip;
117: __uint64_t rdp;
118: __uint32_t mxcsr;
119: __uint32_t mxcr_mask;
120: struct _fpxreg _st[8];
121: struct _xmmreg _xmm[16];
122: __uint32_t padding[24];
123: };
124:
125: struct sigcontext
126: {
127: unsigned long r8;
128: unsigned long r9;
129: unsigned long r10;
130: unsigned long r11;
131: unsigned long r12;
132: unsigned long r13;
133: unsigned long r14;
134: unsigned long r15;
135: unsigned long rdi;
136: unsigned long rsi;
137: unsigned long rbp;
138: unsigned long rbx;
139: unsigned long rdx;
140: unsigned long rax;
141: unsigned long rcx;
142: unsigned long rsp;
143: unsigned long rip;
144: unsigned long eflags;
145: unsigned short cs;
146: unsigned short gs;
147: unsigned short fs;
148: unsigned short __pad0;
149: unsigned long err;
150: unsigned long trapno;
151: unsigned long oldmask;
152: unsigned long cr2;
153: struct _fpstate * fpstate;
154: unsigned long __reserved1 [8];
155: };
156:
157: #endif
158:
159: #endif
160:
© Andrew Scott 2006 -
2025,
All Rights Reserved