ReactOS 0.4.16-dev-1946-g52006dd
pseh3.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GNU GPL - See COPYING in the top level directory
4 * PURPOSE: Header for PSEH3
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8/* For additional information see pseh3.c in the related library. */
9
10#pragma once
11#define _PSEH3_H_
12
13#include <excpt.h>
14#include <intrin.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/* CLANG must safe non-volatiles, because it uses a return-twice algorithm */
21#if defined(__clang__) && !defined(_SEH3$_FRAME_ALL_NONVOLATILES)
22#define _SEH3$_FRAME_ALL_NONVOLATILES 1
23#endif
24
25typedef struct _SEH3$_SCOPE_TABLE
26{
27 unsigned long EnclosingLevel;
28 void *Filter;
29 void *Target;
31
33{
37
39{
40 /* First the Windows base record. Don't move this! */
42 void *Handler;
43
44 /* Pointer to the static scope table */
46
47 /* Index into ScopeTable array */
48 unsigned long TryLevel;
49
50 /* Points to the end of the internal registration chain */
52
53 /* Except handler stores pointer to exception pointers here */
55
56 /* Registers that we need to save */
57 unsigned long Esp;
58 unsigned long Ebp;
59
60 /* Except handler stores the exception code here */
61 unsigned long ExceptionCode;
62
64#ifdef _SEH3$_FRAME_ALL_NONVOLATILES
65 unsigned long Ebx;
66 unsigned long Esi;
67 unsigned long Edi;
68#endif
69#ifdef __clang__
70 void *ReturnAddress;
71#endif
73
74#if defined(__cplusplus)
75 #define _SEH3$_except_handler _SEH3$_CPP_except_handler
76 #define _SEH3$_AutoCleanup _SEH3$_CPP_AutoCleanup
77#else
78 #define _SEH3$_except_handler _SEH3$_C_except_handler
79 #define _SEH3$_AutoCleanup _SEH3$_C_AutoCleanup
80#endif
81
82int
85 struct _EXCEPTION_RECORD * ExceptionRecord,
87 struct _CONTEXT * ContextRecord,
88 void * DispatcherContext);
89
90/* Prevent gcc from inlining functions that use SEH. */
91static inline __attribute__((always_inline)) __attribute__((returns_twice)) void _SEH3$_PreventInlining() {}
92
93/* Unregister the root frame */
94extern inline __attribute__((always_inline,gnu_inline))
95void _SEH3$_UnregisterFrame(volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame)
96{
97 asm volatile ("movl %k[NewHead], %%fs:0"
98 : : [NewHead] "ir" (RegistrationFrame->Next) : "memory");
99}
100
101/* Unregister a trylevel frame */
102extern inline __attribute__((always_inline,gnu_inline))
103void _SEH3$_UnregisterTryLevel(
104 volatile SEH3$_REGISTRATION_FRAME *TrylevelFrame)
105{
106 volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame;
107 asm volatile ("movl %%fs:0, %k[RegistrationFrame]"
108 : [RegistrationFrame] "=r" (RegistrationFrame) : );
109 RegistrationFrame->EndOfChain = TrylevelFrame->Next;
110}
111
112enum
113{
116};
117
118#ifndef __clang__
119/* These are global dummy definitions, that get overwritten in the local context of __finally / __except blocks */
120int __cdecl __attribute__((error ("Can only be used inside a __finally block."))) _abnormal_termination(void);
121unsigned long __cdecl __attribute__((error("Can only be used inside an exception filter or __except block."))) _exception_code(void);
122void * __cdecl __attribute__((error("Can only be used inside an exception filter."))) _exception_info(void);
123#endif
124
125/* This attribute allows automatic cleanup of the registered frames */
126#define _SEH3$_AUTO_CLEANUP __attribute__((cleanup(_SEH3$_AutoCleanup)))
127
128int
129__attribute__((regparm(3)))
130__attribute__((returns_twice))
131_SEH3$_RegisterFrameWithNonVolatiles(
132 volatile SEH3$_REGISTRATION_FRAME* RegistrationFrame,
135
136int
137__attribute__((regparm(3)))
138__attribute__((returns_twice))
139_SEH3$_RegisterTryLevelWithNonVolatiles(
140 volatile SEH3$_REGISTRATION_FRAME* RegistrationFrame,
142 void* AllocaFrame);
143
144/* CLANG specific definitions! */
145#ifdef __clang__
146
147/* CLANG thinks it is smart and optimizes the alloca away if it is 0 and with it the use of a frame register */
148#define _SEH3$_EnforceFramePointer() asm volatile ("#\n" : : "m"(*(char*)__builtin_alloca(4)) : "%esp", "memory")
149
150/* CLANG doesn't have asm goto! */
151#define _SEH3$_ASM_GOTO(...)
152
153#define _SEH3$_RegisterFrame_(_TrylevelFrame, _DataTable) \
154 do { \
155 (_TrylevelFrame)->Handler = (void*)_SEH3$_except_handler; \
156 (_TrylevelFrame)->TryLevel = 0; \
157 int result = _SEH3$_RegisterFrameWithNonVolatiles(_TrylevelFrame, _DataTable, __builtin_alloca(0)); \
158 if (__builtin_expect(result != 0, 0)) \
159 { \
160 if (result == 1) goto _SEH3$_l_FilterOrFinally; \
161 if (result == 2) goto _SEH3$_l_HandlerTarget; \
162 goto _SEH3$_l_BeforeFilterOrFinally; \
163 } \
164 } while(0)
165
166#define _SEH3$_RegisterTryLevel_(_TrylevelFrame, _DataTable) \
167 do { \
168 (_TrylevelFrame)->TryLevel = _SEH3$_TryLevel; \
169 int result = _SEH3$_RegisterTryLevelWithNonVolatiles(_TrylevelFrame, _DataTable, __builtin_alloca(0)); \
170 if (__builtin_expect(result != 0, 0)) \
171 { \
172 if (result == 1) goto _SEH3$_l_FilterOrFinally; \
173 if (result == 2) goto _SEH3$_l_HandlerTarget; \
174 goto _SEH3$_l_BeforeFilterOrFinally; \
175 } \
176 } while(0)
177
178#define _SEH3$_SCARE_GCC()
179
180#else /* !__clang__ */
181
182/* This will make GCC use ebp, even if it was disabled by -fomit-frame-pointer */
183#define _SEH3$_EnforceFramePointer() asm volatile ("#\n" : : "m"(*(char*)__builtin_alloca(0)) : "%esp", "memory")
184
185#define _SEH3$_ASM_GOTO(...) asm goto ("#\n" : : : "memory" : __VA_ARGS__)
186
187#ifdef __cplusplus
188#define _SEH3$_CALL_WRAPPER(_Function, _TrylevelFrame, _DataTable) \
189 asm goto ("leal %0, %%eax\n\t" \
190 "leal %1, %%edx\n\t" \
191 "call " #_Function "WithStackLayout" \
192 : \
193 : "m" (*(_TrylevelFrame)), "m" (*(_DataTable)), "c" (__builtin_alloca(0)), "p" (_SEH3$_RegisterFrameWithNonVolatiles) \
194 : "eax", "edx", "memory" \
195 : _SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException, _SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally)
196
197#else
198#define _SEH3$_CALL_WRAPPER(_Function, _TrylevelFrame, _DataTable) \
199 asm goto ("leal %0, %%eax\n\t" \
200 "leal %1, %%edx\n\t" \
201 "call " #_Function \
202 : \
203 : "m" (*(_TrylevelFrame)), "m" (*(_DataTable)), "p" (_SEH3$_RegisterFrameWithNonVolatiles) \
204 : "eax", "edx", "ecx", "memory" \
205 : _SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException, _SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally)
206#endif
207
208/* This is an asm wrapper around _SEH3$_RegisterFrame */
209#define _SEH3$_RegisterFrame_(_TrylevelFrame, _DataTable) \
210 do { \
211 (_TrylevelFrame)->Handler = (void*)_SEH3$_except_handler; \
212 (_TrylevelFrame)->TryLevel = 0; \
213 _SEH3$_CALL_WRAPPER(__SEH3$_RegisterFrame, _TrylevelFrame, _DataTable); \
214 } while (0)
215
216/* This is an asm wrapper around _SEH3$_RegisterTryLevel */
217#define _SEH3$_RegisterTryLevel_(_TrylevelFrame, _DataTable) \
218 do { \
219 (_TrylevelFrame)->TryLevel = _SEH3$_TryLevel; \
220 _SEH3$_CALL_WRAPPER(__SEH3$_RegisterTryLevel, _TrylevelFrame, _DataTable); \
221 } while (0)
222
223/* This construct scares GCC so much, that it will stop moving code
224 around into places that are never executed. */
225#define _SEH3$_SCARE_GCC() \
226 void *plabel; \
227 _SEH3$_ASM_GOTO(_SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException, _SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally); \
228 asm volatile ("#" : "=a"(plabel) : "p"(&&_SEH3$_l_BeforeTry), "p"(&&_SEH3$_l_HandlerTarget), "p"(&&_SEH3$_l_OnException), "p"(&&_SEH3$_l_FilterOrFinally) \
229 : "ebx", "ecx", "edx", "esi", "edi", "flags", "memory" ); \
230 goto _SEH3$_l_OnException;
231
232#endif /* __clang__ */
233
234/* Neither CLANG nor C++ support nested functions */
235#if defined(__cplusplus) || defined(__clang__)
236
237/* Use the global unregister function */
238void
239__attribute__((regparm(1)))
240_SEH3$_AutoCleanup(
242
243/* These are only dummies here */
244#define _SEH3$_DECLARE_CLEANUP_FUNC(_Name)
245#define _SEH3$_DEFINE_CLEANUP_FUNC(_Name)
246#define _SEH3$_DECLARE_FILTER_FUNC(_Name)
247#define _SEH3$_DEFINE_DUMMY_FINALLY(_Name)
248
249/* On invocation, the AllocaFrame field is loaded with the return esp value */
250#define _SEH3$_NESTED_FUNC_RETURN(_Result) \
251 /* Restore esp and return to the caller */ \
252 asm volatile ("movl %[FixedEsp], %%esp\n\tret" \
253 : : "a" (_Result), [FixedEsp] "m" (_SEH3$_TrylevelFrame.AllocaFrame) : "ebx", "ecx", "edx", "esi", "edi", "flags", "memory")
254
255/* The filter "function" */
256#define _SEH3$_DEFINE_FILTER_FUNC(_Name, expression) \
257 { \
258 /* Evaluate and return the filter expression */ \
259 asm volatile ("#\n" : : : "eax", "ebx", "ecx", "edx", "esi", "edi", "flags", "memory"); \
260 _SEH3$_NESTED_FUNC_RETURN((expression)); \
261 }
262
263#define _SEH3$_FINALLY_FUNC_OPEN(_Name) \
264 { \
265 asm volatile ("#\n" : : : "eax", "ebx", "ecx", "edx", "esi", "edi", "flags", "memory"); \
266 /* This construct makes sure that the finally function returns */ \
267 /* a proper value at the end */ \
268 for (; ; (void)({_SEH3$_NESTED_FUNC_RETURN(0); 0;}))
269
270#define _SEH3$_FILTER(_Filter, _FilterExpression) (&&_SEH3$_l_FilterOrFinally)
271#define _SEH3$_FINALLY(_Finally) (&&_SEH3$_l_FilterOrFinally)
272
273#define _SEH3$_DECLARE_EXCEPT_INTRINSICS()
274
275/* Since we cannot use nested functions, we declare these globally as macros */
276#define _abnormal_termination() (_SEH3$_TrylevelFrame.ExceptionPointers != 0)
277#define _exception_code() (_SEH3$_TrylevelFrame.ExceptionCode)
278#define _exception_info() (_SEH3$_TrylevelFrame.ExceptionPointers)
279
280#else /* __cplusplus || __clang__ */
281
283{
284 int Value;
286
287#define _SEH3$_DECLARE_EXCEPT_INTRINSICS() \
288 inline __attribute__((always_inline, gnu_inline)) \
289 unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; }
290
291/* On GCC the filter function is a nested function with __fastcall calling
292 convention. The eax register contains a base address the function uses
293 to address the callers stack frame. __fastcall is chosen, because it gives
294 us an effective was of passing one argument to the function, that we need
295 to tell the function in a first pass to return informtion about the frame
296 base address. Since this is something GCC chooses arbitrarily, we call
297 the function with an arbitrary base address in eax first and then use the
298 result to calculate the correct address for a second call to the function. */
299#define _SEH3$_DECLARE_FILTER_FUNC(_Name) \
300 auto _SEH3$FILTER_RESULT __fastcall _Name(int Action)
301
302#define _SEH3$_NESTED_FUNC_OPEN(_Name) \
303 _SEH3$FILTER_RESULT __fastcall _Name(int Action) \
304 { \
305 /* This is a fancy way to get information about the frame layout */ \
306 if (Action == 0) { _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = (int)&_SEH3$_TrylevelFrame; return seh3$result; }
307
308#define _SEH3$_DEFINE_FILTER_FUNC(_Name, expression) \
309 _SEH3$_NESTED_FUNC_OPEN(_Name) \
310 /* Declare the intrinsics for exception filters */ \
311_Pragma("GCC diagnostic push") \
312_Pragma("GCC diagnostic ignored \"-Wshadow\"") \
313 inline __attribute__((always_inline, gnu_inline)) \
314 unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; } \
315 inline __attribute__((always_inline, gnu_inline)) \
316 void * _exception_info() { return _SEH3$_TrylevelFrame.ExceptionPointers; } \
317_Pragma("GCC diagnostic pop") \
318\
319 /* Now handle the actual filter expression */ \
320 { _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = (expression); return seh3$result; } \
321 }
322
323#define _SEH3$_FINALLY_FUNC_OPEN(_Name) \
324 _SEH3$_NESTED_FUNC_OPEN(_Name) \
325 /* Declare the intrinsics for the finally function */ \
326 inline __attribute__((always_inline, gnu_inline)) \
327 int _abnormal_termination() { return (_SEH3$_TrylevelFrame.ExceptionPointers != 0); } \
328\
329 /* This construct makes sure that the finally function returns */ \
330 /* a proper value at the end */ \
331 for (; ; (void)({ _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = 0; return seh3$result; 0;}))
332
333#define _SEH3$_FILTER(_Filter, _FilterExpression) \
334 (__builtin_constant_p(_FilterExpression) ? (void*)(unsigned long)(unsigned char)(unsigned long)(_FilterExpression) : _Filter)
335
336#define _SEH3$_FINALLY(_Finally) (_Finally)
337
338#define _SEH3$_DEFINE_DUMMY_FINALLY(_Name) \
339 auto inline __attribute__((always_inline,gnu_inline)) int _Name(int Action) { (void)Action; return 0; }
340
341#define _SEH3$_DECLARE_CLEANUP_FUNC(_Name) \
342 auto inline __attribute__((always_inline,gnu_inline)) void _Name(volatile SEH3$_REGISTRATION_FRAME *p)
343
344#define _SEH3$_DEFINE_CLEANUP_FUNC(_Name) \
345 _SEH3$_DECLARE_CLEANUP_FUNC(_Name) \
346 { \
347 (void)p; \
348 /* Unregister the frame */ \
349 if (_SEH3$_TryLevel == 0) _SEH3$_UnregisterFrame(&_SEH3$_TrylevelFrame); \
350 else _SEH3$_UnregisterTryLevel(&_SEH3$_TrylevelFrame); \
351\
352 /* Invoke the finally function (an inline dummy in the __except case) */ \
353 _SEH3$_FinallyFunction(1); \
354 }
355
356#endif /* __cplusplus || __clang__ */
357
358
359
360#define _SEH3_TRY \
361 _SEH3$_PreventInlining(); \
362 /* Enter the outer scope */ \
363 if (1) { \
364 /* Declare local labels */ \
365 __label__ _SEH3$_l_BeforeTry; \
366 __label__ _SEH3$_l_DoTry; \
367 __label__ _SEH3$_l_AfterTry; \
368 __label__ _SEH3$_l_EndTry; \
369 __label__ _SEH3$_l_HandlerTarget; \
370 __label__ _SEH3$_l_OnException; \
371 __label__ _SEH3$_l_BeforeFilterOrFinally; \
372 __label__ _SEH3$_l_FilterOrFinally; \
373 (void)&&_SEH3$_l_OnException; \
374 (void)&&_SEH3$_l_BeforeFilterOrFinally; \
375 (void)&&_SEH3$_l_FilterOrFinally; \
376\
377 /* Count the try level. Outside of any __try, _SEH3$_TryLevel is -1 */ \
378 enum { \
379 _SEH3$_PreviousTryLevel = _SEH3$_InnerTryLevel, \
380 _SEH3$_TryLevel = _SEH3$_PreviousTryLevel + 1, \
381 }; \
382\
383 /* Forward declaration of the auto cleanup function */ \
384 _SEH3$_DECLARE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
385\
386 /* Allocate a registration frame */ \
387 volatile SEH3$_REGISTRATION_FRAME _SEH3$_AUTO_CLEANUP _SEH3$_TrylevelFrame; \
388\
389 goto _SEH3$_l_BeforeTry; \
390 { \
391 __label__ _SEH3$_l_Leave; \
392\
393 enum { \
394 _SEH3$_InnerTryLevel = _SEH3$_TryLevel, \
395 }; \
396\
397 _SEH3$_l_Leave: (void)0; \
398 /* Silence warning */ goto _SEH3$_l_AfterTry; \
399 /* Silence warning */ goto _SEH3$_l_Leave; \
400\
401 _SEH3$_l_DoTry: \
402 if (1)
403
404
405#define _SEH3_EXCEPT(...) \
406 } \
407 /* End of the try block */ \
408 _SEH3$_l_AfterTry: (void)0; \
409 goto _SEH3$_l_EndTry; \
410\
411 _SEH3$_l_BeforeTry: (void)0; \
412 _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
413\
414 /* Forward declaration of the filter function */ \
415 _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \
416\
417 /* Create a static data table that contains the jump target and filter function */ \
418 static const SEH3$_SCOPE_TABLE __attribute__((section(".xdata$x"))) _SEH3$_ScopeTable = { (unsigned)(_SEH3$_TryLevel - 1), _SEH3$_FILTER(&_SEH3$_FilterFunction, (__VA_ARGS__)), &&_SEH3$_l_HandlerTarget }; \
419\
420 /* Register the registration record. */ \
421 if (_SEH3$_TryLevel == 0) _SEH3$_RegisterFrame_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \
422 else _SEH3$_RegisterTryLevel_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \
423\
424 /* Define an empty inline finally function */ \
425 _SEH3$_DEFINE_DUMMY_FINALLY(_SEH3$_FinallyFunction) \
426\
427 /* Allow intrinsics for __except to be used */ \
428 _SEH3$_DECLARE_EXCEPT_INTRINSICS(); \
429\
430 goto _SEH3$_l_DoTry; \
431\
432 _SEH3$_l_BeforeFilterOrFinally: (void)0; \
433 /* Make sure the filter function doesn't use esp */ \
434 _SEH3$_EnforceFramePointer(); \
435\
436 _SEH3$_l_FilterOrFinally: (void)0; \
437 /* Emit the filter function */ \
438 _SEH3$_DEFINE_FILTER_FUNC(_SEH3$_FilterFunction, (__VA_ARGS__)) \
439\
440 _SEH3$_l_HandlerTarget: (void)0; \
441 _SEH3$_EnforceFramePointer(); \
442\
443 if (1) \
444 { \
445 /* Prevent this block from being optimized away */ \
446 asm volatile ("#\n"); \
447 if (1)
448
449
450#define _SEH3_FINALLY \
451 } \
452 /* End of the try block */ \
453 _SEH3$_l_AfterTry: (void)0; \
454 /* Set ExceptionPointers to 0, this is used by _abnormal_termination() */ \
455 _SEH3$_TrylevelFrame.ExceptionPointers = 0; \
456\
457 goto _SEH3$_l_EndTry; \
458\
459 _SEH3$_l_BeforeTry: (void)0; \
460 _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
461\
462 /* Forward declaration of the finally function */ \
463 _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \
464\
465 /* Create a static data table that contains the finally function */ \
466 static const SEH3$_SCOPE_TABLE __attribute__((section(".xdata$x"))) _SEH3$_ScopeTable = { (unsigned)(_SEH3$_TryLevel - 1), _SEH3$_FINALLY(&_SEH3$_FinallyFunction), 0 }; \
467\
468 /* Register the registration record. */ \
469 if (_SEH3$_TryLevel == 0) _SEH3$_RegisterFrame_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \
470 else _SEH3$_RegisterTryLevel_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \
471 _SEH3$_TrylevelFrame.ExceptionPointers = (PSEH3$_EXCEPTION_POINTERS)1; \
472\
473 goto _SEH3$_l_DoTry; \
474\
475 _SEH3$_l_HandlerTarget: (void)0; \
476 _SEH3$_EnforceFramePointer(); \
477\
478 _SEH3$_l_BeforeFilterOrFinally: (void)0; \
479 _SEH3$_EnforceFramePointer(); \
480 _SEH3$_l_FilterOrFinally: (void)0; \
481 _SEH3$_FINALLY_FUNC_OPEN(_SEH3$_FinallyFunction)
482
483
484#define _SEH3_END \
485 }; \
486 goto _SEH3$_l_EndTry; \
487\
488 _SEH3$_l_OnException: (void)0; \
489 /* Force GCC to create proper code pathes */ \
490 _SEH3$_SCARE_GCC(); \
491\
492 _SEH3$_l_EndTry:(void)0; \
493 _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
494\
495 /* Implementation of the auto cleanup function */ \
496 _SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
497\
498 /* Close the outer scope */ \
499 }
500
501#define _SEH3_LEAVE goto _SEH3$_l_Leave
502
503#define _SEH3_VOLATILE volatile
504
505int _setjmp3(jmp_buf env, int count, ...);
506void __stdcall _SEH3$_longjmp_unwind(_JUMP_BUFFER* _Buf);
507
508#undef setjmp
509#define setjmp(env) \
510 _setjmp3(env, 2, (const void*)_SEH3$_longjmp_unwind, _SEH3$_TryLevel)
511
512#define _INC_SETJMPEX
513
514#ifdef __cplusplus
515}; // extern "C"
516#endif
#define __cdecl
Definition: accygwin.h:79
static int used
Definition: adh-main.c:39
static LPCWSTR LPCWSTR LPCWSTR env
Definition: db.cpp:171
#define __attribute__(x)
Definition: wpp_private.h:207
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
#define error(str)
Definition: mkdosfs.c:1605
_IRQL_requires_same_ _In_ PVOID EstablisherFrame
Definition: ntbasedef.h:665
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:666
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT _In_ PVOID DispatcherContext
Definition: ntbasedef.h:667
#define volatile
Definition: prototyp.h:117
#define _abnormal_termination()
Definition: pseh2_64.h:195
#define _exception_code()
Definition: pseh2_64.h:194
#define __except
Definition: pseh2_64.h:189
#define _exception_info()
Definition: pseh2_64.h:193
int __cdecl _SEH3$_except_handler(struct _EXCEPTION_RECORD *ExceptionRecord, PSEH3$_REGISTRATION_FRAME EstablisherFrame, struct _CONTEXT *ContextRecord, void *DispatcherContext)
struct _SEH3$_SCOPE_TABLE SEH3$_SCOPE_TABLE
struct _SEH3$_EXCEPTION_POINTERS SEH3$_EXCEPTION_POINTERS
int const SEH3$_SCOPE_TABLE void * AllocaFrame
Definition: pseh3.h:134
struct __SEH3$FILTER_RESULT _SEH3$FILTER_RESULT
struct _SEH3$_REGISTRATION_FRAME SEH3$_REGISTRATION_FRAME
int const SEH3$_SCOPE_TABLE * ScopeTable
Definition: pseh3.h:133
void __stdcall _SEH3$_longjmp_unwind(_JUMP_BUFFER *_Buf)
Definition: pseh3.c:453
int _setjmp3(jmp_buf env, int count,...)
struct _SEH3$_REGISTRATION_FRAME * PSEH3$_REGISTRATION_FRAME
struct _SEH3$_EXCEPTION_POINTERS * PSEH3$_EXCEPTION_POINTERS
@ _SEH3$_TryLevel
Definition: pseh3.h:114
@ _SEH3$_InnerTryLevel
Definition: pseh3.h:115
struct _SEH3$_SCOPE_TABLE * PSEH3$_SCOPE_TABLE
struct _CONTEXT * ContextRecord
Definition: pseh3.h:35
struct _EXCEPTION_RECORD * ExceptionRecord
Definition: pseh3.h:34
PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers
Definition: pseh3.h:54
unsigned long TryLevel
Definition: pseh3.h:48
unsigned long Ebp
Definition: pseh3.h:58
struct _SEH3$_REGISTRATION_FRAME * EndOfChain
Definition: pseh3.h:51
PSEH3$_SCOPE_TABLE ScopeTable
Definition: pseh3.h:45
unsigned long Esp
Definition: pseh3.h:57
unsigned long ExceptionCode
Definition: pseh3.h:61
struct _SEH3$_REGISTRATION_FRAME * Next
Definition: pseh3.h:41
unsigned long EnclosingLevel
Definition: pseh3.h:27
void * Target
Definition: pseh3.h:29
void * Filter
Definition: pseh3.h:28
#define __stdcall
Definition: typedefs.h:25
_JBTYPE jmp_buf[_JBLEN]
Definition: setjmp.h:188
static unsigned int block
Definition: xmlmemory.c:101
#define const
Definition: zconf.h:233