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

static int kldrModPEHasDbgInfo ( PKLDRMOD  pMod,
const void *  pvBits 
) [static]

Checks if the module has debug info embedded or otherwise associated with it.

Returns:
0 if it has debug info, KLDR_ERR_NO_DEBUG_INFO if no debug info, and non-zero OS or kLdr status code on failure.
Parameters:
pMod The module.
pvBits Optional pointer to bits returned by kLdrModGetBits(). This can be used by some module interpreters to reduce memory consumption.

Definition at line 1214 of file kLdrModPE.c.

References KLDRMODPE::Hdrs, KLDR_ERR_NO_DEBUG_INFO, and KLDRMOD::pvData.

{
    PKLDRMODPE pModPE = (PKLDRMODPE)pMod->pvData;

    /*
     * Base this entirely on the presence of a debug directory.
     */
    if (    pModPE->Hdrs.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG].Size
            < sizeof(IMAGE_DEBUG_DIRECTORY) /* screw borland linkers */
        ||  !pModPE->Hdrs.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress)
        return KLDR_ERR_NO_DEBUG_INFO;
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index