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,
namespace
{
unsigned char *codeSnippet(sal_Int32 functionIndex,
sal_Int32 vtableOffset, bool bHasHiddenParam)
unsigned char *codeSnippet(const typelib_InterfaceTypeDescription *type,
const typelib_TypeDescription *member,
sal_Int32 functionIndex,
sal_Int32 vtableOffset,
bool bHasHiddenParam)
{
assert(functionIndex < nFunIndexes);
if (!(functionIndex < nFunIndexes))
......@@ -484,7 +487,7 @@ namespace
int index = functionIndex*nVtableOffsets*2 + vtableOffset*2 + bHasHiddenParam;
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;
}
......@@ -534,15 +537,16 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( member );
// Getter:
(s++)->fn = codeSnippet(
functionOffset++, vtableOffset,
arm::return_in_hidden_param( pAttrTD->pAttributeTypeRef ));
(s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset,
arm::return_in_hidden_param( pAttrTD->pAttributeTypeRef ));
// Setter:
if (!pAttrTD->bReadOnly)
{
(s++)->fn = codeSnippet(
functionOffset++, vtableOffset, false);
(s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset,
false);
}
break;
}
......@@ -552,8 +556,9 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast<
typelib_InterfaceMethodTypeDescription * >(member);
(s++)->fn = codeSnippet(functionOffset++, vtableOffset,
arm::return_in_hidden_param(pMethodTD->pReturnTypeRef));
(s++)->fn = codeSnippet(type, member,
functionOffset++, vtableOffset,
arm::return_in_hidden_param(pMethodTD->pReturnTypeRef));
break;
}
default:
......
......@@ -119,8 +119,6 @@ void dummy_can_throw_anything( char const * )
static OUString toUNOname( char const * p ) SAL_THROW(())
{
char const * start = p;
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
OUStringBuffer buf( 64 );
......@@ -144,8 +142,6 @@ static OUString toUNOname( char const * p ) SAL_THROW(())
OUString result( buf.makeStringAndClear() );
SAL_INFO( "bridges.ios", "toUNOname(" << start << "): " << result );
return result;
}
......@@ -207,11 +203,11 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SA
buf.append( 'E' );
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() );
if (rtti)
{
SAL_INFO( "bridges.ios", "getRTTI: dlsym() found type_info for " << unoName );
std::pair< t_rtti_map::iterator, bool > insertion(
m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
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