VirtualBox

Ignore:
Timestamp:
Jun 7, 2009 9:11:41 AM (15 years ago)
Author:
vboxsync
Message:

IPRT: some dbgmod bits.

File:
1 edited

Legend:

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

    r19559 r20355  
    2424
    2525#include <iprt/types.h>
     26#include <iprt/critsect.h>
    2627#include "internal/magics.h"
    2728
     
    134135
    135136    /**
     137     * Adds a symbol to the module (optional).
     138     *
     139     * This method is used to implement DBGFR3SymbolAdd.
     140     *
     141     * @returns VBox status code.
     142     * @retval  VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
     143     *
     144     * @param   pMod        Pointer to the module structure.
     145     * @param   pszSymbol   The symbol name.
     146     * @param   iSeg        The segment number (0-based). RTDBGMOD_SEG_RVA can be used.
     147     * @param   off         The offset into the segment.
     148     * @param   cbSymbol    The area covered by the symbol. 0 is fine.
     149     */
     150    DECLCALLBACKMEMBER(int, pfnSymbolAdd)(PRTDBGMODINT pMod, const char *pszSymbol, uint32_t iSeg, RTGCUINTPTR off, RTUINT cbSymbol);
     151
     152    /**
    136153     * Queries symbol information by symbol name.
    137154     *
     
    185202    DECLCALLBACKMEMBER(int, pfnLineByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTGCUINTPTR off, PRTGCINTPTR poffDisp, PRTDBGLINE pLine);
    186203
    187     /**
    188      * Adds a symbol to the module (optional).
    189      *
    190      * This method is used to implement DBGFR3SymbolAdd.
    191      *
    192      * @returns VBox status code.
    193      * @retval  VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
    194      *
    195      * @param   pMod        Pointer to the module structure.
    196      * @param   pszSymbol   The symbol name.
    197      * @param   iSeg        The segment number (0-based). RTDBGMOD_SEG_RVA can be used.
    198      * @param   off         The offset into the segment.
    199      * @param   cbSymbol    The area covered by the symbol. 0 is fine.
    200      */
    201     DECLCALLBACKMEMBER(int, pfnSymbolAdd)(PRTDBGMODINT pMod, const char *pszSymbol, uint32_t iSeg, RTGCUINTPTR off, RTUINT cbSymbol);
    202 
    203204    /** For catching initialization errors (RTDBGMODVTDBG_MAGIC). */
    204205    uint32_t    u32EndMagic;
     
    214215{
    215216    /** Magic value (RTDBGMOD_MAGIC). */
    216     uint32_t        u32Magic;
    217     /** The number of address spaces this module is currently linked into.
     217    uint32_t            u32Magic;
     218    /** The number of reference there are to this module.
    218219     * This is used to perform automatic cleanup and sharing. */
    219     uint32_t        cLinks;
     220    uint32_t volatile   cRefs;
    220221    /** The module name (short). */
    221     const char     *pszName;
     222    char               *pszName;
    222223    /** The module filename. Can be NULL. */
    223     const char     *pszImgFile;
     224    char               *pszImgFile;
    224225    /** The debug info file (if external). Can be NULL. */
    225     const char     *pszDbgFile;
     226    char               *pszDbgFile;
     227
     228    /** Critical section serializing access to the module. */
     229    RTCRITSECT          CritSect;
    226230
    227231    /** The method table for the executable image interpreter. */
    228     PCRTDBGMODVTIMG pImgVt;
     232    PCRTDBGMODVTIMG     pImgVt;
    229233    /** Pointer to the private data of the executable image interpreter. */
    230     void           *pvImgPriv;
     234    void               *pvImgPriv;
    231235
    232236    /** The method table for the debug info interpreter. */
    233     PCRTDBGMODVTDBG pDbgVt;
     237    PCRTDBGMODVTDBG     pDbgVt;
    234238    /** Pointer to the private data of the debug info interpreter. */
    235     void           *pvDbgPriv;
     239    void               *pvDbgPriv;
    236240
    237241} RTDBGMODINT;
    238 
     242/** Pointer to an debug module structure.  */
     243typedef RTDBGMODINT *PRTDBGMODINT;
     244
     245
     246/** Default symbol container implementation. */
     247extern RTDBGMODVTDBG const g_rtDbgModVtDbgContainer;
    239248
    240249/** @} */
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