ReactOS 0.4.16-dev-109-gf4cb10f
exception.h File Reference
#include <setjmp.h>
#include <intrin.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   __try
 
#define __EXCEPT(func)   __except(func(GetExceptionInformation()))
 
#define __EXCEPT_CTX(func, ctx)   __except((func)(GetExceptionInformation(), ctx))
 
#define __EXCEPT_PAGE_FAULT   __except(GetExceptionCode() == STATUS_ACCESS_VIOLATION)
 
#define __EXCEPT_ALL   __except(1)
 
#define __ENDTRY
 
#define __FINALLY(func)   __finally { func(!AbnormalTermination()); }
 
#define __FINALLY_CTX(func, ctx)   __finally { func(!AbnormalTermination(), ctx); }
 

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

Definition at line 88 of file exception.h.

◆ __EXCEPT

#define __EXCEPT (   func)    __except(func(GetExceptionInformation()))

Definition at line 84 of file exception.h.

◆ __EXCEPT_ALL

#define __EXCEPT_ALL   __except(1)

Definition at line 87 of file exception.h.

◆ __EXCEPT_CTX

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

Definition at line 85 of file exception.h.

◆ __EXCEPT_PAGE_FAULT

#define __EXCEPT_PAGE_FAULT   __except(GetExceptionCode() == STATUS_ACCESS_VIOLATION)

Definition at line 86 of file exception.h.

◆ __FINALLY

#define __FINALLY (   func)    __finally { func(!AbnormalTermination()); }

Definition at line 89 of file exception.h.

◆ __FINALLY_CTX

#define __FINALLY_CTX (   func,
  ctx 
)    __finally { func(!AbnormalTermination(), ctx); }

Definition at line 90 of file exception.h.

◆ __TRY

#define __TRY   __try

Definition at line 83 of file exception.h.

◆ EH_COLLIDED_UNWIND

#define EH_COLLIDED_UNWIND   0x40

Definition at line 22 of file exception.h.

◆ EH_EXIT_UNWIND

#define EH_EXIT_UNWIND   0x04

Definition at line 18 of file exception.h.

◆ EH_NESTED_CALL

#define EH_NESTED_CALL   0x10

Definition at line 20 of file exception.h.

◆ EH_NONCONTINUABLE

#define EH_NONCONTINUABLE   0x01

Definition at line 16 of file exception.h.

◆ EH_STACK_INVALID

#define EH_STACK_INVALID   0x08

Definition at line 19 of file exception.h.

◆ EH_TARGET_UNWIND

#define EH_TARGET_UNWIND   0x20

Definition at line 21 of file exception.h.

◆ EH_UNWINDING

#define EH_UNWINDING   0x02

Definition at line 17 of file exception.h.

◆ EXCEPTION_VM86_INTx

#define EXCEPTION_VM86_INTx   0x80000110

Definition at line 27 of file exception.h.

◆ EXCEPTION_VM86_PICRETURN

#define EXCEPTION_VM86_PICRETURN   0x80000112

Definition at line 29 of file exception.h.

◆ EXCEPTION_VM86_STI

#define EXCEPTION_VM86_STI   0x80000111

Definition at line 28 of file exception.h.

◆ EXCEPTION_WINE_ASSERTION

#define EXCEPTION_WINE_ASSERTION   0x80000101

Definition at line 25 of file exception.h.

◆ EXCEPTION_WINE_STUB

#define EXCEPTION_WINE_STUB   0x80000100

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

119{
120#ifdef __i386__
121 __writefsdword(0, (unsigned long)frame->Prev);
122 return frame->Prev;
123#else
124 NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
125 frame->Prev = teb->ExceptionList;
126 teb->ExceptionList = (PVOID)frame;
127 return frame->Prev;
128#endif
129}
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:46
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 104 of file exception.h.

105{
106#ifdef __i386__
108 __writefsdword(0, (unsigned long)frame);
109 return frame->Prev;
110#else
111 NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
112 frame->Prev = teb->ExceptionList;
113 teb->ExceptionList = (PVOID)frame;
114 return frame->Prev;
115#endif
116}
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition: intrin_ppc.h:382