VirtualBox

Changeset 73494 in vbox for trunk/src/VBox/Runtime/include


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

Location:
trunk/src/VBox/Runtime/include/internal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/dbgmod.h

    r73412 r73494  
    243243    DECLCALLBACKMEMBER(int, pfnQueryProp)(PRTDBGMODINT pMod, RTLDRPROP enmProp, void *pvBuf, size_t cbBuf, size_t *pcbRet);
    244244
     245    /**
     246     * Try use unwind information to unwind one frame.
     247     *
     248     * @returns IPRT status code.  Last informational status from stack reader callback.
     249     * @retval  VERR_DBG_NO_UNWIND_INFO if the module contains no unwind information.
     250     * @retval  VERR_DBG_UNWIND_INFO_NOT_FOUND if no unwind information was found
     251     *          for the location given by iSeg:off.
     252     *
     253     * @param   pMod        Pointer to the module structure.
     254     * @param   iSeg        The segment number of the program counter.
     255     * @param   off         The offset into @a iSeg.  Together with @a iSeg
     256     *                      this corresponds to the RTDBGUNWINDSTATE::uPc
     257     *                      value pointed to by @a pState.
     258     * @param   pState      The unwind state to work.
     259     *
     260     * @sa      RTLdrUnwindFrame, RTDbgModUnwindFrame
     261     */
     262    DECLCALLBACKMEMBER(int, pfnUnwindFrame)(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTDBGUNWINDSTATE pState);
     263
    245264    /** For catching initialization errors (RTDBGMODVTIMG_MAGIC). */
    246265    uint32_t    u32EndMagic;
     
    512531     *                      number.
    513532     */
    514     DECLCALLBACKMEMBER(int, pfnLineByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE pLineInfo);
    515 
     533    DECLCALLBACKMEMBER(int, pfnLineByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off,
     534                                           PRTINTPTR poffDisp, PRTDBGLINE pLineInfo);
     535
     536    /**
     537     * Try use unwind information to unwind one frame.
     538     *
     539     * @returns IPRT status code.  Last informational status from stack reader callback.
     540     * @retval  VERR_DBG_NO_UNWIND_INFO if the module contains no unwind information.
     541     * @retval  VERR_DBG_UNWIND_INFO_NOT_FOUND if no unwind information was found
     542     *          for the location given by iSeg:off.
     543     *
     544     * @param   pMod        Pointer to the module structure.
     545     * @param   iSeg        The segment number of the program counter.
     546     * @param   off         The offset into @a iSeg.  Together with @a iSeg
     547     *                      this corresponds to the RTDBGUNWINDSTATE::uPc
     548     *                      value pointed to by @a pState.
     549     * @param   pState      The unwind state to work.
     550     *
     551     * @sa      RTDbgModUnwindFrame
     552     */
     553    DECLCALLBACKMEMBER(int, pfnUnwindFrame)(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTDBGUNWINDSTATE pState);
    516554
    517555    /** For catching initialization errors (RTDBGMODVTDBG_MAGIC). */
  • trunk/src/VBox/Runtime/include/internal/ldr.h

    r73150 r73494  
    402402    DECLCALLBACKMEMBER(int, pfnHashImage)(PRTLDRMODINTERNAL pMod, RTDIGESTTYPE enmDigest, char *pszDigest, size_t cbDigest);
    403403
     404        /**
     405     * Try use unwind information to unwind one frame.
     406     *
     407     * @returns IPRT status code.  Last informational status from stack reader callback.
     408     * @retval  VERR_DBG_NO_UNWIND_INFO if the module contains no unwind information.
     409     * @retval  VERR_DBG_UNWIND_INFO_NOT_FOUND if no unwind information was found
     410     *          for the location given by iSeg:off.
     411     *
     412     * @param   pMod        Pointer to the module structure.
     413     * @param   pvBits      Pointer to the bits returned by
     414     *                      RTLDROPS::pfnGetBits(), optional.
     415     * @param   iSeg        The segment number of the program counter.  UINT32_MAX for RVA.
     416     * @param   off         The offset into @a iSeg.  Together with @a iSeg
     417     *                      this corresponds to the RTDBGUNWINDSTATE::uPc
     418     *                      value pointed to by @a pState.
     419     * @param   pState      The unwind state to work.
     420     *
     421     * @sa      RTLdrUnwindFrame, RTDbgModUnwindFrame
     422     */
     423    DECLCALLBACKMEMBER(int, pfnUnwindFrame)(PRTLDRMODINTERNAL pMod, void const *pvBits, uint32_t iSeg, RTUINTPTR off,
     424                                            PRTDBGUNWINDSTATE pState);
     425
    404426    /** Dummy entry to make sure we've initialized it all. */
    405427    RTUINT uDummy;
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