View | Details | Raw Unified | Return to issue 124421
Collapse All | Expand All

(-)main/bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx (-5 / +16 lines)
Lines 39-44 Link Here
39
#include <rtl/ustrbuf.hxx>
39
#include <rtl/ustrbuf.hxx>
40
#include <osl/diagnose.h>
40
#include <osl/diagnose.h>
41
#include <osl/mutex.hxx>
41
#include <osl/mutex.hxx>
42
#include <tools/debug.hxx>
42
43
43
#include <com/sun/star/uno/genfunc.hxx>
44
#include <com/sun/star/uno/genfunc.hxx>
44
#include "com/sun/star/uno/RuntimeException.hpp"
45
#include "com/sun/star/uno/RuntimeException.hpp"
Lines 174-182 type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR Link Here
174
                // symbol and rtti-name is nearly identical,
175
                // symbol and rtti-name is nearly identical,
175
                // the symbol is prefixed with _ZTI
176
                // the symbol is prefixed with _ZTI
176
                char const * rttiName = symName.getStr() +4;
177
                char const * rttiName = symName.getStr() +4;
177
#if OSL_DEBUG_LEVEL > 1
178
#if OSL_DEBUG_LEVEL >= 1
178
                fprintf( stderr,"generated rtti for %s\n", rttiName );
179
                fprintf( stderr,"generated rtti for %s\n", rttiName );
180
                const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8);
181
                DBG_WARNING1( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr());
179
#endif
182
#endif
183
#if 0 // TODO: enable it again when the generated class_type_infos always work.
184
      // Forcing the toolchain to create authentic typeinfos is much better though
185
      // than the sick concept of reverse-engineering the platform's toolchain
186
      // and generating the missing type_infos.
180
                if (pTypeDescr->pBaseTypeDescription)
187
                if (pTypeDescr->pBaseTypeDescription)
181
                {
188
                {
182
                    // ensure availability of base
189
                    // ensure availability of base
Lines 190-199 type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR Link Here
190
                    // this class has no base class
197
                    // this class has no base class
191
                    rtti = new __class_type_info( strdup( rttiName ) );
198
                    rtti = new __class_type_info( strdup( rttiName ) );
192
                }
199
                }
193
                
200
#else
194
                pair< t_rtti_map::iterator, bool > insertion(
201
                rtti = NULL;
195
                    m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
202
#endif
196
                OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
203
204
                bool bOK = m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti )).second;
205
                OSL_ENSURE( bOK, "### inserting new generated rtti failed?!" );
197
            }
206
            }
198
            else // taking already generated rtti
207
            else // taking already generated rtti
199
            {
208
            {
Lines 213-218 type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR Link Here
213
static void deleteException( void * pExc )
222
static void deleteException( void * pExc )
214
{
223
{
215
    __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
224
    __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
225
    if( !header->exceptionType) // TODO: remove this when getRTTI() always returns non-NULL
226
        return; // NOTE: leak for now
216
    typelib_TypeDescription * pTD = 0;
227
    typelib_TypeDescription * pTD = 0;
217
    OUString unoName( toUNOname( header->exceptionType->name() ) );
228
    OUString unoName( toUNOname( header->exceptionType->name() ) );
218
    ::typelib_typedescription_getByName( &pTD, unoName.pData );
229
    ::typelib_typedescription_getByName( &pTD, unoName.pData );
(-)main/bridges/source/cpp_uno/s5abi_macosx_x86-64/share.hxx (+4 lines)
Lines 85-90 extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); Link Here
85
85
86
// -----
86
// -----
87
87
88
#if 0 // #i124421# disabled because its use in except.cxx is disabled
89
88
// on OSX 64bit the class_type_info classes are specified
90
// on OSX 64bit the class_type_info classes are specified
89
// in http://refspecs.linuxbase.org/cxxabi-1.86.html#rtti but
91
// in http://refspecs.linuxbase.org/cxxabi-1.86.html#rtti but
90
// these details are not generally available in a public header
92
// these details are not generally available in a public header
Lines 106-111 public: Link Here
106
        {}
108
        {}
107
};
109
};
108
110
111
#endif
112
109
//==================================================================================================
113
//==================================================================================================
110
void raiseException(
114
void raiseException(
111
    uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
115
    uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );

Return to issue 124421