ReactOS  0.4.14-dev-608-gd495a4f
exception.h File Reference
#include <setjmp.h>
#include <intrin.h>
#include <pseh/pseh2.h>
#include <pseh/excpt.h>
Include dependency graph for exception.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _EXCEPTION_REGISTRATION_RECORD
 

Macros

#define EH_NONCONTINUABLE   0x01
 
#define EH_UNWINDING   0x02
 
#define EH_EXIT_UNWIND   0x04
 
#define EH_STACK_INVALID   0x08
 
#define EH_NESTED_CALL   0x10
 
#define EXCEPTION_WINE_STUB   0x80000100
 
#define EXCEPTION_WINE_ASSERTION   0x80000101
 
#define EXCEPTION_VM86_INTx   0x80000110
 
#define EXCEPTION_VM86_STI   0x80000111
 
#define EXCEPTION_VM86_PICRETURN   0x80000112
 
#define __TRY   _SEH2_TRY
 
#define __EXCEPT(func)   _SEH2_EXCEPT(func(_SEH2_GetExceptionInformation()))
 
#define __EXCEPT_PAGE_FAULT   _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION)
 
#define __EXCEPT_ALL   _SEH2_EXCEPT(_SEH_EXECUTE_HANDLER)
 
#define __ENDTRY   _SEH2_END
 
#define __FINALLY(func)   _SEH2_FINALLY { func(!_SEH2_AbnormalTermination()); }
 
#define __FINALLY_CTX(func, ctx)   _SEH2_FINALLY { func(!_SEH2_AbnormalTermination(), ctx); }; _SEH2_END
 
#define GetExceptionCode()   _SEH2_GetExceptionCode()
 
#define GetExceptionInformation()   _SEH2_GetExceptionInformation()
 
#define AbnormalTermination()   _SEH2_AbnormalTermination()
 

Typedefs

typedef DWORD(* PEXCEPTION_HANDLER) (struct _EXCEPTION_RECORD *, struct _EXCEPTION_REGISTRATION_RECORD *, struct _CONTEXT *, struct _EXCEPTION_REGISTRATION_RECORD **)
 
typedef struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD
 
typedef struct _EXCEPTION_REGISTRATION_RECORDPEXCEPTION_REGISTRATION_RECORD
 

Functions

static EXCEPTION_REGISTRATION_RECORD__wine_push_frame (EXCEPTION_REGISTRATION_RECORD *frame)
 
static EXCEPTION_REGISTRATION_RECORD__wine_pop_frame (EXCEPTION_REGISTRATION_RECORD *frame)
 
void __wine_enter_vm86 (CONTEXT *context)
 

Macro Definition Documentation

◆ __ENDTRY

#define __ENDTRY   _SEH2_END

Definition at line 61 of file exception.h.

◆ __EXCEPT

Definition at line 58 of file exception.h.

◆ __EXCEPT_ALL

Definition at line 60 of file exception.h.

◆ __EXCEPT_PAGE_FAULT

Definition at line 59 of file exception.h.

◆ __FINALLY

#define __FINALLY (   func)    _SEH2_FINALLY { func(!_SEH2_AbnormalTermination()); }

Definition at line 62 of file exception.h.

◆ __FINALLY_CTX

#define __FINALLY_CTX (   func,
  ctx 
)    _SEH2_FINALLY { func(!_SEH2_AbnormalTermination(), ctx); }; _SEH2_END

Definition at line 63 of file exception.h.

◆ __TRY

#define __TRY   _SEH2_TRY

Definition at line 57 of file exception.h.

◆ AbnormalTermination

#define AbnormalTermination ( )    _SEH2_AbnormalTermination()

Definition at line 74 of file exception.h.

◆ EH_EXIT_UNWIND

#define EH_EXIT_UNWIND   0x04

Definition at line 16 of file exception.h.

◆ EH_NESTED_CALL

#define EH_NESTED_CALL   0x10

Definition at line 18 of file exception.h.

◆ EH_NONCONTINUABLE

#define EH_NONCONTINUABLE   0x01

Definition at line 14 of file exception.h.

◆ EH_STACK_INVALID

#define EH_STACK_INVALID   0x08

Definition at line 17 of file exception.h.

◆ EH_UNWINDING

#define EH_UNWINDING   0x02

Definition at line 15 of file exception.h.

◆ EXCEPTION_VM86_INTx

#define EXCEPTION_VM86_INTx   0x80000110

Definition at line 23 of file exception.h.

◆ EXCEPTION_VM86_PICRETURN

#define EXCEPTION_VM86_PICRETURN   0x80000112

Definition at line 25 of file exception.h.

◆ EXCEPTION_VM86_STI

#define EXCEPTION_VM86_STI   0x80000111

Definition at line 24 of file exception.h.

◆ EXCEPTION_WINE_ASSERTION

#define EXCEPTION_WINE_ASSERTION   0x80000101

Definition at line 21 of file exception.h.

◆ EXCEPTION_WINE_STUB

#define EXCEPTION_WINE_STUB   0x80000100

Definition at line 20 of file exception.h.

◆ GetExceptionCode

#define GetExceptionCode ( )    _SEH2_GetExceptionCode()

Definition at line 66 of file exception.h.

◆ GetExceptionInformation

#define GetExceptionInformation ( )    _SEH2_GetExceptionInformation()

Definition at line 70 of file exception.h.

Typedef Documentation

◆ EXCEPTION_REGISTRATION_RECORD

◆ PEXCEPTION_HANDLER

◆ PEXCEPTION_REGISTRATION_RECORD

Function Documentation

◆ __wine_enter_vm86()

void __wine_enter_vm86 ( CONTEXT context)

◆ __wine_pop_frame()

static EXCEPTION_REGISTRATION_RECORD* __wine_pop_frame ( EXCEPTION_REGISTRATION_RECORD frame)
inlinestatic

Definition at line 103 of file exception.h.

104 {
105 #ifdef __i386__
106  __writefsdword(0, (unsigned long)frame->Prev);
107  return frame->Prev;
108 #else
109  NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
110  frame->Prev = teb->ExceptionList;
111  teb->ExceptionList = (PVOID)frame;
112  return frame->Prev;
113 #endif
114 }
void * PVOID
Definition: retypes.h:9
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
Definition: compat.h:379
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
PPC_QUAL void __writefsdword(const unsigned long Offset, const unsigned long Data)
Definition: intrin_ppc.h:354
struct _EXCEPTION_REGISTRATION_RECORD * Prev
Definition: exception.h:42

◆ __wine_push_frame()

static EXCEPTION_REGISTRATION_RECORD* __wine_push_frame ( EXCEPTION_REGISTRATION_RECORD frame)
inlinestatic

Definition at line 89 of file exception.h.

90 {
91 #ifdef __i386__
93  __writefsdword(0, (unsigned long)frame);
94  return frame->Prev;
95 #else
96  NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
97  frame->Prev = teb->ExceptionList;
98  teb->ExceptionList = (PVOID)frame;
99  return frame->Prev;
100 #endif
101 }
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition: intrin_ppc.h:382
void * PVOID
Definition: retypes.h:9
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
Definition: compat.h:379
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
PPC_QUAL void __writefsdword(const unsigned long Offset, const unsigned long Data)
Definition: intrin_ppc.h:354
struct _EXCEPTION_REGISTRATION_RECORD * Prev
Definition: exception.h:42