ReactOS 0.4.16-dev-1521-gb8f1da6
pseh3.h File Reference
#include <excpt.h>
Include dependency graph for pseh3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _SEH3$_SCOPE_TABLE
 
struct  _SEH3$_EXCEPTION_POINTERS
 
struct  _SEH3$_REGISTRATION_FRAME
 
struct  __SEH3$FILTER_RESULT
 

Macros

#define _PSEH3_H_
 
#define _SEH3   $_except_handler _SEH3$_C_except_handler
 
#define _SEH3   $_AutoCleanup _SEH3$_C_AutoCleanup
 
#define _SEH3   $_AUTO_CLEANUP __attribute__((cleanup(_SEH3$_AutoCleanup)))
 
#define _SEH3   $_EnforceFramePointer() asm volatile ("#\n" : : "m"(*(char*)__builtin_alloca(0)) : "%esp", "memory")
 
#define _SEH3   $_ASM_GOTO(...) asm goto ("#\n" : : : "memory" : __VA_ARGS__)
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3   $_FINALLY(_Finally) (_Finally)
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3
 
#define _SEH3_TRY
 
#define _SEH3_EXCEPT(...)
 
#define _SEH3_FINALLY
 
#define _SEH3_END
 
#define _SEH3_LEAVE   goto _SEH3$_l_Leave
 
#define _SEH3_VOLATILE   volatile
 

Typedefs

typedef struct _SEH3$_SCOPE_TABLE SEH3$_SCOPE_TABLE
 
typedef struct _SEH3$_SCOPE_TABLEPSEH3$_SCOPE_TABLE
 
typedef struct _SEH3$_EXCEPTION_POINTERS SEH3$_EXCEPTION_POINTERS
 
typedef struct _SEH3$_EXCEPTION_POINTERSPSEH3$_EXCEPTION_POINTERS
 
typedef struct _SEH3$_REGISTRATION_FRAME SEH3$_REGISTRATION_FRAME
 
typedef struct _SEH3$_REGISTRATION_FRAMEPSEH3$_REGISTRATION_FRAME
 
typedef struct __SEH3$FILTER_RESULT _SEH3$FILTER_RESULT
 

Enumerations

enum  { _SEH3$_TryLevel = -1 }
 

Functions

int __cdecl _SEH3$_except_handler (struct _EXCEPTION_RECORD *ExceptionRecord, PSEH3$_REGISTRATION_FRAME EstablisherFrame, struct _CONTEXT *ContextRecord, void *DispatcherContext)
 
static __attribute__ ((always_inline)) __attribute__((returns_twice)) void _SEH3$_PreventInlining()
 
 __attribute__ ((always_inline, gnu_inline)) void _SEH3$_UnregisterFrame(volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame)
 
int __cdecl __attribute__ ((error("Can only be used inside a __finally block."))) _abnormal_termination(void)
 
unsigned long __cdecl __attribute__ ((error("Can only be used inside an exception filter or __except block."))) _exception_code(void)
 
void *__cdecl __attribute__ ((error("Can only be used inside an exception filter."))) _exception_info(void)
 
int __attribute__ ((regparm(3))) __attribute__((returns_twice)) _SEH3$_RegisterFrameWithNonVolatiles(volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame
 

Variables

int const SEH3$_SCOPE_TABLEScopeTable
 
int const SEH3$_SCOPE_TABLE voidAllocaFrame
 

Macro Definition Documentation

◆ _PSEH3_H_

#define _PSEH3_H_

Definition at line 11 of file pseh3.h.

◆ _SEH3 [1/19]

#define _SEH3   $_except_handler _SEH3$_C_except_handler

Definition at line 342 of file pseh3.h.

◆ _SEH3 [2/19]

#define _SEH3   $_AutoCleanup _SEH3$_C_AutoCleanup

Definition at line 342 of file pseh3.h.

◆ _SEH3 [3/19]

#define _SEH3   $_AUTO_CLEANUP __attribute__((cleanup(_SEH3$_AutoCleanup)))

Definition at line 342 of file pseh3.h.

◆ _SEH3 [4/19]

#define _SEH3   $_EnforceFramePointer() asm volatile ("#\n" : : "m"(*(char*)__builtin_alloca(0)) : "%esp", "memory")

Definition at line 342 of file pseh3.h.

◆ _SEH3 [5/19]

#define _SEH3   $_ASM_GOTO(...) asm goto ("#\n" : : : "memory" : __VA_ARGS__)

Definition at line 342 of file pseh3.h.

◆ _SEH3 [6/19]

#define _SEH3
Value:
$_CALL_WRAPPER(_Function, _TrylevelFrame, _DataTable) \
asm goto ("leal %0, %%eax\n\t" \
"leal %1, %%edx\n\t" \
"call " #_Function \
: \
: "m" (*(_TrylevelFrame)), "m" (*(_DataTable)), "p" (_SEH3$_RegisterFrameWithNonVolatiles) \
: "eax", "edx", "ecx", "memory" \
: _SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException, _SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally)

Definition at line 342 of file pseh3.h.

◆ _SEH3 [7/19]

#define _SEH3
Value:
$_RegisterFrame_(_TrylevelFrame, _DataTable) \
do { \
(_TrylevelFrame)->Handler = (void*)_SEH3$_except_handler; \
(_TrylevelFrame)->TryLevel = 0; \
_SEH3$_CALL_WRAPPER(__SEH3$_RegisterFrame, _TrylevelFrame, _DataTable); \
} while (0)
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
int __cdecl _SEH3$_except_handler(struct _EXCEPTION_RECORD *ExceptionRecord, PSEH3$_REGISTRATION_FRAME EstablisherFrame, struct _CONTEXT *ContextRecord, void *DispatcherContext)

Definition at line 342 of file pseh3.h.

◆ _SEH3 [8/19]

#define _SEH3
Value:
$_RegisterTryLevel_(_TrylevelFrame, _DataTable) \
do { \
(_TrylevelFrame)->TryLevel = _SEH3$_TryLevel; \
_SEH3$_CALL_WRAPPER(__SEH3$_RegisterTryLevel, _TrylevelFrame, _DataTable); \
} while (0)
@ _SEH3$_TryLevel
Definition: pseh3.h:113

Definition at line 342 of file pseh3.h.

◆ _SEH3 [9/19]

#define _SEH3
Value:
$_SCARE_GCC() \
void *plabel; \
_SEH3$_ASM_GOTO(_SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException, _SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally); \
asm volatile ("#" : "=a"(plabel) : "p"(&&_SEH3$_l_BeforeTry), "p"(&&_SEH3$_l_HandlerTarget), "p"(&&_SEH3$_l_OnException), "p"(&&_SEH3$_l_FilterOrFinally) \
: "ebx", "ecx", "edx", "esi", "edi", "flags", "memory" ); \
goto _SEH3$_l_OnException;

Definition at line 342 of file pseh3.h.

◆ _SEH3 [10/19]

#define _SEH3
Value:
$_DECLARE_EXCEPT_INTRINSICS() \
inline __attribute__((always_inline, gnu_inline)) \
unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; }
#define __attribute__(x)
Definition: wpp_private.h:207
#define _exception_code()
Definition: pseh2_64.h:194

Definition at line 342 of file pseh3.h.

◆ _SEH3 [11/19]

#define _SEH3
Value:
$_DECLARE_FILTER_FUNC(_Name) \
#define __fastcall
Definition: sync.c:38
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510

Definition at line 342 of file pseh3.h.

◆ _SEH3 [12/19]

#define _SEH3
Value:
$_NESTED_FUNC_OPEN(_Name) \
{ \
/* This is a fancy way to get information about the frame layout */ \
if (Action == 0) { _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = (int)&_SEH3$_TrylevelFrame; return seh3$result; }
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Definition at line 342 of file pseh3.h.

◆ _SEH3 [13/19]

#define _SEH3
Value:
$_DEFINE_FILTER_FUNC(_Name, expression) \
_SEH3$_NESTED_FUNC_OPEN(_Name) \
/* Declare the intrinsics for exception filters */ \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wshadow\"") \
inline __attribute__((always_inline, gnu_inline)) \
unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; } \
inline __attribute__((always_inline, gnu_inline)) \
void * _exception_info() { return _SEH3$_TrylevelFrame.ExceptionPointers; } \
_Pragma("GCC diagnostic pop") \
\
/* Now handle the actual filter expression */ \
{ _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = (expression); return seh3$result; } \
}
#define _exception_info()
Definition: pseh2_64.h:193

Definition at line 342 of file pseh3.h.

◆ _SEH3 [14/19]

#define _SEH3
Value:
$_FINALLY_FUNC_OPEN(_Name) \
_SEH3$_NESTED_FUNC_OPEN(_Name) \
/* Declare the intrinsics for the finally function */ \
inline __attribute__((always_inline, gnu_inline)) \
int _abnormal_termination() { return (_SEH3$_TrylevelFrame.ExceptionPointers != 0); } \
\
/* This construct makes sure that the finally function returns */ \
/* a proper value at the end */ \
for (; ; (void)({ _SEH3$FILTER_RESULT seh3$result; seh3$result.Value = 0; return seh3$result; 0;}))
#define _abnormal_termination()
Definition: pseh2_64.h:195

Definition at line 342 of file pseh3.h.

◆ _SEH3 [15/19]

#define _SEH3
Value:
$_FILTER(_Filter, _FilterExpression) \
(__builtin_constant_p(_FilterExpression) ? (void*)(unsigned long)(unsigned char)(unsigned long)(_FilterExpression) : _Filter)
unsigned char
Definition: typeof.h:29

Definition at line 342 of file pseh3.h.

◆ _SEH3 [16/19]

#define _SEH3   $_FINALLY(_Finally) (_Finally)

Definition at line 342 of file pseh3.h.

◆ _SEH3 [17/19]

#define _SEH3
Value:
$_DEFINE_DUMMY_FINALLY(_Name) \
auto inline __attribute__((always_inline,gnu_inline)) int _Name(int Action) { (void)Action; return 0; }

Definition at line 342 of file pseh3.h.

◆ _SEH3 [18/19]

#define _SEH3
Value:
$_DECLARE_CLEANUP_FUNC(_Name) \
auto inline __attribute__((always_inline,gnu_inline)) void _Name(volatile SEH3$_REGISTRATION_FRAME *p)
GLfloat GLfloat p
Definition: glext.h:8902

Definition at line 342 of file pseh3.h.

◆ _SEH3 [19/19]

#define _SEH3
Value:
$_DEFINE_CLEANUP_FUNC(_Name) \
_SEH3$_DECLARE_CLEANUP_FUNC(_Name) \
{ \
(void)p; \
/* Unregister the frame */ \
if (_SEH3$_TryLevel == 0) _SEH3$_UnregisterFrame(&_SEH3$_TrylevelFrame); \
else _SEH3$_UnregisterTryLevel(&_SEH3$_TrylevelFrame); \
\
/* Invoke the finally function (an inline dummy in the __except case) */ \
_SEH3$_FinallyFunction(1); \
}
else
Definition: tritemp.h:161

Definition at line 342 of file pseh3.h.

◆ _SEH3_END

#define _SEH3_END
Value:
}; \
goto _SEH3$_l_EndTry; \
\
_SEH3$_l_OnException: (void)0; \
/* Force GCC to create proper code pathes */ \
_SEH3$_SCARE_GCC(); \
\
_SEH3$_l_EndTry:(void)0; \
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
\
/* Implementation of the auto cleanup function */ \
_SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
\
/* Close the outer scope */ \
}

Definition at line 477 of file pseh3.h.

◆ _SEH3_EXCEPT

#define _SEH3_EXCEPT (   ...)

Definition at line 398 of file pseh3.h.

◆ _SEH3_FINALLY

#define _SEH3_FINALLY

Definition at line 443 of file pseh3.h.

◆ _SEH3_LEAVE

#define _SEH3_LEAVE   goto _SEH3$_l_Leave

Definition at line 494 of file pseh3.h.

◆ _SEH3_TRY

#define _SEH3_TRY

Definition at line 358 of file pseh3.h.

◆ _SEH3_VOLATILE

#define _SEH3_VOLATILE   volatile

Definition at line 496 of file pseh3.h.

Typedef Documentation

◆ _SEH3$FILTER_RESULT

◆ PSEH3$_EXCEPTION_POINTERS

◆ PSEH3$_REGISTRATION_FRAME

◆ PSEH3$_SCOPE_TABLE

◆ SEH3$_EXCEPTION_POINTERS

◆ SEH3$_REGISTRATION_FRAME

◆ SEH3$_SCOPE_TABLE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
_SEH3$_TryLevel 

Definition at line 111 of file pseh3.h.

112{
113 _SEH3$_TryLevel = -1,
114};

Function Documentation

◆ __attribute__() [1/6]

static __attribute__ ( (always_inline)  )
inlinestatic

Definition at line 90 of file pseh3.h.

90{}

◆ __attribute__() [2/6]

__attribute__ ( (always_inline, gnu_inline)  ) volatile
inline

Definition at line 93 of file pseh3.h.

95{
96 asm volatile ("movl %k[NewHead], %%fs:0"
97 : : [NewHead] "ir" (RegistrationFrame->Next) : "memory");
98}

◆ __attribute__() [3/6]

int __cdecl __attribute__ ( (error("Can only be used inside a __finally block."))  )

◆ __attribute__() [4/6]

unsigned long __cdecl __attribute__ ( (error("Can only be used inside an exception filter or __except block."))  )

◆ __attribute__() [5/6]

void *__cdecl __attribute__ ( (error("Can only be used inside an exception filter."))  )

◆ __attribute__() [6/6]

int __attribute__ ( (regparm(3))  ) volatile

◆ _SEH3$_except_handler()

int __cdecl _SEH3$_except_handler ( struct _EXCEPTION_RECORD ExceptionRecord,
PSEH3$_REGISTRATION_FRAME  EstablisherFrame,
struct _CONTEXT ContextRecord,
void DispatcherContext 
)

Variable Documentation

◆ AllocaFrame

Definition at line 132 of file pseh3.h.

◆ ScopeTable

int const SEH3$_SCOPE_TABLE * ScopeTable

Definition at line 131 of file pseh3.h.

Referenced by __C_specific_handler().