ReactOS 0.4.16-dev-2122-g1628f5e
cppexcept.h File Reference
#include <fpieee.h>
#include "cxx.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  ipmap_info
 
struct  catchblock_info
 
struct  tryblock_info
 
struct  unwind_info
 
struct  cxx_function_descr
 
struct  exception_ptr
 

Macros

#define CXX_FRAME_MAGIC_VC6   0x19930520
 
#define CXX_FRAME_MAGIC_VC7   0x19930521
 
#define CXX_FRAME_MAGIC_VC8   0x19930522
 
#define CXX_EXCEPTION   0xe06d7363
 
#define CXX_EXCEPTION_PARAMS   4
 
#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 TYPE_FLAG_CONST   1
 
#define TYPE_FLAG_VOLATILE   2
 
#define TYPE_FLAG_REFERENCE   8
 
#define TRACE_EXCEPTION_TYPE(type, base)
 
#define EXCEPTION_MANGLED_NAME   ".?AVexception@@"
 
#define CREATE_EXCEPTION_OBJECT(exception_name)
 

Functions

DECLSPEC_NORETURN void WINAPI _CxxThrowException (void *, const cxx_exception_type *)
 
static BOOL is_cxx_exception (EXCEPTION_RECORD *rec)
 
void throw_exception (const char *)
 
void exception_ptr_from_record (exception_ptr *, EXCEPTION_RECORD *)
 
void __cdecl __ExceptionPtrCreate (exception_ptr *)
 
void __cdecl __ExceptionPtrDestroy (exception_ptr *)
 
void __cdecl __ExceptionPtrRethrow (const exception_ptr *)
 
BOOL __cdecl __uncaught_exception (void)
 
static const chardbgstr_type_info (const type_info *info)
 
static voidget_this_pointer (const this_ptr_offsets *off, void *object)
 
static void call_copy_ctor (void *func, void *this, void *src, int has_vbase)
 
static void call_dtor (void *func, void *this)
 
static const cxx_type_infofind_caught_type (cxx_exception_type *exc_type, uintptr_t base, const type_info *catch_ti, UINT catch_flags)
 
static void copy_exception (void *object, void **dest, UINT catch_flags, const cxx_type_info *type, uintptr_t base)
 
void dump_function_descr (const cxx_function_descr *descr, uintptr_t base)
 
voidfind_catch_handler (void *object, uintptr_t frame, uintptr_t exc_base, const tryblock_info *tryblock, cxx_exception_type *exc_type, uintptr_t image_base)
 
int handle_fpieee_flt (__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int(__cdecl *handler)(_FPIEEE_RECORD *))
 
voidcall_catch_handler (EXCEPTION_RECORD *rec)
 
voidcall_unwind_handler (void *func, uintptr_t frame, DISPATCHER_CONTEXT *dispatch)
 
ULONG_PTR get_exception_pc (DISPATCHER_CONTEXT *dispatch)
 

Macro Definition Documentation

◆ CLASS_HAS_VIRTUAL_BASE_CLASS

#define CLASS_HAS_VIRTUAL_BASE_CLASS   4

Definition at line 138 of file cppexcept.h.

◆ CLASS_IS_SIMPLE_TYPE

#define CLASS_IS_SIMPLE_TYPE   1

Definition at line 137 of file cppexcept.h.

◆ CREATE_EXCEPTION_OBJECT

#define CREATE_EXCEPTION_OBJECT (   exception_name)

Definition at line 300 of file cppexcept.h.

◆ CXX_EXCEPTION

#define CXX_EXCEPTION   0xe06d7363

Definition at line 34 of file cppexcept.h.

◆ CXX_EXCEPTION_PARAMS

#define CXX_EXCEPTION_PARAMS   4

Definition at line 89 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC6

#define CXX_FRAME_MAGIC_VC6   0x19930520

Definition at line 31 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC7

#define CXX_FRAME_MAGIC_VC7   0x19930521

Definition at line 32 of file cppexcept.h.

◆ CXX_FRAME_MAGIC_VC8

#define CXX_FRAME_MAGIC_VC8   0x19930522

Definition at line 33 of file cppexcept.h.

◆ EXCEPTION_MANGLED_NAME

#define EXCEPTION_MANGLED_NAME   ".?AVexception@@"

Definition at line 297 of file cppexcept.h.

◆ FUNC_DESCR_NOEXCEPT

#define FUNC_DESCR_NOEXCEPT   4 /* noexcept function */

Definition at line 135 of file cppexcept.h.

◆ FUNC_DESCR_SYNCHRONOUS

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

Definition at line 134 of file cppexcept.h.

◆ TRACE_EXCEPTION_TYPE

#define TRACE_EXCEPTION_TYPE (   type,
  base 
)
Value:
do { \
const cxx_type_info_table *table = rtti_rva( type->type_info_table, base ); \
unsigned int i; \
TRACE( "flags %x destr %p handler %p type info %p\n", \
type->flags, rtti_rva( type->destructor, base ), \
type->custom_handler ? rtti_rva( type->custom_handler, base ) : NULL, table ); \
for (i = 0; i < table->count; i++) \
{ \
const cxx_type_info *type = rtti_rva( table->info[i], base ); \
const type_info *info = rtti_rva( type->type_info, base ); \
TRACE( " %d: flags %x type %p %s offsets %d,%d,%d size %d copy ctor %p\n", \
i, type->flags, info, dbgstr_type_info( info ), \
type->offsets.this_offset, type->offsets.vbase_descr, type->offsets.vbase_offset, \
type->size, rtti_rva( type->copy_ctor, base )); \
} \
} while(0)
#define NULL
Definition: types.h:112
static const char * dbgstr_type_info(const type_info *info)
Definition: cppexcept.h:169
static void * rtti_rva(unsigned int rva, uintptr_t base)
Definition: cxx.h:469
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Definition at line 265 of file cppexcept.h.

◆ TYPE_FLAG_CONST

#define TYPE_FLAG_CONST   1

Definition at line 140 of file cppexcept.h.

◆ TYPE_FLAG_REFERENCE

#define TYPE_FLAG_REFERENCE   8

Definition at line 142 of file cppexcept.h.

◆ TYPE_FLAG_VOLATILE

#define TYPE_FLAG_VOLATILE   2

Definition at line 141 of file cppexcept.h.

Function Documentation

◆ __ExceptionPtrCreate()

void __cdecl __ExceptionPtrCreate ( exception_ptr )

◆ __ExceptionPtrDestroy()

void __cdecl __ExceptionPtrDestroy ( exception_ptr )

◆ __ExceptionPtrRethrow()

void __cdecl __ExceptionPtrRethrow ( const exception_ptr ep)

Definition at line 1245 of file cpp.c.

1246{
1247 TRACE("(%p)\n", ep);
1248
1249 if (!ep->rec)
1250 {
1251 static const char *exception_msg = "bad exception";
1252 exception e;
1253
1254 exception_ctor(&e, &exception_msg);
1255 _CxxThrowException(&e, &exception_exception_type);
1256 return;
1257 }
1258
1261}
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
void WINAPI _CxxThrowException(void *object, const cxx_exception_type *type)
Definition: cpp.c:890
#define e
Definition: ke_i.h:82
exception __thiscall exception_ctor(exception *_this, const char **name)
Definition: cpp.c:130
#define TRACE(s)
Definition: solgame.cpp:4
DWORD ExceptionCode
Definition: compat.h:208
DWORD NumberParameters
Definition: compat.h:212
DWORD ExceptionFlags
Definition: compat.h:209
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
Definition: compat.h:213
EXCEPTION_RECORD * rec
Definition: cppexcept.h:156
#define EH_UNWINDING
Definition: exception.h:14

◆ __uncaught_exception()

BOOL __cdecl __uncaught_exception ( void  )

Definition at line 821 of file except.c.

822{
823 return msvcrt_get_thread_data()->processing_throw != 0;
824}
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45

◆ _CxxThrowException()

DECLSPEC_NORETURN void WINAPI _CxxThrowException ( void object,
const cxx_exception_type type 
)

Definition at line 890 of file cpp.c.

891{
893
895 args[1] = (ULONG_PTR)object;
896 args[2] = (ULONG_PTR)type;
899}
#define CXX_EXCEPTION
Definition: cppexcept.h:34
#define CXX_FRAME_MAGIC_VC6
Definition: cppexcept.h:31
#define CXX_EXCEPTION_PARAMS
Definition: cppexcept.h:89
static uintptr_t rtti_rva_base(const void *ptr)
Definition: cxx.h:463
#define ULONG_PTR
Definition: config.h:101
Definition: match.c:390
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23
uint32_t ULONG_PTR
Definition: typedefs.h:65

◆ call_catch_handler()

void * call_catch_handler ( EXCEPTION_RECORD rec)

Referenced by call_catch_block().

◆ call_copy_ctor()

static void call_copy_ctor ( void func,
void this,
void src,
int  has_vbase 
)
inlinestatic

Definition at line 200 of file cppexcept.h.

201{
202 if (has_vbase)
203 ((void (__thiscall*)(void*, void*, BOOL))func)(this, src, 1);
204 else
205 ((void (__thiscall*)(void*, void*))func)(this, src);
206}
GLenum func
Definition: glext.h:6028
GLenum src
Definition: glext.h:6340
#define __thiscall
Definition: cpp.c:43
#define BOOL
Definition: nt_native.h:43

Referenced by copy_exception().

◆ call_dtor()

static void call_dtor ( void func,
void this 
)
inlinestatic

Definition at line 207 of file cppexcept.h.

208{
209 ((void (__thiscall*)(void*))func)( this );
210}

Referenced by __DestructExceptionObject().

◆ call_unwind_handler()

void * call_unwind_handler ( void func,
uintptr_t  frame,
DISPATCHER_CONTEXT dispatch 
)

Referenced by cxx_local_unwind().

◆ copy_exception()

static void copy_exception ( void object,
void **  dest,
UINT  catch_flags,
const cxx_type_info type,
uintptr_t  base 
)
inlinestatic

Definition at line 241 of file cppexcept.h.

243{
244 if (catch_flags & TYPE_FLAG_REFERENCE)
245 {
246 *dest = get_this_pointer( &type->offsets, object );
247 }
248 else if (type->flags & CLASS_IS_SIMPLE_TYPE)
249 {
250 memmove( dest, object, type->size );
251 /* if it is a pointer, adjust it */
252 if (type->size == sizeof(void*)) *dest = get_this_pointer( &type->offsets, *dest );
253 }
254 else /* copy the object */
255 {
256 if (type->copy_ctor)
257 call_copy_ctor( rtti_rva( type->copy_ctor, base ), dest,
258 get_this_pointer( &type->offsets, object ),
260 else
261 memmove( dest, get_this_pointer( &type->offsets, object ), type->size );
262 }
263}
#define CLASS_IS_SIMPLE_TYPE
Definition: cppexcept.h:137
#define CLASS_HAS_VIRTUAL_BASE_CLASS
Definition: cppexcept.h:138
static void call_copy_ctor(void *func, void *this, void *src, int has_vbase)
Definition: cppexcept.h:200
static void * get_this_pointer(const this_ptr_offsets *off, void *object)
Definition: cppexcept.h:177
#define TYPE_FLAG_REFERENCE
Definition: cppexcept.h:142
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static char * dest
Definition: rtl.c:135

Referenced by __CxxExceptionFilter(), and find_catch_handler().

◆ dbgstr_type_info()

static const char * dbgstr_type_info ( const type_info info)
inlinestatic

Definition at line 169 of file cppexcept.h.

170{
171 if (!info) return "{}";
172 return wine_dbg_sprintf( "{vtable=%p name=%s (%s)}",
173 info->vtable, info->mangled, info->name ? info->name : "" );
174}
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296

Referenced by __RTDynamicCast(), dump_function_descr(), and dump_obj_locator().

◆ dump_function_descr()

void dump_function_descr ( const cxx_function_descr descr,
uintptr_t  base 
)

Definition at line 50 of file except.c.

51{
52 unwind_info *unwind_table = rtti_rva( descr->unwind_table, base );
53 tryblock_info *tryblock = rtti_rva( descr->tryblock, base );
54 ipmap_info *ipmap = rtti_rva( descr->ipmap, base );
55 UINT i, j;
56
57 TRACE( "magic %x\n", descr->magic );
58 TRACE( "unwind table: %p %d\n", unwind_table, descr->unwind_count );
59 for (i = 0; i < descr->unwind_count; i++)
60 {
61 TRACE(" %d: prev %d func %p\n", i, unwind_table[i].prev,
62 unwind_table[i].handler ? rtti_rva( unwind_table[i].handler, base ) : NULL );
63 }
64 TRACE( "try table: %p %d\n", tryblock, descr->tryblock_count );
65 for (i = 0; i < descr->tryblock_count; i++)
66 {
67 catchblock_info *catchblock = rtti_rva( tryblock[i].catchblock, base );
68
69 TRACE( " %d: start %d end %d catchlevel %d catch %p %d\n", i,
70 tryblock[i].start_level, tryblock[i].end_level,
71 tryblock[i].catch_level, catchblock, tryblock[i].catchblock_count);
72 for (j = 0; j < tryblock[i].catchblock_count; j++)
73 {
74 type_info *type_info = catchblock[j].type_info ? rtti_rva( catchblock[j].type_info, base ) : NULL;
75 TRACE( " %d: flags %x offset %d handler %p",
76 j, catchblock[j].flags, catchblock[j].offset,
77 catchblock[j].handler ? rtti_rva(catchblock[j].handler, base) : NULL );
78#ifdef _WIN64
79 TRACE( " frame %x", catchblock[j].frame );
80#endif
81 TRACE( " type %p %s\n", type_info, dbgstr_type_info(type_info) );
82 }
83 }
84 TRACE( "ipmap: %p %d\n", ipmap, descr->ipmap_count );
85 for (i = 0; i < descr->ipmap_count; i++)
86 TRACE( " %d: ip %x state %d\n", i, ipmap[i].ip, ipmap[i].state );
87#ifdef RTTI_USE_RVA
88 TRACE( "unwind_help %+d\n", descr->unwind_help );
89#endif
90 if (descr->magic <= CXX_FRAME_MAGIC_VC6) return;
91 TRACE( "expect list: %p\n", rtti_rva( descr->expect_list, base ) );
92 if (descr->magic <= CXX_FRAME_MAGIC_VC7) return;
93 TRACE( "flags: %08x\n", descr->flags );
94}
static int state
Definition: maze.c:121
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
#define CXX_FRAME_MAGIC_VC7
Definition: cppexcept.h:32
GLintptr offset
Definition: glext.h:5920
GLbitfield flags
Definition: glext.h:7161
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
unsigned int UINT
Definition: ndis.h:50
const char * descr
Definition: boot.c:45
Definition: dhcpd.h:62
UINT catchblock_count
Definition: cppexcept.h:107

Referenced by cxx_frame_handler().

◆ exception_ptr_from_record()

void exception_ptr_from_record ( exception_ptr ,
EXCEPTION_RECORD  
)

◆ find_catch_handler()

void * find_catch_handler ( void object,
uintptr_t  frame,
uintptr_t  exc_base,
const tryblock_info tryblock,
cxx_exception_type exc_type,
uintptr_t  image_base 
)

Definition at line 96 of file except.c.

99{
100 unsigned int i;
101 const catchblock_info *catchblock = rtti_rva( tryblock->catchblock, image_base );
102 const cxx_type_info *type;
103 const type_info *catch_ti;
104
105 for (i = 0; i < tryblock->catchblock_count; i++)
106 {
107 if (exc_type)
108 {
109 catch_ti = catchblock[i].type_info ? rtti_rva( catchblock[i].type_info, image_base ) : NULL;
110 type = find_caught_type( exc_type, exc_base, catch_ti, catchblock[i].flags );
111 if (!type) continue;
112
113 TRACE( "matched type %p in catchblock %d\n", type, i );
114
115 if (catch_ti && catch_ti->mangled[0] && catchblock[i].offset)
116 {
117 /* copy the exception to its destination on the stack */
118 void **dest = (void **)(frame + catchblock[i].offset);
119 copy_exception( object, dest, catchblock[i].flags, type, exc_base );
120 }
121 }
122 else
123 {
124 /* no CXX_EXCEPTION only proceed with a catch(...) block*/
125 if (catchblock[i].type_info) continue;
126 TRACE( "found catch(...) block\n" );
127 }
128 return rtti_rva( catchblock[i].handler, image_base );
129 }
130 return NULL;
131}
static const cxx_type_info * find_caught_type(cxx_exception_type *exc_type, uintptr_t base, const type_info *catch_ti, UINT catch_flags)
Definition: cppexcept.h:214
static void copy_exception(void *object, void **dest, UINT catch_flags, const cxx_type_info *type, uintptr_t base)
Definition: cppexcept.h:241
static void * image_base(void)
Definition: dll_register.c:28
char mangled[128]
Definition: cxx.h:335
UINT catchblock
Definition: cppexcept.h:108

Referenced by find_catch_block().

◆ find_caught_type()

static const cxx_type_info * find_caught_type ( cxx_exception_type exc_type,
uintptr_t  base,
const type_info catch_ti,
UINT  catch_flags 
)
inlinestatic

Definition at line 214 of file cppexcept.h.

216{
217 const cxx_type_info_table *type_info_table = rtti_rva( exc_type->type_info_table, base );
218 UINT i;
219
220 for (i = 0; i < type_info_table->count; i++)
221 {
222 const cxx_type_info *type = rtti_rva( type_info_table->info[i], base );
223 const type_info *ti = rtti_rva( type->type_info, base );
224
225 if (!catch_ti) return type; /* catch(...) matches any type */
226 if (catch_ti != ti)
227 {
228 if (strcmp( catch_ti->mangled, ti->mangled )) continue;
229 }
230 /* type is the same, now check the flags */
231 if ((exc_type->flags & TYPE_FLAG_CONST) &&
232 !(catch_flags & TYPE_FLAG_CONST)) continue;
233 if ((exc_type->flags & TYPE_FLAG_VOLATILE) &&
234 !(catch_flags & TYPE_FLAG_VOLATILE)) continue;
235 return type; /* it matched */
236 }
237 return NULL;
238}
#define TYPE_FLAG_CONST
Definition: cppexcept.h:140
#define TYPE_FLAG_VOLATILE
Definition: cppexcept.h:141
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3319
unsigned int type_info_table
Definition: cxx.h:454
unsigned int info[5]
Definition: cxx.h:446

Referenced by __CxxExceptionFilter(), and find_catch_handler().

◆ get_exception_pc()

ULONG_PTR get_exception_pc ( DISPATCHER_CONTEXT dispatch)

◆ get_this_pointer()

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

Definition at line 177 of file cppexcept.h.

178{
179 if (!object) return NULL;
180
181 if (off->vbase_descr >= 0)
182 {
183 int *offset_ptr;
184
185 /* move this ptr to vbase descriptor */
186 object = (char *)object + off->vbase_descr;
187 /* and fetch additional offset from vbase descriptor */
188 offset_ptr = (int *)(*(char **)object + off->vbase_offset);
189 object = (char *)object + *offset_ptr;
190 }
191
192 object = (char *)object + off->this_offset;
193 return object;
194}
int this_offset
Definition: cxx.h:341
int vbase_offset
Definition: cxx.h:343
int vbase_descr
Definition: cxx.h:342

Referenced by __RTDynamicCast(), and copy_exception().

◆ handle_fpieee_flt()

int handle_fpieee_flt ( __msvcrt_ulong  exception_code,
EXCEPTION_POINTERS ep,
int(__cdecl *handler)(_FPIEEE_RECORD *)   
)

Referenced by _fpieee_flt().

◆ is_cxx_exception()

static BOOL is_cxx_exception ( EXCEPTION_RECORD rec)
inlinestatic

Definition at line 146 of file cppexcept.h.

147{
148 if (rec->ExceptionCode != CXX_EXCEPTION) return FALSE;
149 if (rec->NumberParameters != CXX_EXCEPTION_PARAMS) return FALSE;
150 return (rec->ExceptionInformation[0] >= CXX_FRAME_MAGIC_VC6 &&
152}
#define FALSE
Definition: types.h:117
#define CXX_FRAME_MAGIC_VC8
Definition: cppexcept.h:33

Referenced by __CxxDetectRethrow(), __CxxExceptionFilter(), and __DestructExceptionObject().

◆ throw_exception()

void throw_exception ( const char msg)

Definition at line 606 of file cpp.c.

607{
608 exception e;
609 __exception_ctor(&e, msg, &exception_vtable);
610 _CxxThrowException(&e, &exception_exception_type);
611}
#define msg(x)
Definition: auth_time.c:54