VirtualBox

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


Ignore:
Timestamp:
Dec 31, 2015 12:32:09 AM (9 years ago)
Author:
vboxsync
Message:

IPRT: Implemented reading codeview (NB09,NB11) line numbers (sstSrcModule).

File:
1 edited

Legend:

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

    r59231 r59232  
    915915    /* Check the header. */
    916916    PCRTCVSRCMODULE pHdr = (PCRTCVSRCMODULE)pvSubSect;
    917     AssertReturn(cbSubSect >= RT_OFFSETOF(RTCVSRCMODULE, aoffSrcFiles), VERR_CV_BAD_FORMAT);
     917    AssertReturn(cbSubSect >= RT_UOFFSETOF(RTCVSRCMODULE, aoffSrcFiles), VERR_CV_BAD_FORMAT);
    918918    size_t cbHdr = sizeof(RTCVSRCMODULE)
    919919                 + pHdr->cFiles * sizeof(uint32_t)
     
    938938    {
    939939        uint32_t const  offSrcFile  = pHdr->aoffSrcFiles[i];
    940         RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_OFFSETOF(RTCVSRCFILE, aoffSrcLines) >= offSrcFile,
     940        RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines) >= offSrcFile,
    941941                                ("cbSubSect=%#x (- %#x) aoffSrcFiles[%u]=%#x\n",
    942                                  cbSubSect, RT_OFFSETOF(RTCVSRCFILE, aoffSrcLines), i, offSrcFile));
     942                                 cbSubSect, RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines), i, offSrcFile));
    943943        PCRTCVSRCFILE   pSrcFile    = (PCRTCVSRCFILE)((uint8_t const *)pvSubSect + offSrcFile);
    944         size_t         cbSrcFileHdr = RT_OFFSETOF(RTCVSRCFILE, aoffSrcLines[pSrcFile->cSegs])
     944        size_t         cbSrcFileHdr = RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines[pSrcFile->cSegs])
    945945                                    + sizeof(RTCVSRCRANGE) * pSrcFile->cSegs
    946946                                    + sizeof(uint8_t);
     
    962962        {
    963963            uint32_t const  offSrcLine  = pSrcFile->aoffSrcLines[iSeg];
    964             RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_OFFSETOF(RTCVSRCLINE, aoffLines) >= offSrcLine,
     964            RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_UOFFSETOF(RTCVSRCLINE, aoffLines) >= offSrcLine,
    965965                                    ("cbSubSect=%#x (- %#x) aoffSrcFiles[%u]=%#x\n",
    966                                      cbSubSect, RT_OFFSETOF(RTCVSRCLINE, aoffLines), iSeg, offSrcLine));
     966                                     cbSubSect, RT_UOFFSETOF(RTCVSRCLINE, aoffLines), iSeg, offSrcLine));
    967967            PCRTCVSRCLINE   pSrcLine    = (PCRTCVSRCLINE)((uint8_t const *)pvSubSect + offSrcLine);
    968             size_t          cbSrcLine   = RT_OFFSETOF(RTCVSRCLINE, aoffLines[pSrcLine->cPairs])
     968            size_t          cbSrcLine   = RT_UOFFSETOF(RTCVSRCLINE, aoffLines[pSrcLine->cPairs])
    969969                                        + pSrcLine->cPairs * sizeof(uint16_t);
    970970            RTDBGMODCV_CHECK_RET_BF(cbSubSect >= offSrcLine + cbSrcLine,
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