VirtualBox

Ignore:
Timestamp:
Aug 4, 2018 7:41:30 PM (6 years ago)
Author:
vboxsync
Message:

IPRT: Added single stack frame unwind function to RTDbgMod and RTLdr, copying over the PoC from DBGFRStack.cpp. bugref:3897

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp

    r73442 r73494  
    3434
    3535#include <iprt/assert.h>
     36#include <iprt/dbg.h>
    3637#include <iprt/err.h>
    3738#include <iprt/log.h>
     
    708709
    709710
     711RTDECL(int) RTLdrUnwindFrame(RTLDRMOD hLdrMod, void const *pvBits, uint32_t iSeg, RTLDRADDR off, PRTDBGUNWINDSTATE pState)
     712{
     713    /*
     714     * Validate.
     715     */
     716    AssertMsgReturn(rtldrIsValid(hLdrMod), ("hLdrMod=%p\n", hLdrMod), VERR_INVALID_HANDLE);
     717    PRTLDRMODINTERNAL pMod = (PRTLDRMODINTERNAL)hLdrMod;
     718    AssertPtr(pState);
     719    AssertReturn(pState->u32Magic == RTDBGUNWINDSTATE_MAGIC, VERR_INVALID_MAGIC);
     720
     721    /*
     722     * Pass on the work.
     723     */
     724    if (pMod->pOps->pfnUnwindFrame)
     725        return pMod->pOps->pfnUnwindFrame(pMod, pvBits, iSeg, off, pState);
     726    return VERR_DBG_NO_UNWIND_INFO;
     727}
     728RT_EXPORT_SYMBOL(RTLdrUnwindFrame);
     729
     730
    710731/**
    711732 * Internal method used by the IPRT debug bits.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette