From 1be46548421aab77c7a9262081459ddc28fe5a3b Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 6 May 2014 16:24:49 +0200 Subject: [PATCH] msvcr80: Update exceptions RTTI data to reflect it's part of std namespace. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/cpp.c | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 72cf6f3624c..0cc8fcbb7fe 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -226,7 +226,7 @@ @ extern ??_7__non_rtti_object@std@@6B@ MSVCRT___non_rtti_object_vtable @ extern ??_7bad_cast@std@@6B@ MSVCRT_bad_cast_vtable @ extern ??_7bad_typeid@std@@6B@ MSVCRT_bad_typeid_vtable -@ extern ??_7exception@@6B@ MSVCRT_exception_vtable +@ extern ??_7exception@@6B@ MSVCRT_exception_old_vtable @ extern ??_7exception@std@@6B@ MSVCRT_exception_vtable @ stub -arch=win32 ??_F?$_SpinWait@$00@details@Concurrency@@QAEXXZ @ stub -arch=win64 ??_F?$_SpinWait@$00@details@Concurrency@@QEAAXXZ diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index ef70cf13c5d..13ea9f01a75 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -54,7 +54,7 @@ @ extern ??_7__non_rtti_object@std@@6B@ MSVCRT___non_rtti_object_vtable @ extern ??_7bad_cast@std@@6B@ MSVCRT_bad_cast_vtable @ extern ??_7bad_typeid@std@@6B@ MSVCRT_bad_typeid_vtable -@ extern ??_7exception@@6B@ MSVCRT_exception_vtable +@ extern ??_7exception@@6B@ MSVCRT_exception_old_vtable @ extern ??_7exception@std@@6B@ MSVCRT_exception_vtable @ thiscall -arch=i386 ??_Fbad_cast@std@@QAEXXZ(ptr) MSVCRT_bad_cast_default_ctor @ cdecl -arch=win64 ??_Fbad_cast@std@@QEAAXXZ(ptr) MSVCRT_bad_cast_default_ctor diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 161d224e185..710cb15c2c2 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -54,7 +54,7 @@ @ extern ??_7__non_rtti_object@std@@6B@ MSVCRT___non_rtti_object_vtable @ extern ??_7bad_cast@std@@6B@ MSVCRT_bad_cast_vtable @ extern ??_7bad_typeid@std@@6B@ MSVCRT_bad_typeid_vtable -@ extern ??_7exception@@6B@ MSVCRT_exception_vtable +@ extern ??_7exception@@6B@ MSVCRT_exception_old_vtable @ extern ??_7exception@std@@6B@ MSVCRT_exception_vtable @ thiscall -arch=i386 ??_Fbad_cast@std@@QAEXXZ(ptr) MSVCRT_bad_cast_default_ctor @ cdecl -arch=win64 ??_Fbad_cast@std@@QEAAXXZ(ptr) MSVCRT_bad_cast_default_ctor diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index e392208cbb1..50c2681270a 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -658,6 +658,11 @@ __ASM_VTABLE(type_info, __ASM_VTABLE(exception, VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) VTABLE_ADD_FUNC(MSVCRT_what_exception)); +#if _MSVCR_VER >= 80 +__ASM_VTABLE(exception_old, + VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) + VTABLE_ADD_FUNC(MSVCRT_what_exception)); +#endif __ASM_VTABLE(bad_typeid, VTABLE_ADD_FUNC(MSVCRT_bad_typeid_vector_dtor) VTABLE_ADD_FUNC(MSVCRT_what_exception)); @@ -673,10 +678,18 @@ __ASM_VTABLE(__non_rtti_object, #endif DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) +#if _MSVCR_VER >= 80 +DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@std@@" ) +DEFINE_RTTI_DATA0( exception_old, 0, ".?AVexception@@" ) +DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@std@@" ) +DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@std@@" ) +DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@std@@" ) +#else DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@@" ) DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@@" ) DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@@" ) DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@@" ) +#endif DEFINE_EXCEPTION_TYPE_INFO( exception, 0, NULL, NULL ) DEFINE_EXCEPTION_TYPE_INFO( bad_typeid, 1, &exception_cxx_type_info, NULL ) @@ -688,6 +701,9 @@ void msvcrt_init_exception(void *base) #ifdef __x86_64__ init_type_info_rtti(base); init_exception_rtti(base); +#if _MSVCR_VER >= 80 + init_exception_old_rtti(base); +#endif init_bad_typeid_rtti(base); init_bad_cast_rtti(base); init___non_rtti_object_rtti(base);