VirtualBox

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


Ignore:
Timestamp:
Jun 21, 2009 3:43:57 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: RTDbg coding.

File:
1 edited

Legend:

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

    r20740 r20744  
    6666     * This combines probing and opening.
    6767     *
    68      * @returns VBox status code. No informational returns defined.
     68     * @returns IPRT status code. No informational returns defined.
    6969     *
    7070     * @param   pMod        Pointer to the module that is being opened.
     
    116116     * This combines probing and opening.
    117117     *
    118      * @returns VBox status code. No informational returns defined.
     118     * @returns IPRT status code. No informational returns defined.
    119119     *
    120120     * @param   pMod        Pointer to the module that is being opened.
     
    143143    DECLCALLBACKMEMBER(int, pfnClose)(PRTDBGMODINT pMod);
    144144
     145
     146
    145147    /**
    146148     * Converts an image relative virtual address address to a segmented address.
     
    153155    DECLCALLBACKMEMBER(RTDBGSEGIDX, pfnRvaToSegOff)(PRTDBGMODINT pMod, RTUINTPTR uRva, PRTUINTPTR poffSeg);
    154156
     157
     158
     159    /**
     160     * Adds a segment to the module (optional).
     161     *
     162     * @returns IPRT status code.
     163     * @retval  VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
     164     * @retval  VERR_DBG_SEGMENT_INDEX_CONFLICT if the segment index exists already.
     165     *
     166     * @param   pMod        Pointer to the module structure.
     167     * @param   uRva        The segment image relative address.
     168     * @param   cb          The segment size.
     169     * @param   pszName     The segment name.
     170     * @param   cchName     The length of the segment name.
     171     * @param   fFlags      Segment flags.
     172     * @param   piSeg       The segment index or NIL_RTDBGSEGIDX on input.
     173     *                      The assigned segment index on successful return.
     174     *                      Optional.
     175     */
     176    DECLCALLBACKMEMBER(int, pfnSegmentAdd)(PRTDBGMODINT pMod, RTUINTPTR uRva, RTUINTPTR cb, const char *pszName, size_t cchName,
     177                                           uint32_t fFlags, PRTDBGSEGIDX piSeg);
     178
     179    /**
     180     * Gets the segment count.
     181     *
     182     * @returns Number of segments.
     183     * @retval  NIL_RTDBGSEGIDX if unknown.
     184     *
     185     * @param   pMod        Pointer to the module structure.
     186     */
     187    DECLCALLBACKMEMBER(RTDBGSEGIDX, pfnSegmentCount)(PRTDBGMODINT pMod);
     188
     189    /**
     190     * Gets information about a segment.
     191     *
     192     * @returns IPRT status code.
     193     * @retval  VERR_DBG_INVALID_SEGMENT_INDEX if iSeg is too high.
     194     *
     195     * @param   pMod        Pointer to the module structure.
     196     * @param   iSeg        The segment.
     197     * @param   pSegInfo    Where to store the segment information.
     198     */
     199    DECLCALLBACKMEMBER(int, pfnSegmentByIndex)(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTDBGSEGMENT pSegInfo);
     200
     201
     202
    155203    /**
    156204     * Adds a symbol to the module (optional).
    157205     *
    158      * @returns VBox status code.
     206     * @returns IPRT code.
    159207     * @retval  VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
    160208     *
     
    165213     * @param   off         The offset into the segment.
    166214     * @param   cb          The area covered by the symbol. 0 is fine.
     215     * @param   piOrdinal   Where to return the symbol ordinal on success. If the
     216     *                      interpreter doesn't do ordinals, this will be set to
     217     *                      UINT32_MAX. Optional
    167218     */
    168219    DECLCALLBACKMEMBER(int, pfnSymbolAdd)(PRTDBGMODINT pMod, const char *pszSymbol, size_t cchSymbol,
    169                                           uint32_t iSeg, RTUINTPTR off, RTUINTPTR cb, uint32_t fFlags);
     220                                          uint32_t iSeg, RTUINTPTR off, RTUINTPTR cb, uint32_t fFlags,
     221                                          uint32_t *piOrdinal);
     222
     223    /**
     224     * Gets the number of symbols in the module.
     225     *
     226     * This is used for figuring out the max value to pass to pfnSymbolByIndex among
     227     * other things.
     228     *
     229     * @returns The number of symbols, UINT32_MAX if not known/supported.
     230     *
     231     * @param   pMod        Pointer to the module structure.
     232     */
     233    DECLCALLBACKMEMBER(uint32_t, pfnSymbolCount)(PRTDBGMODINT pMod);
     234
     235    /**
     236     * Queries symbol information by ordinal number.
     237     *
     238     * @returns IPRT status code.
     239     * @retval  VINF_SUCCESS on success, no informational status code.
     240     * @retval  VERR_DBG_NO_SYMBOLS if there aren't any symbols.
     241     * @retval  VERR_NOT_SUPPORTED if lookup by ordinal is not supported.
     242     * @retval  VERR_SYMBOL_NOT_FOUND if there is no symbol at that index.
     243     *
     244     * @param   pMod        Pointer to the module structure.
     245     * @param   iSymbol     The symbol ordinal number.
     246     * @param   pSymbol     Where to store the symbol information.
     247     */
     248    DECLCALLBACKMEMBER(int, pfnSymbolByOrdinal)(PRTDBGMODINT pMod, uint32_t iSymbol, PRTDBGSYMBOL pSymbol);
    170249
    171250    /**
    172251     * Queries symbol information by symbol name.
    173252     *
    174      * @returns VBox status code.
     253     * @returns IPRT status code.
    175254     * @retval  VINF_SUCCESS on success, no informational status code.
    176      * @retval  VERR_RTDBGMOD_NO_SYMBOLS if there aren't any symbols.
     255     * @retval  VERR_DBG_NO_SYMBOLS if there aren't any symbols.
    177256     * @retval  VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
    178257     *
     
    190269     * address equal or lower than the requested.
    191270     *
    192      * @returns VBox status code.
     271     * @returns IPRT status code.
    193272     * @retval  VINF_SUCCESS on success, no informational status code.
    194      * @retval  VERR_RTDBGMOD_NO_SYMBOLS if there aren't any symbols.
     273     * @retval  VERR_DBG_NO_SYMBOLS if there aren't any symbols.
    195274     * @retval  VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
    196275     *
     
    204283    DECLCALLBACKMEMBER(int, pfnSymbolByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol);
    205284
     285
     286
    206287    /**
    207288     * Adds a line number to the module (optional).
    208289     *
    209      * @returns VBox status code.
     290     * @returns IPRT status code.
    210291     * @retval  VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
    211292     *
     
    215296     * @param   iSeg        The segment number (0-based).
    216297     * @param   off         The offset into the segment.
    217      */
    218     DECLCALLBACKMEMBER(int, pfnLineAdd)(PRTDBGMODINT pMod, const char *pszFile, size_t cchFile, uint32_t uLineNo, uint32_t iSeg, RTUINTPTR off);
     298     * @param   piOrdinal   Where to return the line number ordinal on success. If
     299     *                      the interpreter doesn't do ordinals, this will be set to
     300     *                      UINT32_MAX. Optional
     301     */
     302    DECLCALLBACKMEMBER(int, pfnLineAdd)(PRTDBGMODINT pMod, const char *pszFile, size_t cchFile, uint32_t uLineNo,
     303                                        uint32_t iSeg, RTUINTPTR off, uint32_t *piOrdinal);
     304
     305    /**
     306     * Gets the number of line numbers in the module.
     307     *
     308     * @returns The number or UINT32_MAX if not known/supported.
     309     *
     310     * @param   pMod        Pointer to the module structure.
     311     */
     312    DECLCALLBACKMEMBER(uint32_t, pfnLineCount)(PRTDBGMODINT pMod);
     313
     314    /**
     315     * Queries line number information by ordinal number.
     316     *
     317     * @returns IPRT status code.
     318     * @retval  VINF_SUCCESS on success, no informational status code.
     319     * @retval  VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
     320     * @retval  VERR_DBG_LINE_NOT_FOUND if there is no line number with that
     321     *          ordinal.
     322     *
     323     * @param   pMod        Pointer to the module structure.
     324     * @param   iOrdinal    The line number ordinal number.
     325     * @param   pLine       Where to store the information about the line number.
     326     */
     327    DECLCALLBACKMEMBER(int, pfnLineByOrdinal)(PRTDBGMODINT pMod, uint32_t iOrdinal, PRTDBGLINE pLine);
    219328
    220329    /**
    221330     * Queries line number information by address.
    222331     *
    223      * @returns VBox status code.
     332     * @returns IPRT status code.
    224333     * @retval  VINF_SUCCESS on success, no informational status code.
    225      * @retval  VERR_RTDBGMOD_NO_LINE_NUMBERS if there aren't any line numbers.
    226      * @retval  VERR_RTDBGMOD_LINE_NOT_FOUND if no suitable line number was found.
     334     * @retval  VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
     335     * @retval  VERR_DBG_LINE_NOT_FOUND if no suitable line number was found.
    227336     *
    228337     * @param   pMod        Pointer to the module structure.
     
    234343     */
    235344    DECLCALLBACKMEMBER(int, pfnLineByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE pLine);
     345
    236346
    237347    /** For catching initialization errors (RTDBGMODVTDBG_MAGIC). */
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