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

More informative logging in codeSnippet()

Change-Id: I51bceba0918928812daca3a2c92633b6998b380c
üst 86a372ad
...@@ -461,7 +461,9 @@ extern "C" sal_Int64 cpp_vtable_call( sal_Int32 *pFunctionAndOffset, ...@@ -461,7 +461,9 @@ extern "C" sal_Int64 cpp_vtable_call( sal_Int32 *pFunctionAndOffset,
namespace namespace
{ {
unsigned char *codeSnippet(sal_Int32 functionIndex, unsigned char *codeSnippet(const typelib_InterfaceTypeDescription *type,
const typelib_TypeDescription *member,
sal_Int32 functionIndex,
sal_Int32 vtableOffset) sal_Int32 vtableOffset)
{ {
assert(functionIndex < nFunIndexes); assert(functionIndex < nFunIndexes);
...@@ -477,7 +479,7 @@ namespace ...@@ -477,7 +479,7 @@ namespace
int index = functionIndex*nVtableOffsets + vtableOffset; int index = functionIndex*nVtableOffsets + vtableOffset;
unsigned char *result = ((unsigned char *) &codeSnippets) + codeSnippets[index]; unsigned char *result = ((unsigned char *) &codeSnippets) + codeSnippets[index];
SAL_INFO( "bridges.ios", "codeSnippet: [" << functionIndex << "," << vtableOffset << "]=" << (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 << "]=" << (void *) result << " (" << std::hex << ((int*)result)[0] << "," << ((int*)result)[1] << "," << ((int*)result)[2] << "," << ((int*)result)[3] << ")");
return result; return result;
} }
...@@ -530,18 +532,18 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( ...@@ -530,18 +532,18 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( member ); reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( member );
// Getter: // Getter:
(s++)->fn = codeSnippet( functionOffset++, vtableOffset ); (s++)->fn = codeSnippet( type, member, functionOffset++, vtableOffset );
// Setter: // Setter:
if (!pAttrTD->bReadOnly) if (!pAttrTD->bReadOnly)
{ {
(s++)->fn = codeSnippet( functionOffset++, vtableOffset ); (s++)->fn = codeSnippet( type, member, functionOffset++, vtableOffset );
} }
break; break;
} }
case typelib_TypeClass_INTERFACE_METHOD: case typelib_TypeClass_INTERFACE_METHOD:
{ {
(s++)->fn = codeSnippet( functionOffset++, vtableOffset ); (s++)->fn = codeSnippet( type, member, functionOffset++, vtableOffset );
break; break;
} }
default: default:
......
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