83 TRACE(
"%p: sig=%08x base_offset=%08x flags=%08x type=%p %s hierarchy=%p\n",
86 TRACE(
" hierarchy: sig=%08x attr=%08x len=%d base classes=%p\n",
87 h->signature,
h->attributes,
h->array_len,
rtti_rva(
h->base_classes,
base) );
88 for (
i = 0;
i <
h->array_len;
i++)
93 TRACE(
" base class %p: num %d off %d,%d,%d attr %08x type %p %s\n",
108 return __exception_ctor(_this, *
name, &exception_vtable);
118 _this->vtable = &exception_vtable;
120 _this->do_free =
FALSE;
130 TRACE(
"(%p)\n", _this);
131 return __exception_ctor(_this,
NULL, &exception_vtable);
140 TRACE(
"(%p %p)\n", _this, rhs);
146 TRACE(
"name = %s\n", _this->name);
168 TRACE(
"(%p %p)\n", _this, rhs);
197 TRACE(
"(%p)\n", _this);
207 TRACE(
"(%p %p)\n", _this, rhs);
254 TRACE(
"(%p %p)\n", _this, rhs);
275 TRACE(
"(%p)\n", _this);
286 TRACE(
"(%p %p)\n", _this, rhs);
343 TRACE(
"(%p %p)\n", _this, rhs);
372 TRACE(
"(%p)\n", _this);
382 TRACE(
"(%p %p)\n", _this, rhs);
428 int ret = !
strcmp(_this->mangled + 1, rhs->mangled + 1);
429 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
439 int ret = !!
strcmp(_this->mangled + 1, rhs->mangled + 1);
440 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
450 int ret =
strcmp(_this->mangled + 1, rhs->mangled + 1) < 0;
451 TRACE(
"(%p %p) returning %d\n", _this, rhs,
ret);
461 TRACE(
"(%p)\n", _this);
495 TRACE(
"(%p) returning %s\n", _this, _this->name);
505 TRACE(
"(%p) returning %s\n", _this, _this->mangled);
506 return _this->mangled;
516bad_alloc *
__thiscall bad_alloc_copy_ctor(bad_alloc * _this,
const bad_alloc * rhs)
518 TRACE(
"(%p %p)\n", _this, rhs);
519 return __exception_copy_ctor(_this, rhs, &bad_alloc_vtable);
525 TRACE(
"(%p)\n", _this);
556DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@
std@
@" )
557DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@
std@
@" )
558DEFINE_RTTI_DATA1( bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@
std@
@" )
560DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@
@" )
561DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@
@" )
562DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@
@" )
565DEFINE_CXX_DATA0( exception, exception_dtor )
566DEFINE_CXX_DATA1( bad_typeid, &exception_cxx_type_info, bad_typeid_dtor )
567DEFINE_CXX_DATA1( bad_cast, &exception_cxx_type_info, bad_cast_dtor )
568DEFINE_CXX_DATA2( __non_rtti_object, &bad_typeid_cxx_type_info,
569 &exception_cxx_type_info, __non_rtti_object_dtor )
571DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor )
574void msvcrt_init_exception(void *base)
577 init_type_info_rtti(base);
578 init_exception_rtti(base);
580 init_exception_old_rtti(base);
581 init_bad_alloc_rtti(base);
583 init_bad_typeid_rtti(base);
584 init_bad_cast_rtti(base);
585 init___non_rtti_object_rtti(base);
587 init_exception_cxx(base);
588 init_bad_typeid_cxx(base);
589 init_bad_cast_cxx(base);
590 init___non_rtti_object_cxx(base);
592 init_bad_alloc_cxx(base);
598void throw_bad_alloc(void)
601 __exception_ctor(&e, "bad allocation", &bad_alloc_vtable);
609 __exception_ctor(&
e,
msg, &exception_vtable);
628 TRACE(
"(%p) returning %p\n",
func,previous);
639 TRACE(
"returning %p\n",
data->terminate_handler);
640 return data->terminate_handler;
658 TRACE(
"(%p) returning %p\n",
func,previous);
669 TRACE(
"returning %p\n",
data->unexpected_handler);
670 return data->unexpected_handler;
680 TRACE(
"(%p) returning %p\n",
func,previous);
701 if (
data->terminate_handler)
data->terminate_handler();
711 if (
data->unexpected_handler)
data->unexpected_handler();
790 if (!cppobj)
return NULL;
792 TRACE(
"obj: %p unknown: %d src: %p %s dst: %p %s do_throw: %d)\n",
830 if (!
ret && do_throw)
832 const char *
msg =
"Bad dynamic_cast!";
869 if (!cppobj)
return NULL;
911 TRACE(
"(%p %p)\n", ti, ep);
950void CDECL __clean_type_info_names_internal(
void *
p)
962 if (
node && !once++)
FIXME(
"type_info_node parameter ignored\n");
988static void*
CDECL type_info_entry_malloc(
size_t size)
994static void CDECL type_info_entry_free(
void *
ptr)
1007 if (
l ==
r)
ret = 0;
1008 else ret =
strcmp(
l->mangled + 1,
r->mangled + 1);
1031 type_info_entry_free(
name);
1040 TRACE(
"(%p) returning %s\n", ti, ti->
name);
1065 size_t hash, fnv_prime;
1069 hash = 0xcbf29ce484222325;
1070 fnv_prime = 0x100000001b3;
1073 fnv_prime = 0x1000193;
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
FxCollectionEntry * Next(VOID)
#define UNDNAME_32_BIT_DECODE
#define UNDNAME_NO_ARGUMENTS
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define __EXCEPT_PAGE_FAULT
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
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 throw_exception(const char *msg)
void *__thiscall bad_cast_scalar_dtor(bad_cast *_this, unsigned int flags)
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)
static const vtable_ptr * get_vtable(void *obj)
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)
static uintptr_t get_obj_locator_base(const rtti_object_locator *ptr)
__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
static const rtti_object_locator * get_obj_locator(void *cppobj)
static const char * dbgstr_type_info(const type_info *info)
#define CXX_FRAME_MAGIC_VC6
static BOOL is_cxx_exception(EXCEPTION_RECORD *rec)
#define CREATE_EXCEPTION_OBJECT(exception_name)
#define CXX_EXCEPTION_PARAMS
static void * get_this_pointer(const this_ptr_offsets *off, void *object)
#define CREATE_TYPE_INFO_VTABLE
#define __ASM_VTABLE(name, funcs)
static void * rtti_rva(unsigned int rva, uintptr_t base)
#define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name)
#define VTABLE_ADD_FUNC(name)
#define DEFINE_RTTI_DATA0(name, off, mangled_name)
static uintptr_t rtti_rva_base(const void *ptr)
void CDECL DECLSPEC_HOTPATCH operator_delete(void *mem)
void(__cdecl * _se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info)
void(__cdecl * unexpected_function)(void)
void(__cdecl * terminate_function)(void)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
thread_data_t *CDECL msvcrt_get_thread_data(void)
char *__cdecl __unDName(char *, const char *, int, malloc_func_t, free_func_t, unsigned short int)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
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
#define InterlockedCompareExchangePointer
void __thiscall exception_dtor(exception *_this)
void *__thiscall exception_vector_dtor(exception *_this, unsigned int flags)
#define __non_rtti_object
exception *__thiscall exception_copy_ctor(exception *_this, const exception *rhs)
const char *__thiscall exception_what(exception *_this)
#define DEFINE_THISCALL_WRAPPER(func, args)
static unsigned __int64 next
_CRTIMP int __cdecl _is_exception_typeof(const type_info &_Type, struct _EXCEPTION_POINTERS *_ExceptionPtr)
PEXCEPTION_RECORD ExceptionRecord
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
struct __type_info_node * next
unsigned int type_info_table
unsigned int type_descriptor
unsigned int base_classes
unsigned int type_hierarchy
unsigned int type_descriptor
#define EXCEPTION_NONCONTINUABLE
#define SLIST_ENTRY(type)
#define FIELD_OFFSET(t, f)
#define __ASM_BLOCK_BEGIN(name)
#define InterlockedPushEntrySList(SListHead, SListEntry)
#define InterlockedFlushSList(SListHead)