diff --git main/bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx main/bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx index 896e0112a86f..c145e9022270 100644 --- main/bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx +++ main/bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "com/sun/star/uno/RuntimeException.hpp" @@ -174,9 +175,15 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR // symbol and rtti-name is nearly identical, // the symbol is prefixed with _ZTI char const * rttiName = symName.getStr() +4; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL >= 1 fprintf( stderr,"generated rtti for %s\n", rttiName ); + const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8); + DBG_WARNING1( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr()); #endif +#if 0 // TODO: enable it again when the generated class_type_infos always work. + // Forcing the toolchain to create authentic typeinfos is much better though + // than the sick concept of reverse-engineering the platform's toolchain + // and generating the missing type_infos. if (pTypeDescr->pBaseTypeDescription) { // ensure availability of base @@ -190,10 +197,12 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR // this class has no base class rtti = new __class_type_info( strdup( rttiName ) ); } - - pair< t_rtti_map::iterator, bool > insertion( - m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); - OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" ); +#else + rtti = NULL; +#endif + + bool bOK = m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti )).second; + OSL_ENSURE( bOK, "### inserting new generated rtti failed?!" ); } else // taking already generated rtti { @@ -213,6 +222,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR static void deleteException( void * pExc ) { __cxa_exception const * header = ((__cxa_exception const *)pExc - 1); + if( !header->exceptionType) // TODO: remove this when getRTTI() always returns non-NULL + return; // NOTE: leak for now typelib_TypeDescription * pTD = 0; OUString unoName( toUNOname( header->exceptionType->name() ) ); ::typelib_typedescription_getByName( &pTD, unoName.pData ); diff --git main/bridges/source/cpp_uno/s5abi_macosx_x86-64/share.hxx main/bridges/source/cpp_uno/s5abi_macosx_x86-64/share.hxx index 471dad033737..b64609dd82d1 100644 --- main/bridges/source/cpp_uno/s5abi_macosx_x86-64/share.hxx +++ main/bridges/source/cpp_uno/s5abi_macosx_x86-64/share.hxx @@ -85,6 +85,8 @@ extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); // ----- +#if 0 // #i124421# disabled because its use in except.cxx is disabled + // on OSX 64bit the class_type_info classes are specified // in http://refspecs.linuxbase.org/cxxabi-1.86.html#rtti but // these details are not generally available in a public header @@ -106,6 +108,8 @@ public: {} }; +#endif + //================================================================================================== void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );