ReactOS 0.4.15-dev-7834-g00c4b3d
cppexcept.h File Reference
#include "wine/asm.h"
Include dependency graph for cppexcept.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __type_info
 
struct  __exception
 
struct  this_ptr_offsets
 
struct  __cxx_type_info
 
struct  __cxx_type_info_table
 
struct  __cxx_exception_type
 

Macros

#define CXX_FRAME_MAGIC_VC6   0x19930520
 
#define CXX_FRAME_MAGIC_VC7   0x19930521
 
#define CXX_FRAME_MAGIC_VC8   0x19930522
 
#define CXX_EXCEPTION   0xe06d7363
 
#define FUNC_DESCR_SYNCHRONOUS   1 /* synchronous exceptions only (built with /EHs and /EHsc) */
 
#define CLASS_IS_SIMPLE_TYPE   1
 
#define CLASS_HAS_VIRTUAL_BASE_CLASS   4
 
#define DEFINE_EXCEPTION_TYPE_INFO(type, base_no, cl1, cl2)
 

Typedefs

typedef void(* vtable_ptr) (void)
 
typedef struct __type_info type_info
 
typedef struct __exception exception
 
typedef void(* cxx_copy_ctor) (void)
 
typedef struct __cxx_type_info cxx_type_info
 
typedef struct __cxx_type_info_table cxx_type_info_table
 
typedef DWORD(* cxx_exc_custom_handler) (PEXCEPTION_RECORD, struct __cxx_exception_frame *, PCONTEXT, EXCEPTION_REGISTRATION_RECORD **, const struct __cxx_function_descr *, int nested_trylevel, EXCEPTION_REGISTRATION_RECORD *nested_frame, DWORD unknown3)
 
typedef struct __cxx_exception_type cxx_exception_type
 

Functions

void WINAPI _CxxThrowException (exception *, const cxx_exception_type *)
 
int CDECL _XcptFilter (NTSTATUS, PEXCEPTION_POINTERS)
 
static const chardbgstr_type_info (const type_info *info)
 
static voidget_this_pointer (const this_ptr_offsets *off, void *object)
 

Macro Definition Documentation

◆ CLASS_HAS_VIRTUAL_BASE_CLASS

#define CLASS_HAS_VIRTUAL_BASE_CLASS   4

Definition at line 83 of file cppexcept.h.

◆ CLASS_IS_SIMPLE_TYPE

#define CLASS_IS_SIMPLE_TYPE   1

Definition at line 82 of file cppexcept.h.

◆ CXX_EXCEPTION

#define CXX_EXCEPTION   0xe06d7363

Definition at line 29 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC6

#define CXX_FRAME_MAGIC_VC6   0x19930520

Definition at line 26 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC7

#define CXX_FRAME_MAGIC_VC7   0x19930521

Definition at line 27 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC8

#define CXX_FRAME_MAGIC_VC8   0x19930522

Definition at line 28 of file cppexcept.h.

◆ DEFINE_EXCEPTION_TYPE_INFO

#define DEFINE_EXCEPTION_TYPE_INFO (   type,
  base_no,
  cl1,
  cl2 
)
Value:
\
static const cxx_type_info type ## _cxx_type_info = { \
0, \
{ 0, -1, 0 }, \
sizeof(type), \
(cxx_copy_ctor)THISCALL(MSVCRT_ ## type ##_copy_ctor) \
}; \
\
static const cxx_type_info_table type ## _type_info_table = { \
base_no+1, \
{ \
& type ## _cxx_type_info, \
cl1, \
cl2 \
} \
}; \
\
static const cxx_exception_type type ## _exception_type = { \
0, \
(cxx_copy_ctor)THISCALL(MSVCRT_ ## type ## _dtor), \
NULL, \
& type ## _type_info_table \
};
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define THISCALL(func)
Definition: asm.h:145
void(* cxx_copy_ctor)(void)
Definition: cppexcept.h:51

Definition at line 158 of file cppexcept.h.

◆ FUNC_DESCR_SYNCHRONOUS

#define FUNC_DESCR_SYNCHRONOUS   1 /* synchronous exceptions only (built with /EHs and /EHsc) */

Definition at line 31 of file cppexcept.h.

Typedef Documentation

◆ cxx_copy_ctor

typedef void(* cxx_copy_ctor) (void)

Definition at line 51 of file cppexcept.h.

◆ cxx_exc_custom_handler

Definition at line 103 of file cppexcept.h.

◆ cxx_exception_type

◆ cxx_type_info

◆ cxx_type_info_table

◆ exception

◆ type_info

◆ vtable_ptr

typedef void(* vtable_ptr) (void)

Definition at line 33 of file cppexcept.h.

Function Documentation

◆ _CxxThrowException()

void WINAPI _CxxThrowException ( exception object,
const cxx_exception_type type 
)

Definition at line 1572 of file cpp.c.

1573{
1574 ULONG_PTR args[3];
1575
1577 args[1] = (ULONG_PTR)object;
1578 args[2] = (ULONG_PTR)type;
1580}
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
#define ULONG_PTR
Definition: config.h:101
#define CXX_EXCEPTION
Definition: cppexcept.h:27
#define CXX_FRAME_MAGIC_VC6
Definition: cppexcept.h:24
Definition: match.c:390
#define EH_NONCONTINUABLE
Definition: stubs.h:32
uint32_t ULONG_PTR
Definition: typedefs.h:65

Referenced by __ExceptionPtrRethrow(), MSVCRT___RTCastToVoid(), MSVCRT___RTDynamicCast(), and MSVCRT___RTtypeid().

◆ _XcptFilter()

int CDECL _XcptFilter ( NTSTATUS  ex,
PEXCEPTION_POINTERS  ptr 
)

Definition at line 274 of file except.c.

275{
276 TRACE("(%08x,%p)\n", ex, ptr);
277 /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
279}
static PVOID ptr
Definition: dispmode.c:27
static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
Definition: except.c:93
#define TRACE(s)
Definition: solgame.cpp:4
Definition: comerr.c:44

◆ dbgstr_type_info()

static const char * dbgstr_type_info ( const type_info info)
inlinestatic

Definition at line 130 of file cppexcept.h.

131{
132 if (!info) return "{}";
133 return wine_dbg_sprintf( "{vtable=%p name=%s (%s)}",
134 info->vtable, info->mangled, info->name ? info->name : "" );
135}
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296

◆ get_this_pointer()

static void * get_this_pointer ( const this_ptr_offsets off,
void object 
)
inlinestatic

Definition at line 138 of file cppexcept.h.

139{
140 if (!object) return NULL;
141
142 if (off->vbase_descr >= 0)
143 {
144 int *offset_ptr;
145
146 /* move this ptr to vbase descriptor */
147 object = (char *)object + off->vbase_descr;
148 /* and fetch additional offset from vbase descriptor */
149 offset_ptr = (int *)(*(char **)object + off->vbase_offset);
150 object = (char *)object + *offset_ptr;
151 }
152
153 object = (char *)object + off->this_offset;
154 return object;
155}