VirtualBox

Changeset 103433 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Feb 19, 2024 12:11:34 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161760
Message:

Debugger: Some warning fixes, bugref:3409

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCCommands.cpp

    r98103 r103433  
    13131313        "none", "bytes", "elements"
    13141314    };
    1315     int rc;
     1315    int rc = VINF_SUCCESS;
    13161316
    13171317    for (unsigned iArg = 0; iArg < cArgs; iArg++)
     
    14261426
    14271427    NOREF(pCmd); NOREF(pUVM);
    1428     return 0;
     1428    return rc;
    14291429}
    14301430
  • trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp

    r103422 r103433  
    15911591        if (pszErr)
    15921592        {
     1593            uint32_t cchErr = (uint32_t)strlen(pszErr);
     1594
    15931595            pDumpBb->cchHeight++;
    1594             pDumpBb->cchWidth = RT_MAX(pDumpBb->cchWidth, (uint32_t)strlen(pszErr));
     1596            pDumpBb->cchWidth = RT_MAX(pDumpBb->cchWidth, cchErr);
    15951597        }
    15961598    }
     
    16001602        int rc = DBGFR3FlowBbQueryInstr(hFlowBb, i, NULL, NULL, &pszInstr);
    16011603        AssertRC(rc);
    1602         pDumpBb->cchWidth = RT_MAX(pDumpBb->cchWidth, (uint32_t)strlen(pszInstr));
     1604
     1605        uint32_t cchInstr = (uint32_t)strlen(pszInstr);
     1606        pDumpBb->cchWidth = RT_MAX(pDumpBb->cchWidth, cchInstr);
    16031607    }
    16041608    pDumpBb->cchWidth += 4; /* Include spacing and border left and right. */
     
    17581762 * Fills in the dump states for the basic blocks and branch tables.
    17591763 *
    1760  * @returns VBox status code.
    17611764 * @param   hFlowIt             The control flow graph iterator handle.
    17621765 * @param   hFlowBranchTblIt    The control flow graph branch table iterator handle.
     
    17661769 * @param   cBranchTbls         Number of branch tables.
    17671770 */
    1768 static int dbgcCmdUnassembleCfgDumpCalcDimensions(DBGFFLOWIT hFlowIt, DBGFFLOWBRANCHTBLIT hFlowBranchTblIt,
    1769                                                   PDBGCFLOWBBDUMP paDumpBb, PDBGCFLOWBRANCHTBLDUMP paDumpBranchTbl,
    1770                                                   uint32_t cBbs, uint32_t cBranchTbls)
     1771static void dbgcCmdUnassembleCfgDumpCalcDimensions(DBGFFLOWIT hFlowIt, DBGFFLOWBRANCHTBLIT hFlowBranchTblIt,
     1772                                                   PDBGCFLOWBBDUMP paDumpBb, PDBGCFLOWBRANCHTBLDUMP paDumpBranchTbl,
     1773                                                   uint32_t cBbs, uint32_t cBranchTbls)
    17711774{
    17721775    RT_NOREF2(cBbs, cBranchTbls);
     
    17951798        }
    17961799    }
    1797 
    1798     return VINF_SUCCESS;
    17991800}
    18001801
     
    18291830    if (RT_SUCCESS(rc))
    18301831    {
    1831         rc = dbgcCmdUnassembleCfgDumpCalcDimensions(hCfgIt, hFlowBranchTblIt, paDumpBb, paDumpBranchTbl,
    1832                                                     cBbs, cBranchTbls);
     1832        dbgcCmdUnassembleCfgDumpCalcDimensions(hCfgIt, hFlowBranchTblIt, paDumpBb, paDumpBranchTbl,
     1833                                               cBbs, cBranchTbls);
    18331834
    18341835        /* Calculate the ASCII screen dimensions and create one. */
     
    21672168    }
    21682169
     2170    int rc;
     2171#if 0 /** @todo Unused right now. */
    21692172    /*
    21702173     * Convert physical and host addresses to guest addresses.
    21712174     */
    21722175    RTDBGAS hDbgAs = pDbgc->hDbgAs;
    2173     int rc;
    21742176    switch (pDbgc->DisasmPos.enmType)
    21752177    {
     
    21922194        default: AssertFailed(); break;
    21932195    }
     2196#endif
    21942197
    21952198    DBGFADDRESS CurAddr;
     
    31633166        }
    31643167    }
    3165     return VINF_SUCCESS;
     3168    return rc;
    31663169}
    31673170
     
    50675070 * @param   cVars   The number of variables.
    50685071 */
    5069 int dbgcVarsToBytes(PDBGCCMDHLP pCmdHlp, void *pvBuf, uint32_t *pcbBuf, size_t cbUnit, PCDBGCVAR paVars, unsigned cVars)
     5072static int dbgcVarsToBytes(PDBGCCMDHLP pCmdHlp, void *pvBuf, uint32_t *pcbBuf, size_t cbUnit, PCDBGCVAR paVars, unsigned cVars)
    50705073{
    50715074    union
     
    66446647    pDbgc->pLastPos = &pDbgc->DisasmPos;
    66456648
     6649
     6650    int rc;
     6651#if 0 /** @todo unused right now */
    66466652    /*
    66476653     * Convert physical and host addresses to guest addresses.
    66486654     */
    66496655    RTDBGAS hDbgAs = pDbgc->hDbgAs;
    6650     int rc;
    66516656    switch (pDbgc->DisasmPos.enmType)
    66526657    {
     
    66696674        default: AssertFailed(); break;
    66706675    }
     6676#endif
    66716677
    66726678    DBGFADDRESS CurAddr;
  • trunk/src/VBox/Debugger/DBGCEval.cpp

    r98103 r103433  
    9696 * @param   pDbgc               The DBGC instance.
    9797 */
    98 size_t dbgcGetFreeScratchSpace(PDBGC pDbgc)
     98static size_t dbgcGetFreeScratchSpace(PDBGC pDbgc)
    9999{
    100100    return sizeof(pDbgc->achScratch) - (pDbgc->pszScratch - &pDbgc->achScratch[0]);
     
    109109 * @param   cbRequested         The number of bytes to allocate.
    110110 */
    111 char *dbgcAllocStringScatch(PDBGC pDbgc, size_t cbRequested)
     111static char *dbgcAllocStringScatch(PDBGC pDbgc, size_t cbRequested)
    112112{
    113113    if (cbRequested > dbgcGetFreeScratchSpace(pDbgc))
     
    10911091     */
    10921092    PDBGCVAR        pArg        = &pDbgc->aArgs[pDbgc->iArg];
    1093     PCDBGCVARDESC   pPrevDesc   = NULL;
    10941093    unsigned        cCurDesc    = 0;
    1095     unsigned        iVar        = 0;
    10961094    unsigned        iVarDesc    = 0;
    10971095    *pcArgs = 0;
     
    12631261            if (RT_SUCCESS(rc))
    12641262            {
    1265                 pArg->pDesc = pPrevDesc = &paVarDescs[iVarDesc];
     1263                pArg->pDesc = &paVarDescs[iVarDesc];
    12661264                cCurDesc++;
    12671265                RTMemFree(pszArgsCopy);
     
    12951293         * Next argument.
    12961294         */
    1297         iVar++;
    12981295        pArg++;
    12991296        pDbgc->iArg++;
  • trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp

    r100108 r103433  
    13821382            if (RT_SUCCESS(rc))
    13831383                rc = dbgcGdbStubCtxReplySendData(pThis, &achReply[0], cchStr);
     1384            if (RT_SUCCESS(rc))
     1385                rc = dbgcGdbStubCtxReplySendEnd(pThis);
    13841386            pThis->idCpuNextThrdInfoQuery++;
    13851387        }
    1386 
    1387         rc = dbgcGdbStubCtxReplySendEnd(pThis);
    13881388    }
    13891389
     
    14531453        return VERR_NET_PROTOCOL_ERROR;
    14541454
    1455     cbArgs--;
     1455    /*cbArgs--;*/ /* Not used */
    14561456    pbArgs++;
    14571457
     
    15671567
    15681568    pbArgs++;
    1569     cbArgs--;
     1569    /*cbArgs--;*/ /* Not used */
    15701570
    15711571    /** @todo For now we don't care about multiple threads and ignore thread IDs and multiple actions. */
     
    24192419                    rc = pDbgc->CmdHlp.pfnExec(&pDbgc->CmdHlp, "r eflags.rf = 1");
    24202420            }
     2421
     2422            if (RT_FAILURE(rc))
     2423                pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "Executing the breakpoint %u (%s) failed with %Rrc!\n",
     2424                                        pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx), rc);
    24212425
    24222426            rc = dbgcGdbStubCtxReplySendSigTrap(pThis);
     
    25522556 * @param   pThis   Pointer to the GDB stub context.
    25532557 */
    2554 int dbgcGdbStubRun(PGDBSTUBCTX pThis)
     2558static int dbgcGdbStubRun(PGDBSTUBCTX pThis)
    25552559{
    25562560    /* Select the register set based on the CPU mode. */
  • trunk/src/VBox/Debugger/DBGCRemoteKd.cpp

    r99739 r103433  
    42924292 * @param   pThis   Pointer to the KD context.
    42934293 */
    4294 int dbgcKdRun(PKDCTX pThis)
     4294static int dbgcKdRun(PKDCTX pThis)
    42954295{
    42964296    /*
     
    43464346             */
    43474347            if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, 1000))
    4348             {
    43494348                rc = dbgcKdCtxRecv(pThis);
    4350                 if (RT_FAILURE(rc))
    4351                     break;
    4352             }
    43534349            else if (   pThis->msRecvTimeout != RT_INDEFINITE_WAIT
    43544350                     && (RTTimeMilliTS() - pThis->tsRecvLast >= pThis->msRecvTimeout))
    43554351                rc = dbgcKdCtxRecvTimeout(pThis);
     4352
     4353            if (RT_FAILURE(rc))
     4354                break;
    43564355        }
    43574356        else
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