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

static int kldrModNativeGetStackInfo ( PKLDRMOD  pMod,
const void *  pvBits,
KLDRADDR  BaseAddress,
PKLDRSTACKINFO  pStackInfo 
) [static]

Gets the image stack info.

Returns:
0 on success, non-zero on failure.
Parameters:
pMod 
pvBits Optional pointer to bits returned by kLdrModGetBits() currently located at BaseAddress. This can be used by some module interpreters to reduce memory consumption.
BaseAddress The module base address to use when calculating the stack address. There are two special values that can be used: KLDRMOD_BASEADDRESS_LINK and KLDRMOD_BASEADDRESS_MAP.
pStackInfo The stack information.

Todo:
implement stack info on OS/2.

Definition at line 834 of file kLdrModNative.c.

References KLDRSTACKINFO::Address, KLDRSTACKINFO::cbStack, KLDRSTACKINFO::cbStackThread, K_OS_OS2, KLDR_ERR_TODO, KLDRSTACKINFO::LinkAddress, NIL_KLDRADDR, and KLDRMOD::pvData.

{
    PKLDRMODNATIVE pModNative = (PKLDRMODNATIVE)pMod->pvData;
#if K_OS == K_OS_OS2

    /** @todo implement stack info on OS/2. */
    (void)pModNative;
    return ERROR_NOT_SUPPORTED;

#elif K_OS == K_OS_WINDOWS || defined(__NT__)
    pStackInfo->Address = NIL_KLDRADDR;
    pStackInfo->LinkAddress = NIL_KLDRADDR;
    pStackInfo->cbStack = pStackInfo->cbStackThread = pModNative->pNtHdrs->OptionalHeader.SizeOfStackReserve;

    return 0;

#elif K_OS == K_OS_DARWIN
    /** @todo Implement stack info on Darwin. */
    (void)pModNative;
    return KLDR_ERR_TODO;

#else
# error "Port me"
#endif
}


Generated by  Doxygen 1.6.0   Back to index