Kaydet (Commit) 5dcd5383 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

More informative logging

Change-Id: I71b04086ae0418f0a6c988fc71c1e5fee6eed690
üst 792c20bf
...@@ -467,8 +467,11 @@ extern "C" sal_Int64 cpp_vtable_call( long *pFunctionAndOffset, ...@@ -467,8 +467,11 @@ extern "C" sal_Int64 cpp_vtable_call( long *pFunctionAndOffset,
namespace namespace
{ {
unsigned char *codeSnippet(sal_Int32 functionIndex, unsigned char *codeSnippet(const typelib_InterfaceTypeDescription *type,
sal_Int32 vtableOffset, bool bHasHiddenParam) const typelib_TypeDescription *member,
sal_Int32 functionIndex,
sal_Int32 vtableOffset,
bool bHasHiddenParam)
{ {
assert(functionIndex < nFunIndexes); assert(functionIndex < nFunIndexes);
if (!(functionIndex < nFunIndexes)) if (!(functionIndex < nFunIndexes))
...@@ -484,7 +487,7 @@ namespace ...@@ -484,7 +487,7 @@ namespace
int index = functionIndex*nVtableOffsets*2 + vtableOffset*2 + bHasHiddenParam; int index = functionIndex*nVtableOffsets*2 + vtableOffset*2 + bHasHiddenParam;
unsigned char *result = ((unsigned char *) &codeSnippets) + codeSnippets[index]; unsigned char *result = ((unsigned char *) &codeSnippets) + codeSnippets[index];
SAL_INFO( "bridges.ios", "codeSnippet: [" << functionIndex << "," << vtableOffset << "," << (int)bHasHiddenParam << "]=" << (void *) result << " (" << std::hex << ((int*)result)[0] << "," << ((int*)result)[1] << "," << ((int*)result)[2] << "," << ((int*)result)[3] << ")"); SAL_INFO( "bridges.ios", "codeSnippet(" << OUString(type->aBase.pTypeName) << "::" << OUString(member->pTypeName) << "): [" << functionIndex << "," << vtableOffset << "," << (int)bHasHiddenParam << "]=" << (void *) result << " (" << std::hex << ((int*)result)[0] << "," << ((int*)result)[1] << "," << ((int*)result)[2] << "," << ((int*)result)[3] << ")");
return result; return result;
} }
...@@ -534,15 +537,16 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( ...@@ -534,15 +537,16 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( member ); reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( member );
// Getter: // Getter:
(s++)->fn = codeSnippet( (s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset, functionOffset++, vtableOffset,
arm::return_in_hidden_param( pAttrTD->pAttributeTypeRef )); arm::return_in_hidden_param( pAttrTD->pAttributeTypeRef ));
// Setter: // Setter:
if (!pAttrTD->bReadOnly) if (!pAttrTD->bReadOnly)
{ {
(s++)->fn = codeSnippet( (s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset, false); functionOffset++, vtableOffset,
false);
} }
break; break;
} }
...@@ -552,7 +556,8 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( ...@@ -552,7 +556,8 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast< reinterpret_cast<
typelib_InterfaceMethodTypeDescription * >(member); typelib_InterfaceMethodTypeDescription * >(member);
(s++)->fn = codeSnippet(functionOffset++, vtableOffset, (s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset,
arm::return_in_hidden_param(pMethodTD->pReturnTypeRef)); arm::return_in_hidden_param(pMethodTD->pReturnTypeRef));
break; break;
} }
......
...@@ -119,8 +119,6 @@ void dummy_can_throw_anything( char const * ) ...@@ -119,8 +119,6 @@ void dummy_can_throw_anything( char const * )
static OUString toUNOname( char const * p ) SAL_THROW(()) static OUString toUNOname( char const * p ) SAL_THROW(())
{ {
char const * start = p;
// example: N3com3sun4star4lang24IllegalArgumentExceptionE // example: N3com3sun4star4lang24IllegalArgumentExceptionE
OUStringBuffer buf( 64 ); OUStringBuffer buf( 64 );
...@@ -144,8 +142,6 @@ static OUString toUNOname( char const * p ) SAL_THROW(()) ...@@ -144,8 +142,6 @@ static OUString toUNOname( char const * p ) SAL_THROW(())
OUString result( buf.makeStringAndClear() ); OUString result( buf.makeStringAndClear() );
SAL_INFO( "bridges.ios", "toUNOname(" << start << "): " << result );
return result; return result;
} }
...@@ -207,11 +203,11 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SA ...@@ -207,11 +203,11 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SA
buf.append( 'E' ); buf.append( 'E' );
OString symName( buf.makeStringAndClear() ); OString symName( buf.makeStringAndClear() );
SAL_INFO( "bridges.ios", "getRTTI: calling dlsym() for type_info for " << unoName );
rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() ); rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
if (rtti) if (rtti)
{ {
SAL_INFO( "bridges.ios", "getRTTI: dlsym() found type_info for " << unoName );
std::pair< t_rtti_map::iterator, bool > insertion( std::pair< t_rtti_map::iterator, bool > insertion(
m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
SAL_WARN_IF( !insertion.second, SAL_WARN_IF( !insertion.second,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment