VirtualBox

Changeset 75130 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Oct 28, 2018 5:22:31 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/dbgmod: Don't assume pfnUnwindFrame is always present. bugref:3897

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp

    r74980 r75130  
    22292229     * Try the debug module first, then the image.
    22302230     */
    2231     int rc = pDbgMod->pDbgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
    2232     if (rc == VERR_DBG_NO_UNWIND_INFO)
    2233         rc = pDbgMod->pImgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
    2234     else if (rc == VERR_DBG_UNWIND_INFO_NOT_FOUND)
    2235     {
    2236         rc = pDbgMod->pImgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
     2231    int rc = VERR_DBG_NO_UNWIND_INFO;
     2232    if (pDbgMod->pDbgVt->pfnUnwindFrame)
     2233        rc = pDbgMod->pDbgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
     2234    if (   (   rc == VERR_DBG_NO_UNWIND_INFO
     2235            || rc == VERR_DBG_UNWIND_INFO_NOT_FOUND)
     2236        && pDbgMod->pImgVt
     2237        && pDbgMod->pImgVt->pfnUnwindFrame)
     2238    {
    22372239        if (rc == VERR_DBG_NO_UNWIND_INFO)
    2238             rc = VERR_DBG_UNWIND_INFO_NOT_FOUND;
     2240            rc = pDbgMod->pImgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
     2241        else
     2242        {
     2243            rc = pDbgMod->pImgVt->pfnUnwindFrame(pDbgMod, iSeg, off, pState);
     2244            if (rc == VERR_DBG_NO_UNWIND_INFO)
     2245                rc = VERR_DBG_UNWIND_INFO_NOT_FOUND;
     2246        }
    22392247    }
    22402248
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