VirtualBox

Changeset 62840 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 1, 2016 5:15:19 PM (8 years ago)
Author:
vboxsync
Message:

Debugger: warnings

Location:
trunk/src/VBox/Debugger
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h

    r62480 r62840  
    251251    {
    252252        /* Add the segments and fill in the translation table. */
    253         RTGCPTR uRvaNext = 0;
    254253        for (unsigned i = 0; i < cSegs; i++)
    255254            if (paShdrs[i].sh_flags & SHF_ALLOC)
  • trunk/src/VBox/Debugger/DBGPlugInLinux.cpp

    r62480 r62840  
    372372        bool fRet = false;
    373373        DISSTATE DisState;
    374         unsigned idxAddressesUsed = 0;
     374        unsigned cAddressesUsed = 0;
    375375        struct { size_t cb; RTGCPTR GCPtrOrigSrc; } aAddresses[5];
    376376        RT_ZERO(DisState);
     
    420420                            {
    421421                                RTGCPTR GCPtrLogBuf = 0;
    422                                 size_t cbLogBuf = 0;
     422                                uint32_t cbLogBuf = 0;
    423423
    424424                                /*
     
    427427                                 * For the log size look for the biggest non kernel address.
    428428                                 */
    429                                 for (unsigned i = 0; i < idxAddressesUsed; i++)
     429                                for (unsigned i = 0; i < cAddressesUsed; i++)
    430430                                {
    431431                                    DBGFADDRESS AddrVal;
     
    514514                                        AssertMsgFailedBreakStmt(("Invalid displacement\n"), rc = VERR_INVALID_STATE);
    515515
    516                                     if (idxAddressesUsed < RT_ELEMENTS(aAddresses))
     516                                    if (cAddressesUsed < RT_ELEMENTS(aAddresses))
    517517                                    {
    518518                                        /* movsxd reads always 32bits. */
    519519                                        if (DisState.pCurInstr->uOpcode == OP_MOVSXD)
    520                                             aAddresses[idxAddressesUsed].cb = sizeof(uint32_t);
     520                                            aAddresses[cAddressesUsed].cb = sizeof(uint32_t);
    521521                                        else
    522                                             aAddresses[idxAddressesUsed].cb = DisState.Param2.cb;
    523                                         aAddresses[idxAddressesUsed].GCPtrOrigSrc = GCPtrVal;
    524                                         idxAddressesUsed++;
     522                                            aAddresses[cAddressesUsed].cb = DisState.Param2.cb;
     523                                        aAddresses[cAddressesUsed].GCPtrOrigSrc = GCPtrVal;
     524                                        cAddressesUsed++;
    525525                                    }
    526526                                    else
     
    564564    int rc = VINF_SUCCESS;
    565565
    566     struct { void *pvVar; size_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] =
     566    struct { void *pvVar; uint32_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] =
    567567    {
    568568        { pGCPtrLogBuf, sizeof(RTGCPTR),  pThis->f64Bit ? sizeof(uint64_t) : sizeof(uint32_t), "log_buf_addr_get" },
     
    574574        Assert(aSymbols[i].cbHost >= aSymbols[i].cbGuest);
    575575        rc = dbgDiggerLinuxDisassembleSimpleGetter(pThis, pUVM, hMod, aSymbols[i].pszSymbol,
    576                                                    aSymbols[i].pvVar,  aSymbols[i].cbGuest);
     576                                                   aSymbols[i].pvVar, aSymbols[i].cbGuest);
    577577    }
    578578
     
    622622                                             char *pszBuf, size_t cbBuf, size_t *pcbActual)
    623623{
     624    RT_NOREF2(fFlags, cMessages);
    624625    int rc = VINF_SUCCESS;
    625626    RTGCPTR  GCPtrLogBuf;
     
    735736                                               char *pszBuf, size_t cbBuf, size_t *pcbActual)
    736737{
     738    RT_NOREF1(fFlags);
    737739    int rc = VINF_SUCCESS;
    738740    RTGCPTR  GCPtrLogBuf;
     
    10481050static DECLCALLBACK(void *) dbgDiggerLinuxQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    10491051{
     1052    RT_NOREF1(pUVM);
    10501053    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
    10511054    switch (enmIf)
     
    10931096static DECLCALLBACK(void)  dbgDiggerLinuxTerm(PUVM pUVM, void *pvData)
    10941097{
     1098    RT_NOREF1(pUVM);
    10951099    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
    10961100    Assert(pThis->fValid);
     
    17291733 * @param   cbNeedle            Size of the needle in bytes.
    17301734 */
    1731 static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, size_t cbNeedle)
     1735static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, uint8_t cbNeedle)
    17321736{
    17331737    int rc = VINF_SUCCESS;
     
    22752279static DECLCALLBACK(void)  dbgDiggerLinuxDestruct(PUVM pUVM, void *pvData)
    22762280{
    2277 
     2281    RT_NOREF2(pUVM, pvData);
    22782282}
    22792283
     
    22842288static DECLCALLBACK(int)  dbgDiggerLinuxConstruct(PUVM pUVM, void *pvData)
    22852289{
     2290    RT_NOREF1(pUVM);
    22862291    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
    22872292    pThis->IDmesg.u32Magic = DBGFOSIDMESG_MAGIC;
  • trunk/src/VBox/Debugger/DBGPlugInOS2.cpp

    r62480 r62840  
    110110                                     uint8_t *pbBuf, size_t cbBuf)
    111111{
     112    RT_NOREF7(pThis, pUVM, pszName, pImageAddr, cbImage, pbBuf, cbBuf);
    112113    LogFlow(("DigOS2: %RGp %#x %s\n", pImageAddr->FlatPtr, cbImage, pszName));
    113114
     
    121122static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    122123{
     124    RT_NOREF3(pUVM, pvData, enmIf);
    123125    return NULL;
    124126}
     
    130132static DECLCALLBACK(int)  dbgDiggerOS2QueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    131133{
     134    RT_NOREF1(pUVM);
    132135    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
    133136    Assert(pThis->fValid);
     
    174177static DECLCALLBACK(void)  dbgDiggerOS2Term(PUVM pUVM, void *pvData)
    175178{
     179    RT_NOREF1(pUVM);
    176180    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
    177181    Assert(pThis->fValid);
     
    321325static DECLCALLBACK(void)  dbgDiggerOS2Destruct(PUVM pUVM, void *pvData)
    322326{
    323 
     327    RT_NOREF2(pUVM, pvData);
    324328}
    325329
     
    330334static DECLCALLBACK(int)  dbgDiggerOS2Construct(PUVM pUVM, void *pvData)
    331335{
     336    RT_NOREF1(pUVM);
    332337    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
    333338    pThis->fValid = false;
  • trunk/src/VBox/Debugger/DBGPlugInSolaris.cpp

    r62480 r62840  
    359359static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    360360{
     361    RT_NOREF3(pUVM, pvData, enmIf);
    361362    return NULL;
    362363}
     
    374375     * It's all in the utsname symbol...
    375376     */
     377    SOL_utsname_t UtsName;
     378    RT_ZERO(UtsName);                   /* Make MSC happy. */
    376379    DBGFADDRESS Addr;
    377     SOL_utsname_t UtsName;
    378380    RTDBGSYMBOL SymUtsName;
    379381    int rc = DBGFR3AsSymbolByName(pUVM, DBGF_AS_KERNEL, "utsname", &SymUtsName, NULL);
     
    429431static void dbgDiggerSolarisProcessModCtl32(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
    430432{
     433    RT_NOREF1(pThis);
     434
    431435    /* skip it if it's not loaded and installed */
    432436    AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_loaded,    v9_32.mod_loaded);
     
    576580static void dbgDiggerSolarisProcessModCtl64(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
    577581{
     582    RT_NOREF1(pThis);
     583
    578584    /* skip it if it's not loaded and installed */
    579585    AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_loaded,    v9_64.mod_loaded);
     
    718724static DECLCALLBACK(void)  dbgDiggerSolarisTerm(PUVM pUVM, void *pvData)
    719725{
     726    RT_NOREF1(pUVM);
    720727    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
    721728    Assert(pThis->fValid);
     
    10871094static DECLCALLBACK(void)  dbgDiggerSolarisDestruct(PUVM pUVM, void *pvData)
    10881095{
     1096    RT_NOREF2(pUVM, pvData);
    10891097
    10901098}
     
    10961104static DECLCALLBACK(int)  dbgDiggerSolarisConstruct(PUVM pUVM, void *pvData)
    10971105{
     1106    RT_NOREF2(pUVM, pvData);
    10981107    return VINF_SUCCESS;
    10991108}
  • trunk/src/VBox/Debugger/DBGPlugInWinNt.cpp

    r62480 r62840  
    723723static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    724724{
     725    RT_NOREF3(pUVM, pvData, enmIf);
    725726    return NULL;
    726727}
     
    732733static DECLCALLBACK(int)  dbgDiggerWinNtQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    733734{
     735    RT_NOREF1(pUVM);
    734736    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
    735737    Assert(pThis->fValid);
     
    753755static DECLCALLBACK(void)  dbgDiggerWinNtTerm(PUVM pUVM, void *pvData)
    754756{
     757    RT_NOREF1(pUVM);
    755758    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
    756759    Assert(pThis->fValid);
     
    11461149static DECLCALLBACK(void)  dbgDiggerWinNtDestruct(PUVM pUVM, void *pvData)
    11471150{
    1148 
     1151    RT_NOREF2(pUVM, pvData);
    11491152}
    11501153
     
    11551158static DECLCALLBACK(int)  dbgDiggerWinNtConstruct(PUVM pUVM, void *pvData)
    11561159{
     1160    RT_NOREF1(pUVM);
    11571161    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
    11581162    pThis->fValid = false;
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