ReactOS 0.4.16-dev-533-gc7d1aa3
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 FUNC_DESCR_NOEXCEPT   4 /* noexcept function */
 
#define CLASS_IS_SIMPLE_TYPE   1
 
#define CLASS_HAS_VIRTUAL_BASE_CLASS   4
 
#define DEFINE_CXX_TYPE_INFO(type)
 
#define DEFINE_CXX_EXCEPTION(type, base_no, cl1, cl2, dtor)
 
#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor)
 
#define DEFINE_CXX_EXCEPTION0(name, dtor)    DEFINE_CXX_EXCEPTION(name, 0, NULL, NULL, dtor)
 
#define DEFINE_CXX_DATA0(name, dtor)    DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor)
 
#define DEFINE_CXX_DATA1(name, cl1, dtor)    DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor)
 
#define DEFINE_CXX_DATA2(name, cl1, cl2, dtor)    DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor)
 
#define EXCEPTION_MANGLED_NAME   ".?AVexception@@"
 
#define CREATE_EXCEPTION_OBJECT(exception_name)
 

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 (void *, 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 84 of file cppexcept.h.

◆ CLASS_IS_SIMPLE_TYPE

#define CLASS_IS_SIMPLE_TYPE   1

Definition at line 83 of file cppexcept.h.

◆ CREATE_EXCEPTION_OBJECT

#define CREATE_EXCEPTION_OBJECT (   exception_name)

Definition at line 251 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_CXX_DATA

#define DEFINE_CXX_DATA (   type,
  base_no,
  cl1,
  cl2,
  dtor 
)
Value:
DEFINE_CXX_EXCEPTION(type, base_no, cl1, cl2, dtor)
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define DEFINE_CXX_TYPE_INFO(type)
Definition: cppexcept.h:159

Definition at line 231 of file cppexcept.h.

◆ DEFINE_CXX_DATA0

#define DEFINE_CXX_DATA0 (   name,
  dtor 
)     DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor)

Definition at line 238 of file cppexcept.h.

◆ DEFINE_CXX_DATA1

#define DEFINE_CXX_DATA1 (   name,
  cl1,
  dtor 
)     DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor)

Definition at line 240 of file cppexcept.h.

◆ DEFINE_CXX_DATA2

#define DEFINE_CXX_DATA2 (   name,
  cl1,
  cl2,
  dtor 
)     DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor)

Definition at line 242 of file cppexcept.h.

◆ DEFINE_CXX_EXCEPTION

#define DEFINE_CXX_EXCEPTION (   type,
  base_no,
  cl1,
  cl2,
  dtor 
)
Value:
static const cxx_type_info_table type ## _cxx_type_table = { \
base_no+1, \
{ \
& type ## _cxx_type_info, \
cl1, \
cl2, \
} \
}; \
\
static const cxx_exception_type type ## _exception_type = { \
0, \
NULL, \
& type ## _cxx_type_table \
};
#define NULL
Definition: types.h:112
#define THISCALL(func)
Definition: asm.h:153
void(* cxx_copy_ctor)(void)
Definition: cppexcept.h:52

Definition at line 168 of file cppexcept.h.

◆ DEFINE_CXX_EXCEPTION0

#define DEFINE_CXX_EXCEPTION0 (   name,
  dtor 
)     DEFINE_CXX_EXCEPTION(name, 0, NULL, NULL, dtor)

Definition at line 235 of file cppexcept.h.

◆ DEFINE_CXX_TYPE_INFO

#define DEFINE_CXX_TYPE_INFO (   type)
Value:
static const cxx_type_info type ## _cxx_type_info = { \
0, \
{ 0, -1, 0 }, \
sizeof(type), \
(cxx_copy_ctor)THISCALL(type ##_copy_ctor) \
};

Definition at line 159 of file cppexcept.h.

◆ EXCEPTION_MANGLED_NAME

#define EXCEPTION_MANGLED_NAME   ".?AVexception@@"

Definition at line 248 of file cppexcept.h.

◆ FUNC_DESCR_NOEXCEPT

#define FUNC_DESCR_NOEXCEPT   4 /* noexcept function */

Definition at line 32 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 52 of file cppexcept.h.

◆ cxx_exc_custom_handler

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

Function Documentation

◆ _CxxThrowException()

void WINAPI _CxxThrowException ( void object,
const cxx_exception_type type 
)

Definition at line 1006 of file cpp.c.

1007{
1008 ULONG_PTR args[3];
1009
1011 args[1] = (ULONG_PTR)object;
1012 args[2] = (ULONG_PTR)type;
1014}
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(), __RTCastToVoid(), __RTDynamicCast(), and __RTtypeid().

◆ _XcptFilter()

int CDECL _XcptFilter ( NTSTATUS  ex,
PEXCEPTION_POINTERS  ptr 
)

Definition at line 278 of file except.c.

279{
280 TRACE("(%08x,%p)\n", ex, ptr);
281 /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
283}
static PVOID ptr
Definition: dispmode.c:27
static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
Definition: except.c:95
#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 131 of file cppexcept.h.

132{
133 if (!info) return "{}";
134 return wine_dbg_sprintf( "{vtable=%p name=%s (%s)}",
135 info->vtable, info->mangled, info->name ? info->name : "" );
136}
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 139 of file cppexcept.h.

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