71 TRACE(
"%p: sig=%08x base_offset=%08x flags=%08x type=%p %s hierarchy=%p\n",
74 TRACE(
" hierarchy: sig=%08x attr=%08x len=%d base classes=%p\n",
75 h->signature,
h->attributes,
h->array_len,
h->base_classes );
76 for (
i = 0;
i <
h->array_len;
i++)
78 TRACE(
" base class %p: num %d off %d,%d,%d attr %08x type %p %s\n",
79 h->base_classes->bases[
i],
80 h->base_classes->bases[
i]->num_base_classes,
81 h->base_classes->bases[
i]->offsets.this_offset,
82 h->base_classes->bases[
i]->offsets.vbase_descr,
83 h->base_classes->bases[
i]->offsets.vbase_offset,
84 h->base_classes->bases[
i]->attributes,
85 h->base_classes->bases[
i]->type_descriptor,
99 TRACE(
"%p: sig=%08x base_offset=%08x flags=%08x type=%p %s hierarchy=%p\n",
100 ptr,
ptr->signature,
ptr->base_class_offset,
ptr->flags,
102 TRACE(
" hierarchy: sig=%08x attr=%08x len=%d base classes=%p\n",
103 h->signature,
h->attributes,
h->array_len,
base +
h->base_classes );
104 for (
i = 0;
i <
h->array_len;
i++)
109 TRACE(
" base class %p: num %d off %d,%d,%d attr %08x type %p %s\n",
133 return __exception_ctor(_this, *
name, &exception_vtable);
143 _this->vtable = &exception_vtable;
145 _this->do_free =
FALSE;
155 TRACE(
"(%p)\n", _this);
156 return __exception_ctor(_this,
NULL, &exception_vtable);
165 TRACE(
"(%p %p)\n", _this, rhs);
171 TRACE(
"name = %s\n", _this->name);
193 TRACE(
"(%p %p)\n", _this, rhs);
222 TRACE(
"(%p)\n", _this);
232 TRACE(
"(%p %p)\n", _this, rhs);
277 const __non_rtti_object * rhs)
279 TRACE(
"(%p %p)\n", _this, rhs);
300 TRACE(
"(%p)\n", _this);
309 const __non_rtti_object *rhs)
311 TRACE(
"(%p %p)\n", _this, rhs);
368 TRACE(
"(%p %p)\n", _this, rhs);
397 TRACE(
"(%p)\n", _this);
407 TRACE(
"(%p %p)\n", _this, rhs);
453 int ret = !
strcmp(_this->mangled + 1, rhs->mangled + 1);
454 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
464 int ret = !!
strcmp(_this->mangled + 1, rhs->mangled + 1);
465 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
475 int ret =
strcmp(_this->mangled + 1, rhs->mangled + 1) < 0;
476 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
486 TRACE(
"(%p)\n", _this);
520 TRACE(
"(%p) returning %s\n", _this, _this->name);
530 TRACE(
"(%p) returning %s\n", _this, _this->mangled);
531 return _this->mangled;
541bad_alloc *
__thiscall bad_alloc_copy_ctor(bad_alloc * _this,
const bad_alloc * rhs)
543 TRACE(
"(%p %p)\n", _this, rhs);
544 return __exception_copy_ctor(_this, rhs, &bad_alloc_vtable);
550 TRACE(
"(%p)\n", _this);
581DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@
std@
@" )
582DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@
std@
@" )
583DEFINE_RTTI_DATA1( bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@
std@
@" )
585DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@
@" )
586DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@
@" )
587DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@
@" )
590DEFINE_CXX_EXCEPTION0( exception, exception_dtor )
591DEFINE_CXX_DATA1( bad_typeid, &exception_cxx_type_info, bad_typeid_dtor )
592DEFINE_CXX_DATA1( bad_cast, &exception_cxx_type_info, bad_cast_dtor )
593DEFINE_CXX_DATA2( __non_rtti_object, &bad_typeid_cxx_type_info,
594 &exception_cxx_type_info, __non_rtti_object_dtor )
596DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor )
599void msvcrt_init_exception(void *base)
602 init_type_info_rtti(base);
603 init_exception_rtti(base);
605 init_exception_old_rtti(base);
606 init_bad_alloc_rtti(base);
608 init_bad_typeid_rtti(base);
609 init_bad_cast_rtti(base);
610 init___non_rtti_object_rtti(base);
612 init_exception_cxx(base);
613 init_bad_typeid_cxx(base);
614 init_bad_cast_cxx(base);
615 init___non_rtti_object_cxx(base);
617 init_bad_alloc_cxx(base);
623void throw_bad_alloc(void)
626 __exception_ctor(&e, "bad allocation", &bad_alloc_vtable);
646 TRACE(
"(%p) returning %p\n",
func,previous);
657 TRACE(
"returning %p\n",
data->terminate_handler);
658 return data->terminate_handler;
676 TRACE(
"(%p) returning %p\n",
func,previous);
687 TRACE(
"returning %p\n",
data->unexpected_handler);
688 return data->unexpected_handler;
698 TRACE(
"(%p) returning %p\n",
func,previous);
719 if (
data->terminate_handler)
data->terminate_handler();
729 if (
data->unexpected_handler)
data->unexpected_handler();
800 base = (
char*)obj_locator - obj_locator->object_locator;
844 if (!cppobj)
return NULL;
846 TRACE(
"obj: %p unknown: %d src: %p %s dst: %p %s do_throw: %d)\n",
882 if (!
ret && do_throw)
884 const char *
msg =
"Bad dynamic_cast!";
908 if (!cppobj)
return NULL;
910 TRACE(
"obj: %p unknown: %d src: %p %s dst: %p %s do_throw: %d)\n",
926 base = (
char*)obj_locator - obj_locator->object_locator;
939 void *this_ptr = (
char *)cppobj - obj_locator->base_class_offset;
944 if (!
ret && do_throw)
946 const char *
msg =
"Bad dynamic_cast!";
984 if (!cppobj)
return NULL;
1039 TRACE(
"(%p %p)\n", ti, ep);
1077 TRACE(
"(%p %p)\n", ti, ep);
1118void CDECL __clean_type_info_names_internal(
void *
p)
1130 if (
node && !once++)
FIXME(
"type_info_node parameter ignored\n");
1144#if _MSVCR_VER >= 100
1152 TRACE(
"(%p)\n", ep);
1158#ifdef __ASM_USE_THISCALL_WRAPPER
1162 "movl 12(%esp),%ecx\n\t"
1173#define call_dtor(type, func, object) ((void (__thiscall*)(void*))(func))(object)
1182 TRACE(
"(%p)\n", ep);
1223 TRACE(
"(%p %p)\n", ep, assign);
1242 TRACE(
"(%p)\n", ep);
1246 static const char *exception_msg =
"bad exception";
1258#if _MSVCR_VER >= 100
1261extern void call_copy_ctor(
void *
func,
void *
this,
void *
src,
int has_vbase );
1263static inline void call_copy_ctor(
void *
func,
void *
this,
void *
src,
int has_vbase )
1265 TRACE(
"calling copy ctor %p object %p src %p\n",
func,
this,
src );
1282 TRACE(
"(%p)\n", ep);
1312 else if (ti->copy_ctor)
1328 TRACE(
"(%p)\n", ep);
1359 else if (ti->copy_ctor)
1374#if _MSVCR_VER >= 110
1385#if _MSVCR_VER >= 100
1398 __ExceptionPtrDestroy(ep);
1411 ti =
type->type_info_table->info[0];
1436 __ExceptionPtrDestroy(ep);
1470 return ep1->
rec == ep2->
rec;
1482#if _MSVCR_VER >= 140
1496static void*
CDECL type_info_entry_malloc(
size_t size)
1502static void CDECL type_info_entry_free(
void *
ptr)
1511int CDECL __std_type_info_compare(
const type_info140 *
l,
const type_info140 *
r)
1515 if (
l ==
r)
ret = 0;
1516 else ret =
strcmp(
l->mangled + 1,
r->mangled + 1);
1539 type_info_entry_free(
name);
1548 TRACE(
"(%p) returning %s\n", ti, ti->name);
1571size_t CDECL __std_type_info_hash(
const type_info140 *ti)
1573 size_t hash, fnv_prime;
1577 hash = 0xcbf29ce484222325;
1578 fnv_prime = 0x100000001b3;
1581 fnv_prime = 0x1000193;
1584 TRACE(
"(%p)->%s\n", ti, ti->mangled);
1586 for(
p = ti->mangled+1; *
p;
p++) {
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
FxCollectionEntry * Next(VOID)
#define CREATE_TYPE_INFO_VTABLE
#define __ASM_VTABLE(name, funcs)
#define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name)
#define VTABLE_ADD_FUNC(name)
#define DEFINE_RTTI_DATA0(name, off, mangled_name)
#define UNDNAME_32_BIT_DECODE
#define UNDNAME_NO_ARGUMENTS
PVOID NTAPI RtlPcToFileHeader(IN PVOID PcValue, PVOID *BaseOfImage)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define HeapFree(x, y, z)
#define __EXCEPT_PAGE_FAULT
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
static const FxOffsetAndName offsets[]
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLfloat GLfloat GLfloat GLfloat h
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
static const char * dbgstr_type_info(const type_info *info)
#define CLASS_IS_SIMPLE_TYPE
#define CXX_FRAME_MAGIC_VC7
#define CXX_FRAME_MAGIC_VC6
#define CLASS_HAS_VIRTUAL_BASE_CLASS
#define CXX_FRAME_MAGIC_VC8
static void * get_this_pointer(const this_ptr_offsets *off, void *object)
void(__cdecl * _se_translator_function)(unsigned int, struct _EXCEPTION_POINTERS *)
void(__cdecl * unexpected_function)(void)
_CRTIMP int __cdecl _is_exception_typeof(const type_info &_Type, struct _EXCEPTION_POINTERS *_ExceptionPtr)
void(__cdecl * terminate_function)(void)
#define InterlockedCompareExchangePointer
#define memcpy(s1, s2, n)
static void * get_obj_locator(void *cppobj)
static vtable_ptr * get_vtable(void *obj)
thread_data_t * msvcrt_get_thread_data(void)
char *__cdecl __unDName(char *, const char *, int, malloc_func_t, free_func_t, unsigned short int)
#define __ASM_GLOBAL_FUNC(name, code)
#define DEFINE_THISCALL_WRAPPER(func, args)
static unsigned __int64 next
#define __ASM_BLOCK_BEGIN(name)
unexpected_function CDECL set_unexpected(unexpected_function func)
void __thiscall bad_typeid_dtor(bad_typeid *_this)
void WINAPI _CxxThrowException(void *object, const cxx_exception_type *type)
void *__thiscall bad_cast_scalar_dtor(bad_cast *_this, unsigned int flags)
void __cdecl __ExceptionPtrRethrow(const exception_ptr *ep)
void __thiscall type_info_dtor(type_info *_this)
const vtable_ptr bad_typeid_vtable
bad_cast *__thiscall bad_cast_copy_ctor(bad_cast *_this, const bad_cast *rhs)
void CDECL unexpected(void)
void __thiscall bad_cast_dtor(bad_cast *_this)
int __thiscall type_info_before(type_info *_this, const type_info *rhs)
void *__thiscall bad_typeid_scalar_dtor(bad_typeid *_this, unsigned int flags)
void *CDECL __RTCastToVoid(void *cppobj)
bad_cast *__thiscall bad_cast_ctor(bad_cast *_this, const char **name)
_se_translator_function CDECL _set_se_translator(_se_translator_function func)
exception __thiscall exception_default_ctor(exception *_this)
void *__thiscall bad_cast_vector_dtor(bad_cast *_this, unsigned int flags)
void CDECL terminate(void)
void *__thiscall __non_rtti_object_scalar_dtor(__non_rtti_object *_this, unsigned int flags)
static void dump_obj_locator(const rtti_object_locator *ptr)
const char *__thiscall type_info_name(type_info *_this)
const type_info *CDECL __RTtypeid(void *cppobj)
__non_rtti_object *__thiscall __non_rtti_object_copy_ctor(__non_rtti_object *_this, const __non_rtti_object *rhs)
int __thiscall type_info_opequals_equals(type_info *_this, const type_info *rhs)
void *__thiscall exception_scalar_dtor(exception *_this, unsigned int flags)
bad_typeid *__thiscall bad_typeid_copy_ctor(bad_typeid *_this, const bad_typeid *rhs)
const vtable_ptr type_info_vtable
const vtable_ptr bad_cast_vtable
void *CDECL __RTDynamicCast(void *cppobj, int unknown, type_info *src, type_info *dst, int do_throw)
void *__thiscall bad_typeid_vector_dtor(bad_typeid *_this, unsigned int flags)
const char *__thiscall type_info_raw_name(type_info *_this)
void __thiscall __non_rtti_object_dtor(__non_rtti_object *_this)
void *__thiscall __non_rtti_object_vector_dtor(__non_rtti_object *_this, unsigned int flags)
int __thiscall type_info_opnot_equals(type_info *_this, const type_info *rhs)
bad_typeid *__thiscall bad_typeid_opequals(bad_typeid *_this, const bad_typeid *rhs)
bad_cast *__thiscall bad_cast_ctor_charptr(bad_cast *_this, const char *name)
__non_rtti_object *__thiscall __non_rtti_object_opequals(__non_rtti_object *_this, const __non_rtti_object *rhs)
unexpected_function CDECL _get_unexpected(void)
bad_cast *__thiscall bad_cast_opequals(bad_cast *_this, const bad_cast *rhs)
bad_typeid *__thiscall bad_typeid_default_ctor(bad_typeid *_this)
exception __thiscall exception_ctor(exception *_this, const char **name)
exception __thiscall exception_opequals(exception *_this, const exception *rhs)
terminate_function CDECL _get_terminate(void)
bad_typeid *__thiscall bad_typeid_ctor(bad_typeid *_this, const char *name)
terminate_function CDECL set_terminate(terminate_function func)
__non_rtti_object *__thiscall __non_rtti_object_ctor(__non_rtti_object *_this, const char *name)
bad_cast *__thiscall bad_cast_default_ctor(bad_cast *_this)
exception __thiscall exception_ctor_noalloc(exception *_this, char **name, int noalloc)
const vtable_ptr __non_rtti_object_vtable
void CDECL DECLSPEC_HOTPATCH operator_delete(void *mem)
PEXCEPTION_RECORD ExceptionRecord
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
const cxx_type_info_table * type_info_table
const cxx_type_info * info[3]
const type_info * type_info
struct __type_info_node * next
const rtti_base_descriptor * bases[10]
const type_info * type_descriptor
const rtti_base_array * base_classes
const type_info * type_descriptor
const rtti_object_hierarchy * type_hierarchy
#define EH_NONCONTINUABLE
#define SLIST_ENTRY(type)
#define FIELD_OFFSET(t, f)
#define CREATE_EXCEPTION_OBJECT(exception_name)
exception __thiscall exception_copy_ctor(exception *_this, const exception *rhs)
void __thiscall exception_dtor(exception *_this)
void *__thiscall exception_vector_dtor(exception *_this, unsigned int flags)
const char *__thiscall exception_what(exception *_this)
#define InterlockedPushEntrySList(SListHead, SListEntry)
#define InterlockedFlushSList(SListHead)