ReactOS 0.4.16-dev-835-gd769f56
exception.h File Reference
#include <setjmp.h>
#include <intrin.h>
#include <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 EH_TARGET_UNWIND   0x20
 
#define EH_COLLIDED_UNWIND   0x40
 
#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_CTX(func, ctx)   _SEH2_EXCEPT((func)(GetExceptionInformation(), ctx))
 
#define __EXCEPT_PAGE_FAULT   _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION)
 
#define __EXCEPT_ALL   _SEH2_EXCEPT(1)
 
#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 63 of file exception.h.

◆ __EXCEPT

Definition at line 59 of file exception.h.

◆ __EXCEPT_ALL

#define __EXCEPT_ALL   _SEH2_EXCEPT(1)

Definition at line 62 of file exception.h.

◆ __EXCEPT_CTX

#define __EXCEPT_CTX (   func,
  ctx 
)    _SEH2_EXCEPT((func)(GetExceptionInformation(), ctx))

Definition at line 60 of file exception.h.

◆ __EXCEPT_PAGE_FAULT

Definition at line 61 of file exception.h.

◆ __FINALLY

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

Definition at line 64 of file exception.h.

◆ __FINALLY_CTX

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

Definition at line 65 of file exception.h.

◆ __TRY

#define __TRY   _SEH2_TRY

Definition at line 58 of file exception.h.

◆ AbnormalTermination

#define AbnormalTermination ( )    _SEH2_AbnormalTermination()

Definition at line 76 of file exception.h.

◆ EH_COLLIDED_UNWIND

#define EH_COLLIDED_UNWIND   0x40

Definition at line 19 of file exception.h.

◆ EH_EXIT_UNWIND

#define EH_EXIT_UNWIND   0x04

Definition at line 15 of file exception.h.

◆ EH_NESTED_CALL

#define EH_NESTED_CALL   0x10

Definition at line 17 of file exception.h.

◆ EH_NONCONTINUABLE

#define EH_NONCONTINUABLE   0x01

Definition at line 13 of file exception.h.

◆ EH_STACK_INVALID

#define EH_STACK_INVALID   0x08

Definition at line 16 of file exception.h.

◆ EH_TARGET_UNWIND

#define EH_TARGET_UNWIND   0x20

Definition at line 18 of file exception.h.

◆ EH_UNWINDING

#define EH_UNWINDING   0x02

Definition at line 14 of file exception.h.

◆ EXCEPTION_VM86_INTx

#define EXCEPTION_VM86_INTx   0x80000110

Definition at line 24 of file exception.h.

◆ EXCEPTION_VM86_PICRETURN

#define EXCEPTION_VM86_PICRETURN   0x80000112

Definition at line 26 of file exception.h.

◆ EXCEPTION_VM86_STI

#define EXCEPTION_VM86_STI   0x80000111

Definition at line 25 of file exception.h.

◆ EXCEPTION_WINE_ASSERTION

#define EXCEPTION_WINE_ASSERTION   0x80000101

Definition at line 22 of file exception.h.

◆ EXCEPTION_WINE_STUB

#define EXCEPTION_WINE_STUB   0x80000100

Definition at line 21 of file exception.h.

◆ GetExceptionCode

#define GetExceptionCode ( )    _SEH2_GetExceptionCode()

Definition at line 68 of file exception.h.

◆ GetExceptionInformation

#define GetExceptionInformation ( )    _SEH2_GetExceptionInformation()

Definition at line 72 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 104 of file exception.h.

105{
106#ifdef __i386__
107 __writefsdword(0, (unsigned long)frame->Prev);
108 return frame->Prev;
109#else
110 NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
111 frame->Prev = teb->ExceptionList;
112 teb->ExceptionList = (PVOID)frame;
113 return frame->Prev;
114#endif
115}
PPC_QUAL void __writefsdword(const unsigned long Offset, const unsigned long Data)
Definition: intrin_ppc.h:354
#define NtCurrentTeb
struct _EXCEPTION_REGISTRATION_RECORD * Prev
Definition: exception.h:43
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
Definition: compat.h:711
void * PVOID
Definition: typedefs.h:50

◆ __wine_push_frame()

static EXCEPTION_REGISTRATION_RECORD * __wine_push_frame ( EXCEPTION_REGISTRATION_RECORD frame)
inlinestatic

Definition at line 90 of file exception.h.

91{
92#ifdef __i386__
94 __writefsdword(0, (unsigned long)frame);
95 return frame->Prev;
96#else
97 NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
98 frame->Prev = teb->ExceptionList;
99 teb->ExceptionList = (PVOID)frame;
100 return frame->Prev;
101#endif
102}
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition: intrin_ppc.h:382