Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

int kldrDyldModQuerySymbol ( PKLDRDYLDMOD  pMod,
KU32  uSymbolOrdinal,
const char *  pszSymbolName,
KUPTR *  puValue,
KU32 *  pfKind 
)

Gets the address/value of a symbol in the specified module.

Returns:
0 on success, KLDR_ERR_SYMBOL_NOT_FOUND on failure.
Parameters:
pMod The module.
uSymbolOrdinal The symbol ordinal 0. This is ignored if the name is non-zero.
pszSymbolName The symbol name. Can be NULL.
puValue Where to store the value. optional.
pfKind Where to store the symbol kind. optional.

Definition at line 1276 of file kLdrDyldMod.c.

References KLDRDYLDMOD_ASSERT, kldrDyldModFixupGetImportCallback(), KLDRMOD_BASEADDRESS_MAP, kLdrModQuerySymbol(), NULL, and KLDRDYLDMOD::pMod.

Referenced by kldrDyldDoQuerySymbol().

{
    int         rc;
    KLDRADDR    uValue = 0;
    KU32        fKind = 0;

    rc = kLdrModQuerySymbol(pMod->pMod, NULL, KLDRMOD_BASEADDRESS_MAP,
                            uSymbolOrdinal, pszSymbolName, kHlpStrLen(pszSymbolName), NULL,
                            kldrDyldModFixupGetImportCallback, pMod,
                            &uValue, &fKind);
    if (!rc)
    {
        if (puValue)
        {
            *puValue = (KUPTR)uValue;
            KLDRDYLDMOD_ASSERT(*puValue == uValue);
        }
        if (pfKind)
            *pfKind = fKind;
    }

    return rc;
}


Generated by  Doxygen 1.6.0   Back to index