VirtualBox

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


Ignore:
Timestamp:
Jan 27, 2013 9:12:53 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83373
Message:

DBGF,DBGC,++: PVM -> PUVM. Some refactoring and cleanup as well.

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

Legend:

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

    r41573 r44399  
    316316 * @interface_method_impl{DBGCCMDHLP,pfnMemRead}
    317317 */
    318 static DECLCALLBACK(int) dbgcHlpMemRead(PDBGCCMDHLP pCmdHlp, PVM pVM, void *pvBuffer, size_t cbRead, PCDBGCVAR pVarPointer, size_t *pcbRead)
     318static DECLCALLBACK(int) dbgcHlpMemRead(PDBGCCMDHLP pCmdHlp, void *pvBuffer, size_t cbRead, PCDBGCVAR pVarPointer, size_t *pcbRead)
    319319{
    320320    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    341341        case DBGCVAR_TYPE_GC_FAR:
    342342            /* Use DBGFR3AddrFromSelOff for the conversion. */
    343             Assert(pDbgc->pVM);
    344             rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, Var.u.GCFar.sel, Var.u.GCFar.off);
     343            Assert(pDbgc->pUVM);
     344            rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, Var.u.GCFar.sel, Var.u.GCFar.off);
    345345            if (RT_FAILURE(rc))
    346346                return rc;
     
    350350            {
    351351                DBGFSELINFO SelInfo;
    352                 rc = DBGFR3SelQueryInfo(pDbgc->pVM, pDbgc->idCpu, Address.Sel,
     352                rc = DBGFR3SelQueryInfo(pDbgc->pUVM, pDbgc->idCpu, Address.Sel,
    353353                                        DBGFSELQI_FLAGS_DT_GUEST | DBGFSELQI_FLAGS_DT_ADJ_64BIT_MODE, &SelInfo);
    354354                if (RT_SUCCESS(rc))
     
    419419        {
    420420            case DBGCVAR_TYPE_GC_FLAT:
    421                 rc = DBGFR3MemRead(pDbgc->pVM, pDbgc->idCpu,
    422                                    DBGFR3AddrFromFlat(pVM, &Address, Var.u.GCFlat),
     421                rc = DBGFR3MemRead(pDbgc->pUVM, pDbgc->idCpu,
     422                                   DBGFR3AddrFromFlat(pDbgc->pUVM, &Address, Var.u.GCFlat),
    423423                                   pvBuffer, cb);
    424424                break;
    425425
    426426            case DBGCVAR_TYPE_GC_PHYS:
    427                 rc = DBGFR3MemRead(pDbgc->pVM, pDbgc->idCpu,
    428                                    DBGFR3AddrFromPhys(pVM, &Address, Var.u.GCPhys),
     427                rc = DBGFR3MemRead(pDbgc->pUVM, pDbgc->idCpu,
     428                                   DBGFR3AddrFromPhys(pDbgc->pUVM, &Address, Var.u.GCPhys),
    429429                                   pvBuffer, cb);
    430430                break;
     
    488488 * @interface_method_impl{DBGCCMDHLP,pfnMemWrite}
    489489 */
    490 static DECLCALLBACK(int) dbgcHlpMemWrite(PDBGCCMDHLP pCmdHlp, PVM pVM, const void *pvBuffer, size_t cbWrite, PCDBGCVAR pVarPointer, size_t *pcbWritten)
     490static DECLCALLBACK(int) dbgcHlpMemWrite(PDBGCCMDHLP pCmdHlp, const void *pvBuffer, size_t cbWrite, PCDBGCVAR pVarPointer, size_t *pcbWritten)
    491491{
    492492    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    514514        {
    515515            /* Use DBGFR3AddrFromSelOff for the conversion. */
    516             Assert(pDbgc->pVM);
    517             rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, Var.u.GCFar.sel, Var.u.GCFar.off);
     516            Assert(pDbgc->pUVM);
     517            rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, Var.u.GCFar.sel, Var.u.GCFar.off);
    518518            if (RT_FAILURE(rc))
    519519                return rc;
     
    523523            {
    524524                DBGFSELINFO SelInfo;
    525                 rc = DBGFR3SelQueryInfo(pDbgc->pVM, pDbgc->idCpu, Address.Sel,
     525                rc = DBGFR3SelQueryInfo(pDbgc->pUVM, pDbgc->idCpu, Address.Sel,
    526526                                        DBGFSELQI_FLAGS_DT_GUEST | DBGFSELQI_FLAGS_DT_ADJ_64BIT_MODE, &SelInfo);
    527527                if (RT_SUCCESS(rc))
     
    556556        /* fall thru */
    557557        case DBGCVAR_TYPE_GC_FLAT:
    558             rc = DBGFR3MemWrite(pVM, pDbgc->idCpu,
    559                                 DBGFR3AddrFromFlat(pVM, &Address, Var.u.GCFlat),
     558            rc = DBGFR3MemWrite(pDbgc->pUVM, pDbgc->idCpu,
     559                                DBGFR3AddrFromFlat(pDbgc->pUVM, &Address, Var.u.GCFlat),
    560560                                pvBuffer, cbWrite);
    561561            if (pcbWritten && RT_SUCCESS(rc))
     
    564564
    565565        case DBGCVAR_TYPE_GC_PHYS:
    566             rc = DBGFR3MemWrite(pVM, pDbgc->idCpu,
    567                                 DBGFR3AddrFromPhys(pVM, &Address, Var.u.GCPhys),
     566            rc = DBGFR3MemWrite(pDbgc->pUVM, pDbgc->idCpu,
     567                                DBGFR3AddrFromPhys(pDbgc->pUVM, &Address, Var.u.GCPhys),
    568568                                pvBuffer, cbWrite);
    569569            if (pcbWritten && RT_SUCCESS(rc))
     
    734734    {
    735735        case DBGCVAR_TYPE_GC_FLAT:
    736             DBGFR3AddrFromFlat(pDbgc->pVM, pAddress, pVar->u.GCFlat);
     736            DBGFR3AddrFromFlat(pDbgc->pUVM, pAddress, pVar->u.GCFlat);
    737737            return VINF_SUCCESS;
    738738
    739739        case DBGCVAR_TYPE_NUMBER:
    740             DBGFR3AddrFromFlat(pDbgc->pVM, pAddress, (RTGCUINTPTR)pVar->u.u64Number);
     740            DBGFR3AddrFromFlat(pDbgc->pUVM, pAddress, (RTGCUINTPTR)pVar->u.u64Number);
    741741            return VINF_SUCCESS;
    742742
    743743        case DBGCVAR_TYPE_GC_FAR:
    744             return DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, pAddress, pVar->u.GCFar.sel, pVar->u.GCFar.off);
     744            return DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, pAddress, pVar->u.GCFar.sel, pVar->u.GCFar.off);
    745745
    746746        case DBGCVAR_TYPE_GC_PHYS:
    747             DBGFR3AddrFromPhys(pDbgc->pVM, pAddress, pVar->u.GCPhys);
     747            DBGFR3AddrFromPhys(pDbgc->pUVM, pAddress, pVar->u.GCPhys);
    748748            return VINF_SUCCESS;
    749749
     
    923923    int             rc;
    924924
    925     Assert(pDbgc->pVM);
     925    Assert(pDbgc->pUVM);
    926926
    927927    *pResult = InVar;
     
    939939                case DBGCVAR_TYPE_GC_PHYS:
    940940                    pResult->enmType = DBGCVAR_TYPE_GC_PHYS;
    941                     rc = DBGFR3AddrToPhys(pDbgc->pVM, pDbgc->idCpu,
    942                                           DBGFR3AddrFromFlat(pDbgc->pVM, &Address, pArg->u.GCFlat),
     941                    rc = DBGFR3AddrToPhys(pDbgc->pUVM, pDbgc->idCpu,
     942                                          DBGFR3AddrFromFlat(pDbgc->pUVM, &Address, pArg->u.GCFlat),
    943943                                          &pResult->u.GCPhys);
    944944                    if (RT_SUCCESS(rc))
     
    948948                case DBGCVAR_TYPE_HC_FLAT:
    949949                    pResult->enmType = DBGCVAR_TYPE_HC_FLAT;
    950                     rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pVM, pDbgc->idCpu,
    951                                                    DBGFR3AddrFromFlat(pDbgc->pVM, &Address, pArg->u.GCFlat),
     950                    rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pUVM, pDbgc->idCpu,
     951                                                   DBGFR3AddrFromFlat(pDbgc->pUVM, &Address, pArg->u.GCFlat),
    952952                                                   false /*fReadOnly */,
    953953                                                   &pResult->u.pvHCFlat);
     
    958958                case DBGCVAR_TYPE_HC_PHYS:
    959959                    pResult->enmType = DBGCVAR_TYPE_HC_PHYS;
    960                     rc = DBGFR3AddrToHostPhys(pDbgc->pVM, pDbgc->idCpu,
    961                                               DBGFR3AddrFromFlat(pDbgc->pVM, &Address, pArg->u.GCFlat),
     960                    rc = DBGFR3AddrToHostPhys(pDbgc->pUVM, pDbgc->idCpu,
     961                                              DBGFR3AddrFromFlat(pDbgc->pUVM, &Address, pArg->u.GCFlat),
    962962                                              &pResult->u.GCPhys);
    963963                    if (RT_SUCCESS(rc))
     
    984984            {
    985985                case DBGCVAR_TYPE_GC_FLAT:
    986                     rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
     986                    rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
    987987                    if (RT_SUCCESS(rc))
    988988                    {
     
    997997
    998998                case DBGCVAR_TYPE_GC_PHYS:
    999                     rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
     999                    rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
    10001000                    if (RT_SUCCESS(rc))
    10011001                    {
    10021002                        pResult->enmType = DBGCVAR_TYPE_GC_PHYS;
    1003                         rc = DBGFR3AddrToPhys(pDbgc->pVM, pDbgc->idCpu, &Address, &pResult->u.GCPhys);
     1003                        rc = DBGFR3AddrToPhys(pDbgc->pUVM, pDbgc->idCpu, &Address, &pResult->u.GCPhys);
    10041004                        if (RT_SUCCESS(rc))
    10051005                            return VINF_SUCCESS;
     
    10081008
    10091009                case DBGCVAR_TYPE_HC_FLAT:
    1010                     rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
     1010                    rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
    10111011                    if (RT_SUCCESS(rc))
    10121012                    {
    10131013                        pResult->enmType = DBGCVAR_TYPE_HC_FLAT;
    1014                         rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pVM, pDbgc->idCpu, &Address,
     1014                        rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pUVM, pDbgc->idCpu, &Address,
    10151015                                                       false /*fReadOnly*/, &pResult->u.pvHCFlat);
    10161016                        if (RT_SUCCESS(rc))
     
    10201020
    10211021                case DBGCVAR_TYPE_HC_PHYS:
    1022                     rc = DBGFR3AddrFromSelOff(pDbgc->pVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
     1022                    rc = DBGFR3AddrFromSelOff(pDbgc->pUVM, pDbgc->idCpu, &Address, pArg->u.GCFar.sel, pArg->u.GCFar.off);
    10231023                    if (RT_SUCCESS(rc))
    10241024                    {
    10251025                        pResult->enmType = DBGCVAR_TYPE_HC_PHYS;
    1026                         rc = DBGFR3AddrToHostPhys(pDbgc->pVM, pDbgc->idCpu, &Address, &pResult->u.GCPhys);
     1026                        rc = DBGFR3AddrToHostPhys(pDbgc->pUVM, pDbgc->idCpu, &Address, &pResult->u.GCPhys);
    10271027                        if (RT_SUCCESS(rc))
    10281028                            return VINF_SUCCESS;
     
    10601060                case DBGCVAR_TYPE_HC_FLAT:
    10611061                    pResult->enmType = DBGCVAR_TYPE_HC_FLAT;
    1062                     rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pVM, pDbgc->idCpu,
    1063                                                    DBGFR3AddrFromPhys(pDbgc->pVM, &Address, pArg->u.GCPhys),
     1062                    rc = DBGFR3AddrToVolatileR3Ptr(pDbgc->pUVM, pDbgc->idCpu,
     1063                                                   DBGFR3AddrFromPhys(pDbgc->pUVM, &Address, pArg->u.GCPhys),
    10641064                                                   false /*fReadOnly */,
    10651065                                                   &pResult->u.pvHCFlat);
     
    10701070                case DBGCVAR_TYPE_HC_PHYS:
    10711071                    pResult->enmType = DBGCVAR_TYPE_HC_PHYS;
    1072                     rc = DBGFR3AddrToHostPhys(pDbgc->pVM, pDbgc->idCpu,
    1073                                               DBGFR3AddrFromPhys(pDbgc->pVM, &Address, pArg->u.GCPhys),
     1072                    rc = DBGFR3AddrToHostPhys(pDbgc->pUVM, pDbgc->idCpu,
     1073                                              DBGFR3AddrFromPhys(pDbgc->pUVM, &Address, pArg->u.GCPhys),
    10741074                                              &pResult->u.HCPhys);
    10751075                    if (RT_SUCCESS(rc))
     
    11031103                case DBGCVAR_TYPE_GC_PHYS:
    11041104                    pResult->enmType = DBGCVAR_TYPE_GC_PHYS;
    1105                     rc = PGMR3DbgR3Ptr2GCPhys(pDbgc->pVM, pArg->u.pvHCFlat, &pResult->u.GCPhys);
     1105                    rc = PGMR3DbgR3Ptr2GCPhys(pDbgc->pUVM, pArg->u.pvHCFlat, &pResult->u.GCPhys);
    11061106                    if (RT_SUCCESS(rc))
    11071107                        return VINF_SUCCESS;
     
    11141114                case DBGCVAR_TYPE_HC_PHYS:
    11151115                    pResult->enmType = DBGCVAR_TYPE_HC_PHYS;
    1116                     rc = PGMR3DbgR3Ptr2HCPhys(pDbgc->pVM, pArg->u.pvHCFlat, &pResult->u.HCPhys);
     1116                    rc = PGMR3DbgR3Ptr2HCPhys(pDbgc->pUVM, pArg->u.pvHCFlat, &pResult->u.HCPhys);
    11171117                    if (RT_SUCCESS(rc))
    11181118                        return VINF_SUCCESS;
     
    11461146                case DBGCVAR_TYPE_GC_PHYS:
    11471147                    pResult->enmType = DBGCVAR_TYPE_GC_PHYS;
    1148                     rc = PGMR3DbgHCPhys2GCPhys(pDbgc->pVM, pArg->u.HCPhys, &pResult->u.GCPhys);
     1148                    rc = PGMR3DbgHCPhys2GCPhys(pDbgc->pUVM, pArg->u.HCPhys, &pResult->u.GCPhys);
    11491149                    if (RT_SUCCESS(rc))
    11501150                        return VINF_SUCCESS;
     
    13101310    if (pDbgc->fRegCtxGuest)
    13111311    {
    1312         if (pDbgc->pVM)
    1313             enmMode = DBGFR3CpuGetMode(pDbgc->pVM, DBGCCmdHlpGetCurrentCpu(pCmdHlp));
     1312        if (pDbgc->pUVM)
     1313            enmMode = DBGFR3CpuGetMode(pDbgc->pUVM, DBGCCmdHlpGetCurrentCpu(pCmdHlp));
    13141314        if (enmMode == CPUMMODE_INVALID)
    13151315#if HC_ARCH_BITS == 64
  • trunk/src/VBox/Debugger/DBGCCommands.cpp

    r41938 r44399  
    4848*   Internal Functions                                                         *
    4949*******************************************************************************/
    50 static DECLCALLBACK(int) dbgcCmdHelp(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    51 static DECLCALLBACK(int) dbgcCmdQuit(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    52 static DECLCALLBACK(int) dbgcCmdStop(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    53 static DECLCALLBACK(int) dbgcCmdDetect(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    54 static DECLCALLBACK(int) dbgcCmdCpu(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    55 static DECLCALLBACK(int) dbgcCmdInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    56 static DECLCALLBACK(int) dbgcCmdLog(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    57 static DECLCALLBACK(int) dbgcCmdLogDest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    58 static DECLCALLBACK(int) dbgcCmdLogFlags(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    59 static DECLCALLBACK(int) dbgcCmdFormat(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    60 static DECLCALLBACK(int) dbgcCmdLoadImage(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    61 static DECLCALLBACK(int) dbgcCmdLoadMap(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    62 static DECLCALLBACK(int) dbgcCmdLoadSeg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    63 static DECLCALLBACK(int) dbgcCmdLoadSyms(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    64 static DECLCALLBACK(int) dbgcCmdSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    65 static DECLCALLBACK(int) dbgcCmdUnset(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    66 static DECLCALLBACK(int) dbgcCmdLoadVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    67 static DECLCALLBACK(int) dbgcCmdShowVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    68 static DECLCALLBACK(int) dbgcCmdLoadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    69 static DECLCALLBACK(int) dbgcCmdUnloadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    70 static DECLCALLBACK(int) dbgcCmdShowPlugIns(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    71 static DECLCALLBACK(int) dbgcCmdHarakiri(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    72 static DECLCALLBACK(int) dbgcCmdEcho(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    73 static DECLCALLBACK(int) dbgcCmdRunScript(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    74 static DECLCALLBACK(int) dbgcCmdWriteCore(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
     50static FNDBGCCMD dbgcCmdHelp;
     51static FNDBGCCMD dbgcCmdQuit;
     52static FNDBGCCMD dbgcCmdStop;
     53static FNDBGCCMD dbgcCmdDetect;
     54static FNDBGCCMD dbgcCmdCpu;
     55static FNDBGCCMD dbgcCmdInfo;
     56static FNDBGCCMD dbgcCmdLog;
     57static FNDBGCCMD dbgcCmdLogDest;
     58static FNDBGCCMD dbgcCmdLogFlags;
     59static FNDBGCCMD dbgcCmdFormat;
     60static FNDBGCCMD dbgcCmdLoadImage;
     61static FNDBGCCMD dbgcCmdLoadMap;
     62static FNDBGCCMD dbgcCmdLoadSeg;
     63static FNDBGCCMD dbgcCmdLoadSyms;
     64static FNDBGCCMD dbgcCmdSet;
     65static FNDBGCCMD dbgcCmdUnset;
     66static FNDBGCCMD dbgcCmdLoadVars;
     67static FNDBGCCMD dbgcCmdShowVars;
     68static FNDBGCCMD dbgcCmdLoadPlugIn;
     69static FNDBGCCMD dbgcCmdUnloadPlugIn;
     70static FNDBGCCMD dbgcCmdShowPlugIns;
     71static FNDBGCCMD dbgcCmdHarakiri;
     72static FNDBGCCMD dbgcCmdEcho;
     73static FNDBGCCMD dbgcCmdRunScript;
     74static FNDBGCCMD dbgcCmdWriteCore;
    7575
    7676
     
    718718
    719719/**
    720  * The 'help' command.
    721  *
    722  * @returns VBox status.
    723  * @param   pCmd        Pointer to the command descriptor (as registered).
    724  * @param   pCmdHlp     Pointer to command helper functions.
    725  * @param   pVM         Pointer to the current VM (if any).
    726  * @param   paArgs      Pointer to (readonly) array of arguments.
    727  * @param   cArgs       Number of arguments in the array.
    728  */
    729 static DECLCALLBACK(int) dbgcCmdHelp(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     720 * @interface_method_impl{FNDBCCMD, The 'help' command.}
     721 */
     722static DECLCALLBACK(int) dbgcCmdHelp(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    730723{
    731724    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    833826
    834827    NOREF(pCmd);
    835     NOREF(pVM);
     828    NOREF(pUVM);
    836829    return rc;
    837830}
     
    839832
    840833/**
    841  * The 'quit', 'exit' and 'bye' commands.
    842  *
    843  * @returns VBox status.
    844  * @param   pCmd        Pointer to the command descriptor (as registered).
    845  * @param   pCmdHlp     Pointer to command helper functions.
    846  * @param   pVM         Pointer to the current VM (if any).
    847  * @param   paArgs      Pointer to (readonly) array of arguments.
    848  * @param   cArgs       Number of arguments in the array.
    849  */
    850 static DECLCALLBACK(int) dbgcCmdQuit(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    851 {
    852     pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Quitting console...\n");
     834 * @interface_method_impl{FNDBCCMD, The 'quit', 'exit' and 'bye' commands. }
     835 */
     836static DECLCALLBACK(int) dbgcCmdQuit(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     837{
     838    DBGCCmdHlpPrintf(pCmdHlp, "Quitting console...\n");
    853839    NOREF(pCmd);
    854     NOREF(pVM);
     840    NOREF(pUVM);
    855841    NOREF(paArgs);
    856842    NOREF(cArgs);
     
    860846
    861847/**
    862  * The 'stop' command.
    863  *
    864  * @returns VBox status.
    865  * @param   pCmd        Pointer to the command descriptor (as registered).
    866  * @param   pCmdHlp     Pointer to command helper functions.
    867  * @param   pVM         Pointer to the current VM (if any).
    868  * @param   paArgs      Pointer to (readonly) array of arguments.
    869  * @param   cArgs       Number of arguments in the array.
    870  */
    871 static DECLCALLBACK(int) dbgcCmdStop(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     848 * @interface_method_impl{FNDBCCMD, The 'stop' command.}
     849 */
     850static DECLCALLBACK(int) dbgcCmdStop(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    872851{
    873852    /*
     
    875854     */
    876855    int rc;
    877     if (DBGFR3IsHalted(pVM))
    878         rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "warning: The VM is already halted...\n");
     856    if (DBGFR3IsHalted(pUVM))
     857        rc = DBGCCmdHlpPrintf(pCmdHlp, "warning: The VM is already halted...\n");
    879858    else
    880859    {
    881         rc = DBGFR3Halt(pVM);
     860        rc = DBGFR3Halt(pUVM);
    882861        if (RT_SUCCESS(rc))
    883862            rc = VWRN_DBGC_CMD_PENDING;
    884863        else
    885             rc = pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Executing DBGFR3Halt().");
     864            rc = DBGCCmdHlpVBoxError(pCmdHlp, rc, "Executing DBGFR3Halt().");
    886865    }
    887866
     
    892871
    893872/**
    894  * The 'echo' command.
    895  *
    896  * @returns VBox status.
    897  * @param   pCmd        Pointer to the command descriptor (as registered).
    898  * @param   pCmdHlp     Pointer to command helper functions.
    899  * @param   pVM         Pointer to the current VM (if any).
    900  * @param   paArgs      Pointer to (readonly) array of arguments.
    901  * @param   cArgs       Number of arguments in the array.
    902  */
    903 static DECLCALLBACK(int) dbgcCmdEcho(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     873 * @interface_method_impl{FNDBCCMD, The 'echo' command.}
     874 */
     875static DECLCALLBACK(int) dbgcCmdEcho(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    904876{
    905877    /*
     
    910882    {
    911883        AssertReturn(paArgs[i].enmType == DBGCVAR_TYPE_STRING, VERR_DBGC_PARSE_BUG);
    912         rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, i ? " %s" : "%s", paArgs[i].u.pszString);
     884        rc = DBGCCmdHlpPrintf(pCmdHlp, i ? " %s" : "%s", paArgs[i].u.pszString);
    913885        if (RT_FAILURE(rc))
    914886            return rc;
    915887    }
    916     NOREF(pCmd); NOREF(pVM);
    917     return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "\n");
    918 }
    919 
    920 
    921 /**
    922  * The 'runscript' command.
    923  *
    924  * @returns VBox status.
    925  * @param   pCmd        Pointer to the command descriptor (as registered).
    926  * @param   pCmdHlp     Pointer to command helper functions.
    927  * @param   pVM         Pointer to the current VM (if any).
    928  * @param   paArgs      Pointer to (readonly) array of arguments.
    929  * @param   cArgs       Number of arguments in the array.
    930  */
    931 static DECLCALLBACK(int) dbgcCmdRunScript(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     888    NOREF(pCmd); NOREF(pUVM);
     889    return DBGCCmdHlpPrintf(pCmdHlp, "\n");
     890}
     891
     892
     893/**
     894 * @interface_method_impl{FNDBCCMD, The 'runscript' command.}
     895 */
     896static DECLCALLBACK(int) dbgcCmdRunScript(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    932897{
    933898    /* check that the parser did what it's supposed to do. */
    934899    if (    cArgs != 1
    935900        ||  paArgs[0].enmType != DBGCVAR_TYPE_STRING)
    936         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "parser error\n");
     901        return DBGCCmdHlpPrintf(pCmdHlp, "parser error\n");
    937902
    938903    /** @todo Load the script here, but someone else should do the actual
     
    945910    FILE *pFile = fopen(pszFilename, "r");
    946911    if (!pFile)
    947         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Failed to open '%s'.\n", pszFilename);
     912        return DBGCCmdHlpPrintf(pCmdHlp, "Failed to open '%s'.\n", pszFilename);
    948913
    949914    /*
     
    959924        if (pszEnd == &szLine[sizeof(szLine) - 1])
    960925        {
    961             rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "runscript error: Line #%u is too long\n", iLine);
     926            rc = DBGCCmdHlpPrintf(pCmdHlp, "runscript error: Line #%u is too long\n", iLine);
    962927            break;
    963928        }
     
    990955        {
    991956            if (rc == VERR_BUFFER_OVERFLOW)
    992                 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "runscript error: Line #%u is too long (exec overflowed)\n", iLine);
     957                rc = DBGCCmdHlpPrintf(pCmdHlp, "runscript error: Line #%u is too long (exec overflowed)\n", iLine);
    993958            break;
    994959        }
    995960        if (rc == VWRN_DBGC_CMD_PENDING)
    996961        {
    997             rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "runscript error: VWRN_DBGC_CMD_PENDING on line #%u, script terminated\n", iLine);
     962            rc = DBGCCmdHlpPrintf(pCmdHlp, "runscript error: VWRN_DBGC_CMD_PENDING on line #%u, script terminated\n", iLine);
    998963            break;
    999964        }
     
    1002967    fclose(pFile);
    1003968
    1004     NOREF(pCmd); NOREF(pVM);
     969    NOREF(pCmd); NOREF(pUVM);
    1005970    return rc;
    1006971}
     
    1008973
    1009974/**
    1010  * The 'detect' command.
    1011  *
    1012  * @returns VBox status.
    1013  * @param   pCmd        Pointer to the command descriptor (as registered).
    1014  * @param   pCmdHlp     Pointer to command helper functions.
    1015  * @param   pVM         Pointer to the current VM (if any).
    1016  * @param   paArgs      Pointer to (readonly) array of arguments.
    1017  * @param   cArgs       Number of arguments in the array.
    1018  */
    1019 static DECLCALLBACK(int) dbgcCmdDetect(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     975 * @interface_method_impl{FNDBCCMD, The 'detect' command.}
     976 */
     977static DECLCALLBACK(int) dbgcCmdDetect(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    1020978{
    1021979    /* check that the parser did what it's supposed to do. */
    1022980    if (cArgs != 0)
    1023         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "parser error\n");
     981        return DBGCCmdHlpPrintf(pCmdHlp, "parser error\n");
    1024982
    1025983    /*
     
    1027985     */
    1028986    char szName[64];
    1029     int rc = DBGFR3OSDetect(pVM, szName, sizeof(szName));
     987    int rc = DBGFR3OSDetect(pUVM, szName, sizeof(szName));
    1030988    if (RT_FAILURE(rc))
    1031         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Executing DBGFR3OSDetect().");
     989        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Executing DBGFR3OSDetect().");
    1032990    if (rc == VINF_SUCCESS)
    1033991    {
    1034         rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Guest OS: %s\n", szName);
     992        rc = DBGCCmdHlpPrintf(pCmdHlp, "Guest OS: %s\n", szName);
    1035993        char szVersion[512];
    1036         int rc2 = DBGFR3OSQueryNameAndVersion(pVM, NULL, 0, szVersion, sizeof(szVersion));
     994        int rc2 = DBGFR3OSQueryNameAndVersion(pUVM, NULL, 0, szVersion, sizeof(szVersion));
    1037995        if (RT_SUCCESS(rc2))
    1038             rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Version : %s\n", szVersion);
     996            rc = DBGCCmdHlpPrintf(pCmdHlp, "Version : %s\n", szVersion);
    1039997    }
    1040998    else
    1041         rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Unable to figure out which guest OS it is, sorry.\n");
     999        rc = DBGCCmdHlpPrintf(pCmdHlp, "Unable to figure out which guest OS it is, sorry.\n");
    10421000    NOREF(pCmd); NOREF(paArgs);
    10431001    return rc;
     
    10461004
    10471005/**
    1048  * The 'cpu' command.
    1049  *
    1050  * @returns VBox status.
    1051  * @param   pCmd        Pointer to the command descriptor (as registered).
    1052  * @param   pCmdHlp     Pointer to command helper functions.
    1053  * @param   pVM         Pointer to the current VM (if any).
    1054  * @param   paArgs      Pointer to (readonly) array of arguments.
    1055  * @param   cArgs       Number of arguments in the array.
    1056  */
    1057 static DECLCALLBACK(int) dbgcCmdCpu(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1006 * @interface_method_impl{FNDBCCMD, The 'cpu' command.}
     1007 */
     1008static DECLCALLBACK(int) dbgcCmdCpu(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    10581009{
    10591010    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    10631014        &&  (   cArgs != 1
    10641015             || paArgs[0].enmType != DBGCVAR_TYPE_NUMBER))
    1065         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "parser error\n");
    1066     if (!pVM)
    1067         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     1016        return DBGCCmdHlpPrintf(pCmdHlp, "parser error\n");
     1017    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    10681018
    10691019    int rc;
    10701020    if (!cArgs)
    1071         rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Current CPU ID: %u\n", pDbgc->idCpu);
     1021        rc = DBGCCmdHlpPrintf(pCmdHlp, "Current CPU ID: %u\n", pDbgc->idCpu);
    10721022    else
    10731023    {
    1074 /** @todo add a DBGF getter for this. */
    1075         if (paArgs[0].u.u64Number >= pVM->cCpus)
    1076             rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: idCpu %u is out of range! Highest ID is %u.\n",
    1077                                     paArgs[0].u.u64Number, pVM->cCpus);
     1024        VMCPUID cCpus = DBGFR3CpuGetCount(pUVM);
     1025        if (paArgs[0].u.u64Number >= cCpus)
     1026            rc = DBGCCmdHlpPrintf(pCmdHlp, "error: idCpu %u is out of range! Highest ID is %u.\n",
     1027                                    paArgs[0].u.u64Number, cCpus);
    10781028        else
    10791029        {
    1080             rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Changed CPU from %u to %u.\n",
     1030            rc = DBGCCmdHlpPrintf(pCmdHlp, "Changed CPU from %u to %u.\n",
    10811031                                    pDbgc->idCpu, (VMCPUID)paArgs[0].u.u64Number);
    10821032            pDbgc->idCpu = (VMCPUID)paArgs[0].u.u64Number;
     
    10881038
    10891039/**
    1090  * The 'info' command.
    1091  *
    1092  * @returns VBox status.
    1093  * @param   pCmd        Pointer to the command descriptor (as registered).
    1094  * @param   pCmdHlp     Pointer to command helper functions.
    1095  * @param   pVM         Pointer to the current VM (if any).
    1096  * @param   paArgs      Pointer to (readonly) array of arguments.
    1097  * @param   cArgs       Number of arguments in the array.
    1098  */
    1099 static DECLCALLBACK(int) dbgcCmdInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1040 * @interface_method_impl{FNDBCCMD, The 'info' command.}
     1041 */
     1042static DECLCALLBACK(int) dbgcCmdInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    11001043{
    11011044    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    11081051        ||  paArgs[0].enmType != DBGCVAR_TYPE_STRING
    11091052        ||  paArgs[cArgs - 1].enmType != DBGCVAR_TYPE_STRING)
    1110         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "internal error: The parser doesn't do its job properly yet.. quote the string.\n");
    1111     if (!pVM)
    1112         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     1053        return DBGCCmdHlpPrintf(pCmdHlp, "internal error: The parser doesn't do its job properly yet.. quote the string.\n");
     1054    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    11131055
    11141056    /*
    11151057     * Dump it.
    11161058     */
    1117     int rc = DBGFR3InfoEx(pVM, pDbgc->idCpu,
     1059    int rc = DBGFR3InfoEx(pUVM, pDbgc->idCpu,
    11181060                          paArgs[0].u.pszString,
    11191061                          cArgs == 2 ? paArgs[1].u.pszString : NULL,
    11201062                          DBGCCmdHlpGetDbgfOutputHlp(pCmdHlp));
    11211063    if (RT_FAILURE(rc))
    1122         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3InfoEx()\n");
     1064        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3InfoEx()\n");
    11231065
    11241066    NOREF(pCmd);
     
    11281070
    11291071/**
    1130  * The 'log' command.
    1131  *
    1132  * @returns VBox status.
    1133  * @param   pCmd        Pointer to the command descriptor (as registered).
    1134  * @param   pCmdHlp     Pointer to command helper functions.
    1135  * @param   pVM         Pointer to the current VM (if any).
    1136  * @param   paArgs      Pointer to (readonly) array of arguments.
    1137  * @param   cArgs       Number of arguments in the array.
    1138  */
    1139 static DECLCALLBACK(int) dbgcCmdLog(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    1140 {
    1141     int rc = DBGFR3LogModifyGroups(pVM, paArgs[0].u.pszString);
     1072 * @interface_method_impl{FNDBCCMD, The 'log' command.}
     1073 */
     1074static DECLCALLBACK(int) dbgcCmdLog(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     1075{
     1076    int rc = DBGFR3LogModifyGroups(pUVM, paArgs[0].u.pszString);
    11421077    if (RT_SUCCESS(rc))
    11431078        return VINF_SUCCESS;
    11441079    NOREF(pCmd); NOREF(cArgs);
    1145     return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3LogModifyGroups(%p,'%s')\n", pVM, paArgs[0].u.pszString);
    1146 }
    1147 
    1148 
    1149 /**
    1150  * The 'logdest' command.
    1151  *
    1152  * @returns VBox status.
    1153  * @param   pCmd        Pointer to the command descriptor (as registered).
    1154  * @param   pCmdHlp     Pointer to command helper functions.
    1155  * @param   pVM         Pointer to the current VM (if any).
    1156  * @param   paArgs      Pointer to (readonly) array of arguments.
    1157  * @param   cArgs       Number of arguments in the array.
    1158  */
    1159 static DECLCALLBACK(int) dbgcCmdLogDest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    1160 {
    1161     int rc = DBGFR3LogModifyDestinations(pVM, paArgs[0].u.pszString);
     1080    return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3LogModifyGroups(%p,'%s')\n", pUVM, paArgs[0].u.pszString);
     1081}
     1082
     1083
     1084/**
     1085 * @interface_method_impl{FNDBCCMD, The 'logdest' command.}
     1086 */
     1087static DECLCALLBACK(int) dbgcCmdLogDest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     1088{
     1089    int rc = DBGFR3LogModifyDestinations(pUVM, paArgs[0].u.pszString);
    11621090    if (RT_SUCCESS(rc))
    11631091        return VINF_SUCCESS;
    11641092    NOREF(pCmd); NOREF(cArgs);
    1165     return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3LogModifyDestinations(%p,'%s')\n", pVM, paArgs[0].u.pszString);
    1166 }
    1167 
    1168 
    1169 /**
    1170  * The 'logflags' command.
    1171  *
    1172  * @returns VBox status.
    1173  * @param   pCmd        Pointer to the command descriptor (as registered).
    1174  * @param   pCmdHlp     Pointer to command helper functions.
    1175  * @param   pVM         Pointer to the current VM (if any).
    1176  * @param   paArgs      Pointer to (readonly) array of arguments.
    1177  * @param   cArgs       Number of arguments in the array.
    1178  */
    1179 static DECLCALLBACK(int) dbgcCmdLogFlags(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    1180 {
    1181     int rc = DBGFR3LogModifyFlags(pVM, paArgs[0].u.pszString);
     1093    return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3LogModifyDestinations(%p,'%s')\n", pUVM, paArgs[0].u.pszString);
     1094}
     1095
     1096
     1097/**
     1098 * @interface_method_impl{FNDBCCMD, The 'logflags' command.}
     1099 */
     1100static DECLCALLBACK(int) dbgcCmdLogFlags(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     1101{
     1102    int rc = DBGFR3LogModifyFlags(pUVM, paArgs[0].u.pszString);
    11821103    if (RT_SUCCESS(rc))
    11831104        return VINF_SUCCESS;
    11841105    NOREF(pCmd); NOREF(cArgs);
    1185     return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3LogModifyFlags(%p,'%s')\n", pVM, paArgs[0].u.pszString);
    1186 }
    1187 
    1188 
    1189 /**
    1190  * The 'format' command.
    1191  *
    1192  * @returns VBox status.
    1193  * @param   pCmd        Pointer to the command descriptor (as registered).
    1194  * @param   pCmdHlp     Pointer to command helper functions.
    1195  * @param   pVM         Pointer to the current VM (if any).
    1196  * @param   paArgs      Pointer to (readonly) array of arguments.
    1197  * @param   cArgs       Number of arguments in the array.
    1198  */
    1199 static DECLCALLBACK(int) dbgcCmdFormat(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1106    return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3LogModifyFlags(%p,'%s')\n", pUVM, paArgs[0].u.pszString);
     1107}
     1108
     1109
     1110/**
     1111 * @interface_method_impl{FNDBCCMD, The 'format' command.}
     1112 */
     1113static DECLCALLBACK(int) dbgcCmdFormat(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    12001114{
    12011115    LogFlow(("dbgcCmdFormat\n"));
     
    12111125        {
    12121126            case DBGCVAR_TYPE_UNKNOWN:
    1213                 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1127                rc = DBGCCmdHlpPrintf(pCmdHlp,
    12141128                    "Unknown variable type!\n");
    12151129                break;
    12161130            case DBGCVAR_TYPE_GC_FLAT:
    12171131                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1218                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1132                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12191133                        "Guest flat address: %%%08x range %lld %s\n",
    12201134                        paArgs[iArg].u.GCFlat,
     
    12221136                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    12231137                else
    1224                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1138                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12251139                        "Guest flat address: %%%08x\n",
    12261140                        paArgs[iArg].u.GCFlat);
     
    12281142            case DBGCVAR_TYPE_GC_FAR:
    12291143                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1230                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1144                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12311145                        "Guest far address: %04x:%08x range %lld %s\n",
    12321146                        paArgs[iArg].u.GCFar.sel,
     
    12351149                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    12361150                else
    1237                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1151                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12381152                        "Guest far address: %04x:%08x\n",
    12391153                        paArgs[iArg].u.GCFar.sel,
     
    12421156            case DBGCVAR_TYPE_GC_PHYS:
    12431157                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1244                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1158                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12451159                        "Guest physical address: %%%%%08x range %lld %s\n",
    12461160                        paArgs[iArg].u.GCPhys,
     
    12481162                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    12491163                else
    1250                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1164                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12511165                        "Guest physical address: %%%%%08x\n",
    12521166                        paArgs[iArg].u.GCPhys);
     
    12541168            case DBGCVAR_TYPE_HC_FLAT:
    12551169                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1256                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1170                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12571171                        "Host flat address: %%%08x range %lld %s\n",
    12581172                        paArgs[iArg].u.pvHCFlat,
     
    12601174                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    12611175                else
    1262                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1176                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12631177                        "Host flat address: %%%08x\n",
    12641178                        paArgs[iArg].u.pvHCFlat);
     
    12661180            case DBGCVAR_TYPE_HC_PHYS:
    12671181                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1268                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1182                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12691183                        "Host physical address: %RHp range %lld %s\n",
    12701184                        paArgs[iArg].u.HCPhys,
     
    12721186                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    12731187                else
    1274                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1188                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12751189                        "Host physical address: %RHp\n",
    12761190                        paArgs[iArg].u.HCPhys);
     
    12781192
    12791193            case DBGCVAR_TYPE_STRING:
    1280                 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1194                rc = DBGCCmdHlpPrintf(pCmdHlp,
    12811195                    "String, %lld bytes long: %s\n",
    12821196                    paArgs[iArg].u64Range,
     
    12851199
    12861200            case DBGCVAR_TYPE_SYMBOL:
    1287                 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1201                rc = DBGCCmdHlpPrintf(pCmdHlp,
    12881202                    "Symbol, %lld bytes long: %s\n",
    12891203                    paArgs[iArg].u64Range,
     
    12931207            case DBGCVAR_TYPE_NUMBER:
    12941208                if (paArgs[iArg].enmRangeType != DBGCVAR_RANGE_NONE)
    1295                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1209                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    12961210                        "Number: hex %llx  dec 0i%lld  oct 0t%llo  range %lld %s\n",
    12971211                        paArgs[iArg].u.u64Number,
     
    13011215                        apszRangeDesc[paArgs[iArg].enmRangeType]);
    13021216                else
    1303                     rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1217                    rc = DBGCCmdHlpPrintf(pCmdHlp,
    13041218                        "Number: hex %llx  dec 0i%lld  oct 0t%llo\n",
    13051219                        paArgs[iArg].u.u64Number,
     
    13091223
    13101224            default:
    1311                 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1225                rc = DBGCCmdHlpPrintf(pCmdHlp,
    13121226                    "Invalid argument type %d\n",
    13131227                    paArgs[iArg].enmType);
     
    13161230    } /* arg loop */
    13171231
    1318     NOREF(pCmd); NOREF(pVM);
     1232    NOREF(pCmd); NOREF(pUVM);
    13191233    return 0;
    13201234}
     
    13221236
    13231237/**
    1324  * The 'loadimage' command.
    1325  *
    1326  * @returns VBox status.
    1327  * @param   pCmd        Pointer to the command descriptor (as registered).
    1328  * @param   pCmdHlp     Pointer to command helper functions.
    1329  * @param   pVM         Pointer to the current VM (if any).
    1330  * @param   paArgs      Pointer to (readonly) array of arguments.
    1331  * @param   cArgs       Number of arguments in the array.
    1332  */
    1333 static DECLCALLBACK(int) dbgcCmdLoadImage(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1238 * @interface_method_impl{FNDBCCMD, The 'loadimage' command.}
     1239 */
     1240static DECLCALLBACK(int) dbgcCmdLoadImage(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    13341241{
    13351242    /*
     
    13481255    int rc = pCmdHlp->pfnVarToDbgfAddr(pCmdHlp, &paArgs[1], &ModAddress);
    13491256    if (RT_FAILURE(rc))
    1350         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
     1257        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
    13511258
    13521259    const char     *pszModName  = NULL;
     
    13611268     */
    13621269    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    1363     rc = DBGFR3AsLoadImage(pVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, NIL_RTDBGSEGIDX, 0 /*fFlags*/);
     1270    rc = DBGFR3AsLoadImage(pUVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, NIL_RTDBGSEGIDX, 0 /*fFlags*/);
    13641271    if (RT_FAILURE(rc))
    1365         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3ModuleLoadImage(,,'%s','%s',%Dv,)\n",
    1366                                      pszFilename, pszModName, &paArgs[1]);
     1272        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3ModuleLoadImage(,,'%s','%s',%Dv,)\n",
     1273                                   pszFilename, pszModName, &paArgs[1]);
    13671274
    13681275    NOREF(pCmd);
     
    13721279
    13731280/**
    1374  * The 'loadmap' command.
    1375  *
    1376  * @returns VBox status.
    1377  * @param   pCmd        Pointer to the command descriptor (as registered).
    1378  * @param   pCmdHlp     Pointer to command helper functions.
    1379  * @param   pVM         Pointer to the current VM (if any).
    1380  * @param   paArgs      Pointer to (readonly) array of arguments.
    1381  * @param   cArgs       Number of arguments in the array.
    1382  */
    1383 static DECLCALLBACK(int) dbgcCmdLoadMap(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1281 * @interface_method_impl{FNDBCCMD, The 'loadmap' command.}
     1282 */
     1283static DECLCALLBACK(int) dbgcCmdLoadMap(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    13841284{
    13851285    /*
     
    13981298    int rc = pCmdHlp->pfnVarToDbgfAddr(pCmdHlp, &paArgs[1], &ModAddress);
    13991299    if (RT_FAILURE(rc))
    1400         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
     1300        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
    14011301
    14021302    const char     *pszModName  = NULL;
     
    14211321        if (    iModSeg != paArgs[4].u.u64Number
    14221322            ||  iModSeg > RTDBGSEGIDX_LAST)
    1423             return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Segment index out of range: %Dv; range={0..%#x}\n", &paArgs[1], RTDBGSEGIDX_LAST);
     1323            return DBGCCmdHlpPrintf(pCmdHlp, "Segment index out of range: %Dv; range={0..%#x}\n", &paArgs[1], RTDBGSEGIDX_LAST);
    14241324    }
    14251325
     
    14281328     */
    14291329    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    1430     rc = DBGFR3AsLoadMap(pVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, NIL_RTDBGSEGIDX, uSubtrahend, 0 /*fFlags*/);
     1330    rc = DBGFR3AsLoadMap(pUVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, NIL_RTDBGSEGIDX, uSubtrahend, 0 /*fFlags*/);
    14311331    if (RT_FAILURE(rc))
    1432         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3AsLoadMap(,,'%s','%s',%Dv,)\n",
    1433                                      pszFilename, pszModName, &paArgs[1]);
     1332        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3AsLoadMap(,,'%s','%s',%Dv,)\n",
     1333                                   pszFilename, pszModName, &paArgs[1]);
    14341334
    14351335    NOREF(pCmd);
     
    14391339
    14401340/**
    1441  * The 'loadseg' command.
    1442  *
    1443  * @returns VBox status.
    1444  * @param   pCmd        Pointer to the command descriptor (as registered).
    1445  * @param   pCmdHlp     Pointer to command helper functions.
    1446  * @param   pVM         Pointer to the current VM (if any).
    1447  * @param   paArgs      Pointer to (readonly) array of arguments.
    1448  * @param   cArgs       Number of arguments in the array.
    1449  */
    1450 static DECLCALLBACK(int) dbgcCmdLoadSeg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1341 * @interface_method_impl{FNDBCCMD, The 'loadseg' command.}
     1342 */
     1343static DECLCALLBACK(int) dbgcCmdLoadSeg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    14511344{
    14521345    /*
     
    14661359    int rc = pCmdHlp->pfnVarToDbgfAddr(pCmdHlp, &paArgs[1], &ModAddress);
    14671360    if (RT_FAILURE(rc))
    1468         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
     1361        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "pfnVarToDbgfAddr: %Dv\n", &paArgs[1]);
    14691362
    14701363    RTDBGSEGIDX     iModSeg     = (RTDBGSEGIDX)paArgs[1].u.u64Number;
    14711364    if (    iModSeg != paArgs[2].u.u64Number
    14721365        ||  iModSeg > RTDBGSEGIDX_LAST)
    1473         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Segment index out of range: %Dv; range={0..%#x}\n", &paArgs[1], RTDBGSEGIDX_LAST);
     1366        return DBGCCmdHlpPrintf(pCmdHlp, "Segment index out of range: %Dv; range={0..%#x}\n", &paArgs[1], RTDBGSEGIDX_LAST);
    14741367
    14751368    const char     *pszModName  = NULL;
     
    14841377     */
    14851378    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    1486     rc = DBGFR3AsLoadImage(pVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, iModSeg, 0 /*fFlags*/);
     1379    rc = DBGFR3AsLoadImage(pUVM, pDbgc->hDbgAs, pszFilename, pszModName, &ModAddress, iModSeg, 0 /*fFlags*/);
    14871380    if (RT_FAILURE(rc))
    1488         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3ModuleLoadImage(,,'%s','%s',%Dv,)\n",
    1489                                      pszFilename, pszModName, &paArgs[1]);
     1381        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3ModuleLoadImage(,,'%s','%s',%Dv,)\n",
     1382                                   pszFilename, pszModName, &paArgs[1]);
    14901383
    14911384    NOREF(pCmd);
     
    14951388
    14961389/**
    1497  * The 'loadsyms' command.
    1498  *
    1499  * @returns VBox status.
    1500  * @param   pCmd        Pointer to the command descriptor (as registered).
    1501  * @param   pCmdHlp     Pointer to command helper functions.
    1502  * @param   pVM         Pointer to the current VM (if any).
    1503  * @param   paArgs      Pointer to (readonly) array of arguments.
    1504  * @param   cArgs       Number of arguments in the array.
    1505  */
    1506 static DECLCALLBACK(int) dbgcCmdLoadSyms(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1390 * @interface_method_impl{FNDBCCMD, The 'loadsyms' command.}
     1391 */
     1392static DECLCALLBACK(int) dbgcCmdLoadSyms(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    15071393{
    15081394    /*
     
    15471433                int rc = DBGCCmdHlpEval(pCmdHlp, &AddrVar, "%%(%Dv)", &paArgs[iArg]);
    15481434                if (RT_FAILURE(rc))
    1549                     return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Module address cast %%(%Dv) failed.", &paArgs[iArg]);
     1435                    return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Module address cast %%(%Dv) failed.", &paArgs[iArg]);
    15501436                ModuleAddress = paArgs[iArg].u.GCFlat;
    15511437                iArg++;
     
    15721458     * Call the debug info manager about this loading...
    15731459     */
    1574     int rc = DBGFR3ModuleLoad(pVM, paArgs[0].u.pszString, Delta, pszModule, ModuleAddress, cbModule);
     1460    int rc = DBGFR3ModuleLoad(pUVM, paArgs[0].u.pszString, Delta, pszModule, ModuleAddress, cbModule);
    15751461    if (RT_FAILURE(rc))
    1576         return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGInfoSymbolLoad(, '%s', %RGv, '%s', %RGv, 0)\n",
    1577                                      paArgs[0].u.pszString, Delta, pszModule, ModuleAddress);
     1462        return DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGInfoSymbolLoad(, '%s', %RGv, '%s', %RGv, 0)\n",
     1463                                   paArgs[0].u.pszString, Delta, pszModule, ModuleAddress);
    15781464
    15791465    NOREF(pCmd);
     
    15831469
    15841470/**
    1585  * The 'set' command.
    1586  *
    1587  * @returns VBox status.
    1588  * @param   pCmd        Pointer to the command descriptor (as registered).
    1589  * @param   pCmdHlp     Pointer to command helper functions.
    1590  * @param   pVM         Pointer to the current VM (if any).
    1591  * @param   paArgs      Pointer to (readonly) array of arguments.
    1592  * @param   cArgs       Number of arguments in the array.
    1593  */
    1594 static DECLCALLBACK(int) dbgcCmdSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1471 * @interface_method_impl{FNDBCCMD, The 'set' command.}
     1472 */
     1473static DECLCALLBACK(int) dbgcCmdSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    15951474{
    15961475    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    16071486    const char *pszVar = paArgs[0].u.pszString;
    16081487    if (!RT_C_IS_ALPHA(*pszVar) || *pszVar == '_')
    1609         return pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1488        return DBGCCmdHlpPrintf(pCmdHlp,
    16101489            "syntax error: Invalid variable name '%s'. Variable names must match regex '[_a-zA-Z][_a-zA-Z0-9*'!", paArgs[0].u.pszString);
    16111490
     
    16131492        *pszVar++;
    16141493    if (*pszVar)
    1615         return pCmdHlp->pfnPrintf(pCmdHlp, NULL,
     1494        return DBGCCmdHlpPrintf(pCmdHlp,
    16161495            "syntax error: Invalid variable name '%s'. Variable names must match regex '[_a-zA-Z][_a-zA-Z0-9*]'!", paArgs[0].u.pszString);
    16171496
     
    16711550    pDbgc->papVars[pDbgc->cVars++] = pVar;
    16721551
    1673     NOREF(pCmd); NOREF(pVM); NOREF(cArgs);
     1552    NOREF(pCmd); NOREF(pUVM); NOREF(cArgs);
    16741553    return 0;
    16751554}
     
    16771556
    16781557/**
    1679  * The 'unset' command.
    1680  *
    1681  * @returns VBox status.
    1682  * @param   pCmd        Pointer to the command descriptor (as registered).
    1683  * @param   pCmdHlp     Pointer to command helper functions.
    1684  * @param   pVM         Pointer to the current VM (if any).
    1685  * @param   paArgs      Pointer to (readonly) array of arguments.
    1686  * @param   cArgs       Number of arguments in the array.
    1687  */
    1688 static DECLCALLBACK(int) dbgcCmdUnset(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1558 * @interface_method_impl{FNDBCCMD, The 'unset' command.}
     1559 */
     1560static DECLCALLBACK(int) dbgcCmdUnset(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    16891561{
    16901562    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    17211593    } /* arg loop */
    17221594
    1723     NOREF(pCmd); NOREF(pVM);
     1595    NOREF(pCmd); NOREF(pUVM);
    17241596    return 0;
    17251597}
     
    17271599
    17281600/**
    1729  * The 'loadvars' command.
    1730  *
    1731  * @returns VBox status.
    1732  * @param   pCmd        Pointer to the command descriptor (as registered).
    1733  * @param   pCmdHlp     Pointer to command helper functions.
    1734  * @param   pVM         Pointer to the current VM (if any).
    1735  * @param   paArgs      Pointer to (readonly) array of arguments.
    1736  * @param   cArgs       Number of arguments in the array.
    1737  */
    1738 static DECLCALLBACK(int) dbgcCmdLoadVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1601 * @interface_method_impl{FNDBCCMD, The 'loadvars' command.}
     1602 */
     1603static DECLCALLBACK(int) dbgcCmdLoadVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    17391604{
    17401605    /*
     
    17691634                &&  *psz != ';')
    17701635            {
    1771                 pCmdHlp->pfnPrintf(pCmdHlp, NULL, "dbg: set %s", psz);
     1636                DBGCCmdHlpPrintf(pCmdHlp, "dbg: set %s", psz);
    17721637                pCmdHlp->pfnExec(pCmdHlp, "set %s", psz);
    17731638            }
     
    17761641    }
    17771642    else
    1778         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Failed to open file '%s'.\n", paArgs[0].u.pszString);
    1779 
    1780     NOREF(pCmd); NOREF(pVM);
     1643        return DBGCCmdHlpPrintf(pCmdHlp, "Failed to open file '%s'.\n", paArgs[0].u.pszString);
     1644
     1645    NOREF(pCmd); NOREF(pUVM);
    17811646    return 0;
    17821647}
     
    17841649
    17851650/**
    1786  * The 'showvars' command.
    1787  *
    1788  * @returns VBox status.
    1789  * @param   pCmd        Pointer to the command descriptor (as registered).
    1790  * @param   pCmdHlp     Pointer to command helper functions.
    1791  * @param   pVM         Pointer to the current VM (if any).
    1792  * @param   paArgs      Pointer to (readonly) array of arguments.
    1793  * @param   cArgs       Number of arguments in the array.
    1794  */
    1795 static DECLCALLBACK(int) dbgcCmdShowVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1651 * @interface_method_impl{FNDBCCMD, The 'showvars' command.}
     1652 */
     1653static DECLCALLBACK(int) dbgcCmdShowVars(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    17961654{
    17971655    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    17991657    for (unsigned iVar = 0; iVar < pDbgc->cVars; iVar++)
    18001658    {
    1801         int rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%-20s ", &pDbgc->papVars[iVar]->szName);
     1659        int rc = DBGCCmdHlpPrintf(pCmdHlp, "%-20s ", &pDbgc->papVars[iVar]->szName);
    18021660        if (!rc)
    1803             rc = dbgcCmdFormat(pCmd, pCmdHlp, pVM, &pDbgc->papVars[iVar]->Var, 1);
     1661            rc = dbgcCmdFormat(pCmd, pCmdHlp, pUVM, &pDbgc->papVars[iVar]->Var, 1);
    18041662        if (rc)
    18051663            return rc;
     
    20341892     * Try initialize it.
    20351893     */
    2036     rc = pPlugIn->pfnEntry(DBGCPLUGINOP_INIT, pDbgc->pVM, VBOX_VERSION);
     1894    rc = pPlugIn->pfnEntry(DBGCPLUGINOP_INIT, pDbgc->pUVM, VBOX_VERSION);
    20371895    if (RT_FAILURE(rc))
    20381896    {
     
    21091967
    21101968/**
    2111  * The 'loadplugin' command.
    2112  *
    2113  * @returns VBox status.
    2114  * @param   pCmd        Pointer to the command descriptor (as registered).
    2115  * @param   pCmdHlp     Pointer to command helper functions.
    2116  * @param   pVM         Pointer to the current VM (if any).
    2117  * @param   paArgs      Pointer to (readonly) array of arguments.
    2118  * @param   cArgs       Number of arguments in the array.
    2119  */
    2120 static DECLCALLBACK(int) dbgcCmdLoadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1969 * @interface_method_impl{FNDBCCMD, The 'loadplugin' command.}
     1970 */
     1971static DECLCALLBACK(int) dbgcCmdLoadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    21211972{
    21221973    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    21652016            &&  pDbgc->pVM->enmVMState < VMSTATE_DESTROYING)
    21662017        {
    2167             pPlugIn->pfnEntry(DBGCPLUGINOP_TERM, pDbgc->pVM, 0);
     2018            pPlugIn->pfnEntry(DBGCPLUGINOP_TERM, pDbgc->pUVM, 0);
    21682019            RTLdrClose(pPlugIn->hLdrMod);
    21692020        }
     
    21762027
    21772028/**
    2178  * The 'unload' command.
    2179  *
    2180  * @returns VBox status.
    2181  * @param   pCmd        Pointer to the command descriptor (as registered).
    2182  * @param   pCmdHlp     Pointer to command helper functions.
    2183  * @param   pVM         Pointer to the current VM (if any).
    2184  * @param   paArgs      Pointer to (readonly) array of arguments.
    2185  * @param   cArgs       Number of arguments in the array.
    2186  */
    2187 static DECLCALLBACK(int) dbgcCmdUnloadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2029 * @interface_method_impl{FNDBCCMD, The 'unload' command.}
     2030 */
     2031static DECLCALLBACK(int) dbgcCmdUnloadPlugIn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    21882032{
    21892033    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    22112055         * Terminate and unload it.
    22122056         */
    2213         pPlugIn->pfnEntry(DBGCPLUGINOP_TERM, pDbgc->pVM, 0);
     2057        pPlugIn->pfnEntry(DBGCPLUGINOP_TERM, pDbgc->pUVM, 0);
    22142058        RTLdrClose(pPlugIn->hLdrMod);
    22152059        pPlugIn->hLdrMod = NIL_RTLDRMOD;
     
    22282072
    22292073/**
    2230  * The 'showplugins' command.
    2231  *
    2232  * @returns VBox status.
    2233  * @param   pCmd        Pointer to the command descriptor (as registered).
    2234  * @param   pCmdHlp     Pointer to command helper functions.
    2235  * @param   pVM         Pointer to the current VM (if any).
    2236  * @param   paArgs      Pointer to (readonly) array of arguments.
    2237  * @param   cArgs       Number of arguments in the array.
    2238  */
    2239 static DECLCALLBACK(int) dbgcCmdShowPlugIns(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2074 * @interface_method_impl{FNDBCCMD, The 'showplugins' command.}
     2075 */
     2076static DECLCALLBACK(int) dbgcCmdShowPlugIns(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    22402077{
    22412078    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    22582095
    22592096/**
    2260  * The 'harakiri' command.
    2261  *
    2262  * @returns VBox status.
    2263  * @param   pCmd        Pointer to the command descriptor (as registered).
    2264  * @param   pCmdHlp     Pointer to command helper functions.
    2265  * @param   pVM         Pointer to the current VM (if any).
    2266  * @param   paArgs      Pointer to (readonly) array of arguments.
    2267  * @param   cArgs       Number of arguments in the array.
    2268  */
    2269 static DECLCALLBACK(int) dbgcCmdHarakiri(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2097 * @interface_method_impl{FNDBCCMD, The 'harakiri' command.}
     2098 */
     2099static DECLCALLBACK(int) dbgcCmdHarakiri(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    22702100{
    22712101    Log(("dbgcCmdHarakiri\n"));
    22722102    for (;;)
    22732103        exit(126);
    2274     NOREF(pCmd); NOREF(pCmdHlp); NOREF(pVM); NOREF(paArgs); NOREF(cArgs);
    2275 }
    2276 
    2277 
    2278 /**
    2279  * The 'writecore' command.
    2280  *
    2281  * @returns VBox status.
    2282  * @param   pCmd        Pointer to the command descriptor (as registered).
    2283  * @param   pCmdHlp     Pointer to command helper functions.
    2284  * @param   pVM         Pointer to the current VM (if any).
    2285  * @param   paArgs      Pointer to (readonly) array of arguments.
    2286  * @param   cArgs       Number of arguments in the array.
    2287  */
    2288 static DECLCALLBACK(int) dbgcCmdWriteCore(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2104    NOREF(pCmd); NOREF(pCmdHlp); NOREF(pUVM); NOREF(paArgs); NOREF(cArgs);
     2105}
     2106
     2107
     2108/**
     2109 * @interface_method_impl{FNDBCCMD, The 'writecore' command.}
     2110 */
     2111static DECLCALLBACK(int) dbgcCmdWriteCore(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    22892112{
    22902113    Log(("dbgcCmdWriteCore\n"));
     
    23042127        return DBGCCmdHlpFail(pCmdHlp, pCmd, "Missing file path.\n");
    23052128
    2306     int rc = DBGFR3CoreWrite(pVM, pszDumpPath, true /*fReplaceFile*/);
     2129    int rc = DBGFR3CoreWrite(pUVM, pszDumpPath, true /*fReplaceFile*/);
    23072130    if (RT_FAILURE(rc))
    23082131        return DBGCCmdHlpFail(pCmdHlp, pCmd, "DBGFR3WriteCore failed. rc=%Rrc\n", rc);
     
    23162139 * @callback_method_impl{The randu32() function implementation.}
    23172140 */
    2318 static DECLCALLBACK(int) dbgcFuncRandU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     2141static DECLCALLBACK(int) dbgcFuncRandU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    23192142                                         PDBGCVAR pResult)
    23202143{
     
    23222145    uint32_t u32 = RTRandU32();
    23232146    DBGCVAR_INIT_NUMBER(pResult, u32);
    2324     NOREF(pFunc); NOREF(pCmdHlp); NOREF(pVM); NOREF(paArgs);
     2147    NOREF(pFunc); NOREF(pCmdHlp); NOREF(pUVM); NOREF(paArgs);
    23252148    return VINF_SUCCESS;
    23262149}
  • trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp

    r43325 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4444*   Internal Functions                                                         *
    4545*******************************************************************************/
    46 static DECLCALLBACK(int) dbgcCmdBrkAccess(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    47 static DECLCALLBACK(int) dbgcCmdBrkClear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    48 static DECLCALLBACK(int) dbgcCmdBrkDisable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    49 static DECLCALLBACK(int) dbgcCmdBrkEnable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    50 static DECLCALLBACK(int) dbgcCmdBrkList(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    51 static DECLCALLBACK(int) dbgcCmdBrkSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    52 static DECLCALLBACK(int) dbgcCmdBrkREM(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    53 static DECLCALLBACK(int) dbgcCmdDumpMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    54 static DECLCALLBACK(int) dbgcCmdDumpDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    55 static DECLCALLBACK(int) dbgcCmdDumpIDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    56 static DECLCALLBACK(int) dbgcCmdDumpPageDir(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    57 static DECLCALLBACK(int) dbgcCmdDumpPageDirBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    58 static DECLCALLBACK(int) dbgcCmdDumpPageHierarchy(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    59 static DECLCALLBACK(int) dbgcCmdDumpPageTable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    60 static DECLCALLBACK(int) dbgcCmdDumpPageTableBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    61 static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    62 static DECLCALLBACK(int) dbgcCmdEditMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    63 static DECLCALLBACK(int) dbgcCmdGo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    64 static DECLCALLBACK(int) dbgcCmdListModules(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    65 static DECLCALLBACK(int) dbgcCmdListNear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    66 static DECLCALLBACK(int) dbgcCmdListSource(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    67 static DECLCALLBACK(int) dbgcCmdMemoryInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    68 static DECLCALLBACK(int) dbgcCmdReg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    69 static DECLCALLBACK(int) dbgcCmdRegGuest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    70 static DECLCALLBACK(int) dbgcCmdRegHyper(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    71 static DECLCALLBACK(int) dbgcCmdRegTerse(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    72 static DECLCALLBACK(int) dbgcCmdSearchMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    73 static DECLCALLBACK(int) dbgcCmdSearchMemType(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    74 static DECLCALLBACK(int) dbgcCmdStack(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    75 static DECLCALLBACK(int) dbgcCmdTrace(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
    76 static DECLCALLBACK(int) dbgcCmdUnassemble(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
     46static FNDBGCCMD dbgcCmdBrkAccess;
     47static FNDBGCCMD dbgcCmdBrkClear;
     48static FNDBGCCMD dbgcCmdBrkDisable;
     49static FNDBGCCMD dbgcCmdBrkEnable;
     50static FNDBGCCMD dbgcCmdBrkList;
     51static FNDBGCCMD dbgcCmdBrkSet;
     52static FNDBGCCMD dbgcCmdBrkREM;
     53static FNDBGCCMD dbgcCmdDumpMem;
     54static FNDBGCCMD dbgcCmdDumpDT;
     55static FNDBGCCMD dbgcCmdDumpIDT;
     56static FNDBGCCMD dbgcCmdDumpPageDir;
     57static FNDBGCCMD dbgcCmdDumpPageDirBoth;
     58static FNDBGCCMD dbgcCmdDumpPageHierarchy;
     59static FNDBGCCMD dbgcCmdDumpPageTable;
     60static FNDBGCCMD dbgcCmdDumpPageTableBoth;
     61static FNDBGCCMD dbgcCmdDumpTSS;
     62static FNDBGCCMD dbgcCmdEditMem;
     63static FNDBGCCMD dbgcCmdGo;
     64static FNDBGCCMD dbgcCmdListModules;
     65static FNDBGCCMD dbgcCmdListNear;
     66static FNDBGCCMD dbgcCmdListSource;
     67static FNDBGCCMD dbgcCmdMemoryInfo;
     68static FNDBGCCMD dbgcCmdReg;
     69static FNDBGCCMD dbgcCmdRegGuest;
     70static FNDBGCCMD dbgcCmdRegHyper;
     71static FNDBGCCMD dbgcCmdRegTerse;
     72static FNDBGCCMD dbgcCmdSearchMem;
     73static FNDBGCCMD dbgcCmdSearchMemType;
     74static FNDBGCCMD dbgcCmdStack;
     75static FNDBGCCMD dbgcCmdTrace;
     76static FNDBGCCMD dbgcCmdUnassemble;
    7777
    7878
     
    374374
    375375/**
    376  * The 'go' command.
    377  *
    378  * @returns VBox status.
    379  * @param   pCmd        Pointer to the command descriptor (as registered).
    380  * @param   pCmdHlp     Pointer to command helper functions.
    381  * @param   pVM         Pointer to the current VM (if any).
    382  * @param   paArgs      Pointer to (readonly) array of arguments.
    383  * @param   cArgs       Number of arguments in the array.
    384  */
    385 static DECLCALLBACK(int) dbgcCmdGo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    386 {
    387     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     376 * @interface_method_impl{FNDBCCMD, The 'go' command.}
     377 */
     378static DECLCALLBACK(int) dbgcCmdGo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     379{
     380    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    388381
    389382    /*
    390383     * Check if the VM is halted or not before trying to resume it.
    391384     */
    392     if (!DBGFR3IsHalted(pVM))
     385    if (!DBGFR3IsHalted(pUVM))
    393386        return DBGCCmdHlpFail(pCmdHlp, pCmd, "The VM is already running");
    394387
    395     int rc = DBGFR3Resume(pVM);
     388    int rc = DBGFR3Resume(pUVM);
    396389    if (RT_FAILURE(rc))
    397390        return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3Resume");
     
    403396
    404397/**
    405  * The 'ba' command.
    406  *
    407  * @returns VBox status.
    408  * @param   pCmd        Pointer to the command descriptor (as registered).
    409  * @param   pCmdHlp     Pointer to command helper functions.
    410  * @param   pVM         Pointer to the current VM (if any).
    411  * @param   paArgs      Pointer to (readonly) array of arguments.
    412  * @param   cArgs       Number of arguments in the array.
    413  */
    414 static DECLCALLBACK(int) dbgcCmdBrkAccess(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    415 {
    416     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     398 * @interface_method_impl{FNDBCCMD, The 'ba' command.}
     399 */
     400static DECLCALLBACK(int) dbgcCmdBrkAccess(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     401{
     402    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    417403
    418404    /*
     
    486472     */
    487473    uint32_t iBp;
    488     rc = DBGFR3BpSetReg(pVM, &Address, iHitTrigger, iHitDisable, fType, cb, &iBp);
     474    rc = DBGFR3BpSetReg(pUVM, &Address, iHitTrigger, iHitDisable, fType, cb, &iBp);
    489475    if (RT_SUCCESS(rc))
    490476    {
     
    499485                return DBGCCmdHlpPrintf(pCmdHlp, "Updated access breakpoint %u at %RGv\n", iBp, Address.FlatPtr);
    500486        }
    501         int rc2 = DBGFR3BpClear(pDbgc->pVM, iBp);
     487        int rc2 = DBGFR3BpClear(pDbgc->pUVM, iBp);
    502488        AssertRC(rc2);
    503489    }
     
    507493
    508494/**
    509  * The 'bc' command.
    510  *
    511  * @returns VBox status.
    512  * @param   pCmd        Pointer to the command descriptor (as registered).
    513  * @param   pCmdHlp     Pointer to command helper functions.
    514  * @param   pVM         Pointer to the current VM (if any).
    515  * @param   paArgs      Pointer to (readonly) array of arguments.
    516  * @param   cArgs       Number of arguments in the array.
    517  */
    518 static DECLCALLBACK(int) dbgcCmdBrkClear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    519 {
    520     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     495 * @interface_method_impl{FNDBCCMD, The 'bc' command.}
     496 */
     497static DECLCALLBACK(int) dbgcCmdBrkClear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     498{
     499    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    521500
    522501    /*
     
    533512            if (iBp == paArgs[iArg].u.u64Number)
    534513            {
    535                 int rc2 = DBGFR3BpClear(pVM, iBp);
     514                int rc2 = DBGFR3BpClear(pUVM, iBp);
    536515                if (RT_FAILURE(rc2))
    537516                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc2, "DBGFR3BpClear(,%#x)", iBp);
     
    551530                pBp = pBp->pNext;
    552531
    553                 int rc2 = DBGFR3BpClear(pVM, iBp);
     532                int rc2 = DBGFR3BpClear(pUVM, iBp);
    554533                if (RT_FAILURE(rc2))
    555534                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc2, "DBGFR3BpClear(,%#x)", iBp);
     
    566545
    567546/**
    568  * The 'bd' command.
    569  *
    570  * @returns VBox status.
    571  * @param   pCmd        Pointer to the command descriptor (as registered).
    572  * @param   pCmdHlp     Pointer to command helper functions.
    573  * @param   pVM         Pointer to the current VM (if any).
    574  * @param   paArgs      Pointer to (readonly) array of arguments.
    575  * @param   cArgs       Number of arguments in the array.
    576  */
    577 static DECLCALLBACK(int) dbgcCmdBrkDisable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     547 * @interface_method_impl{FNDBCCMD, The 'bd' command.}
     548 */
     549static DECLCALLBACK(int) dbgcCmdBrkDisable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    578550{
    579551    /*
     
    589561            if (iBp == paArgs[iArg].u.u64Number)
    590562            {
    591                 rc = DBGFR3BpDisable(pVM, iBp);
     563                rc = DBGFR3BpDisable(pUVM, iBp);
    592564                if (RT_FAILURE(rc))
    593565                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3BpDisable failed for breakpoint %#x", iBp);
     
    602574            for (PDBGCBP pBp = pDbgc->pFirstBp; pBp; pBp = pBp->pNext)
    603575            {
    604                 int rc2 = DBGFR3BpDisable(pVM, pBp->iBp);
     576                int rc2 = DBGFR3BpDisable(pUVM, pBp->iBp);
    605577                if (RT_FAILURE(rc2))
    606578                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc2, "DBGFR3BpDisable failed for breakpoint %#x", pBp->iBp);
     
    615587
    616588/**
    617  * The 'be' command.
    618  *
    619  * @returns VBox status.
    620  * @param   pCmd        Pointer to the command descriptor (as registered).
    621  * @param   pCmdHlp     Pointer to command helper functions.
    622  * @param   pVM         Pointer to the current VM (if any).
    623  * @param   paArgs      Pointer to (readonly) array of arguments.
    624  * @param   cArgs       Number of arguments in the array.
    625  */
    626 static DECLCALLBACK(int) dbgcCmdBrkEnable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    627 {
    628     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     589 * @interface_method_impl{FNDBCCMD, The 'be' command.}
     590 */
     591static DECLCALLBACK(int) dbgcCmdBrkEnable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     592{
     593    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    629594
    630595    /*
     
    640605            if (iBp == paArgs[iArg].u.u64Number)
    641606            {
    642                 rc = DBGFR3BpEnable(pVM, iBp);
     607                rc = DBGFR3BpEnable(pUVM, iBp);
    643608                if (RT_FAILURE(rc))
    644609                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3BpEnable failed for breakpoint %#x", iBp);
     
    653618            for (PDBGCBP pBp = pDbgc->pFirstBp; pBp; pBp = pBp->pNext)
    654619            {
    655                 int rc2 = DBGFR3BpEnable(pVM, pBp->iBp);
     620                int rc2 = DBGFR3BpEnable(pUVM, pBp->iBp);
    656621                if (RT_FAILURE(rc2))
    657622                    rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc2, "DBGFR3BpEnable failed for breakpoint %#x", pBp->iBp);
     
    669634 *
    670635 * @returns VBox status code. Any failure will stop the enumeration.
    671  * @param   pVM         The VM handle.
     636 * @param   pUVM        The user mode VM handle.
    672637 * @param   pvUser      The user argument.
    673638 * @param   pBp         Pointer to the breakpoint information. (readonly)
    674639 */
    675 static DECLCALLBACK(int) dbgcEnumBreakpointsCallback(PVM pVM, void *pvUser, PCDBGFBP pBp)
     640static DECLCALLBACK(int) dbgcEnumBreakpointsCallback(PUVM pUVM, void *pvUser, PCDBGFBP pBp)
    676641{
    677642    PDBGC   pDbgc   = (PDBGC)pvUser;
     
    722687    RTINTPTR    off;
    723688    DBGFADDRESS Addr;
    724     int rc = DBGFR3AsSymbolByAddr(pVM, pDbgc->hDbgAs, DBGFR3AddrFromFlat(pVM, &Addr, pBp->GCPtr), &off, &Sym, NULL);
     689    int rc = DBGFR3AsSymbolByAddr(pUVM, pDbgc->hDbgAs, DBGFR3AddrFromFlat(pDbgc->pUVM, &Addr, pBp->GCPtr), &off, &Sym, NULL);
    725690    if (RT_SUCCESS(rc))
    726691    {
     
    751716
    752717/**
    753  * The 'bl' command.
    754  *
    755  * @returns VBox status.
    756  * @param   pCmd        Pointer to the command descriptor (as registered).
    757  * @param   pCmdHlp     Pointer to command helper functions.
    758  * @param   pVM         Pointer to the current VM (if any).
    759  * @param   paArgs      Pointer to (readonly) array of arguments.
    760  * @param   cArgs       Number of arguments in the array.
    761  */
    762 static DECLCALLBACK(int) dbgcCmdBrkList(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR /*paArgs*/, unsigned cArgs)
    763 {
    764     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     718 * @interface_method_impl{FNDBCCMD, The 'bl' command.}
     719 */
     720static DECLCALLBACK(int) dbgcCmdBrkList(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     721{
     722    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    765723    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, -1, cArgs == 0);
     724    NOREF(paArgs);
    766725
    767726    /*
     
    769728     */
    770729    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    771     int rc = DBGFR3BpEnum(pVM, dbgcEnumBreakpointsCallback, pDbgc);
     730    int rc = DBGFR3BpEnum(pUVM, dbgcEnumBreakpointsCallback, pDbgc);
    772731    if (RT_FAILURE(rc))
    773732        return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3BpEnum");
     
    777736
    778737/**
    779  * The 'bp' command.
    780  *
    781  * @returns VBox status.
    782  * @param   pCmd        Pointer to the command descriptor (as registered).
    783  * @param   pCmdHlp     Pointer to command helper functions.
    784  * @param   pVM         Pointer to the current VM (if any).
    785  * @param   paArgs      Pointer to (readonly) array of arguments.
    786  * @param   cArgs       Number of arguments in the array.
    787  */
    788 static DECLCALLBACK(int) dbgcCmdBrkSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     738 * @interface_method_impl{FNDBCCMD, The 'bp' command.}
     739 */
     740static DECLCALLBACK(int) dbgcCmdBrkSet(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    789741{
    790742    /*
     
    823775     */
    824776    uint32_t iBp;
    825     rc = DBGFR3BpSet(pVM, &Address, iHitTrigger, iHitDisable, &iBp);
     777    rc = DBGFR3BpSet(pUVM, &Address, iHitTrigger, iHitDisable, &iBp);
    826778    if (RT_SUCCESS(rc))
    827779    {
     
    836788                return DBGCCmdHlpPrintf(pCmdHlp, "Updated breakpoint %u at %RGv\n", iBp, Address.FlatPtr);
    837789        }
    838         int rc2 = DBGFR3BpClear(pDbgc->pVM, iBp);
     790        int rc2 = DBGFR3BpClear(pDbgc->pUVM, iBp);
    839791        AssertRC(rc2);
    840792    }
     
    844796
    845797/**
    846  * The 'br' command.
    847  *
    848  * @returns VBox status.
    849  * @param   pCmd        Pointer to the command descriptor (as registered).
    850  * @param   pCmdHlp     Pointer to command helper functions.
    851  * @param   pVM         Pointer to the current VM (if any).
    852  * @param   paArgs      Pointer to (readonly) array of arguments.
    853  * @param   cArgs       Number of arguments in the array.
    854  */
    855 static DECLCALLBACK(int) dbgcCmdBrkREM(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     798 * @interface_method_impl{FNDBCCMD, The 'br' command.}
     799 */
     800static DECLCALLBACK(int) dbgcCmdBrkREM(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    856801{
    857802    /*
     
    890835     */
    891836    uint32_t iBp;
    892     rc = DBGFR3BpSetREM(pVM, &Address, iHitTrigger, iHitDisable, &iBp);
     837    rc = DBGFR3BpSetREM(pUVM, &Address, iHitTrigger, iHitDisable, &iBp);
    893838    if (RT_SUCCESS(rc))
    894839    {
     
    903848                return DBGCCmdHlpPrintf(pCmdHlp, "Updated REM breakpoint %u at %RGv\n", iBp, Address.FlatPtr);
    904849        }
    905         int rc2 = DBGFR3BpClear(pDbgc->pVM, iBp);
     850        int rc2 = DBGFR3BpClear(pDbgc->pUVM, iBp);
    906851        AssertRC(rc2);
    907852    }
     
    911856
    912857/**
    913  * The 'u' command.
    914  *
    915  * @returns VBox status.
    916  * @param   pCmd        Pointer to the command descriptor (as registered).
    917  * @param   pCmdHlp     Pointer to command helper functions.
    918  * @param   pVM         Pointer to the current VM (if any).
    919  * @param   paArgs      Pointer to (readonly) array of arguments.
    920  * @param   cArgs       Number of arguments in the array.
    921  */
    922 static DECLCALLBACK(int) dbgcCmdUnassemble(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     858 * @interface_method_impl{FNDBCCMD, The 'u' command.}
     859 */
     860static DECLCALLBACK(int) dbgcCmdUnassemble(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    923861{
    924862    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    927865     * Validate input.
    928866     */
    929     DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     867    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    930868    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, -1, cArgs <= 1);
    931869    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs == 0 || DBGCVAR_ISPOINTER(paArgs[0].enmType));
     
    956894        {
    957895            /** @todo Batch query CS, RIP & CPU mode. */
    958             PVMCPU pVCpu = VMMGetCpuById(pVM, pDbgc->idCpu);
     896            PVMCPU pVCpu = VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu);
    959897            if (    pDbgc->fRegCtxGuest
    960898                &&  CPUMIsGuestIn64BitCode(pVCpu))
     
    1053991        uint32_t    cbInstr = 1;
    1054992        if (pDbgc->DisasmPos.enmType == DBGCVAR_TYPE_GC_FLAT)
    1055             rc = DBGFR3DisasInstrEx(pVM, pDbgc->idCpu, DBGF_SEL_FLAT, pDbgc->DisasmPos.u.GCFlat, fFlags,
     993            rc = DBGFR3DisasInstrEx(pUVM, pDbgc->idCpu, DBGF_SEL_FLAT, pDbgc->DisasmPos.u.GCFlat, fFlags,
    1056994                                    &szDis[0], sizeof(szDis), &cbInstr);
    1057995        else
    1058             rc = DBGFR3DisasInstrEx(pVM, pDbgc->idCpu, pDbgc->DisasmPos.u.GCFar.sel, pDbgc->DisasmPos.u.GCFar.off, fFlags,
     996            rc = DBGFR3DisasInstrEx(pUVM, pDbgc->idCpu, pDbgc->DisasmPos.u.GCFar.sel, pDbgc->DisasmPos.u.GCFar.off, fFlags,
    1059997                                    &szDis[0], sizeof(szDis), &cbInstr);
    1060998        if (RT_SUCCESS(rc))
     
    10971035
    10981036/**
    1099  * The 'ls' command.
    1100  *
    1101  * @returns VBox status.
    1102  * @param   pCmd        Pointer to the command descriptor (as registered).
    1103  * @param   pCmdHlp     Pointer to command helper functions.
    1104  * @param   pVM         Pointer to the current VM (if any).
    1105  * @param   paArgs      Pointer to (readonly) array of arguments.
    1106  * @param   cArgs       Number of arguments in the array.
    1107  */
    1108 static DECLCALLBACK(int) dbgcCmdListSource(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1037 * @interface_method_impl{FNDBCCMD, The 'ls' command.}
     1038 */
     1039static DECLCALLBACK(int) dbgcCmdListSource(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    11091040{
    11101041    PDBGC  pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    11131044     * Validate input.
    11141045     */
    1115     if (    cArgs > 1
    1116         ||  (cArgs == 1 && !DBGCVAR_ISPOINTER(paArgs[0].enmType)))
    1117         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "internal error: The parser doesn't do its job properly yet.. It might help to use the '%%' operator.\n");
    1118     if (!pVM && !cArgs && !DBGCVAR_ISPOINTER(pDbgc->SourcePos.enmType))
    1119         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: Don't know where to start disassembling...\n");
    1120     if (!pVM && cArgs && DBGCVAR_ISGCPOINTER(paArgs[0].enmType))
    1121         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: GC address but no VM.\n");
     1046    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs <= 1);
     1047    if (cArgs == 1)
     1048        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
     1049    if (!pUVM && !cArgs && !DBGCVAR_ISPOINTER(pDbgc->SourcePos.enmType))
     1050        return DBGCCmdHlpFail(pCmdHlp, pCmd, "Don't know where to start listing...");
     1051    if (!pUVM && cArgs && DBGCVAR_ISGCPOINTER(paArgs[0].enmType))
     1052        return DBGCCmdHlpFail(pCmdHlp, pCmd, "GC address but no VM");
    11221053
    11231054    /*
     
    11281059        if (!DBGCVAR_ISPOINTER(pDbgc->SourcePos.enmType))
    11291060        {
    1130             PVMCPU pVCpu = VMMGetCpuById(pVM, pDbgc->idCpu);
     1061            PVMCPU pVCpu = VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu);
    11311062            pDbgc->SourcePos.enmType     = DBGCVAR_TYPE_GC_FAR;
    11321063            pDbgc->SourcePos.u.GCFar.off = pDbgc->fRegCtxGuest ? CPUMGetGuestEIP(pVCpu) : CPUMGetHyperEIP(pVCpu);
     
    11981129        DBGFLINE    Line;
    11991130        RTGCINTPTR  off;
    1200         int rc = DBGFR3LineByAddr(pVM, pDbgc->SourcePos.u.GCFlat, &off, &Line);
     1131        int rc = DBGFR3LineByAddr(pUVM, pDbgc->SourcePos.u.GCFlat, &off, &Line);
    12011132        if (RT_FAILURE(rc))
    12021133            return VINF_SUCCESS;
     
    12891220
    12901221/**
    1291  * The 'r' command.
    1292  *
    1293  * @returns VBox status.
    1294  * @param   pCmd        Pointer to the command descriptor (as registered).
    1295  * @param   pCmdHlp     Pointer to command helper functions.
    1296  * @param   pVM         Pointer to the current VM (if any).
    1297  * @param   paArgs      Pointer to (readonly) array of arguments.
    1298  * @param   cArgs       Number of arguments in the array.
    1299  */
    1300 static DECLCALLBACK(int) dbgcCmdReg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1222 * @interface_method_impl{FNDBCCMD, The 'r' command.}
     1223 */
     1224static DECLCALLBACK(int) dbgcCmdReg(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    13011225{
    13021226    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    13031227    if (!pDbgc->fRegCtxGuest)
    1304         return dbgcCmdRegHyper(pCmd, pCmdHlp, pVM, paArgs, cArgs);
    1305     return dbgcCmdRegGuest(pCmd, pCmdHlp, pVM, paArgs, cArgs);
    1306 }
    1307 
    1308 
    1309 /**
    1310  * Common worker for the dbgcCmdReg*() commands.
    1311  *
    1312  * @returns VBox status.
    1313  * @param   pCmd        Pointer to the command descriptor (as registered).
    1314  * @param   pCmdHlp     Pointer to command helper functions.
    1315  * @param   pVM         Pointer to the current VM (if any).
    1316  * @param   paArgs      Pointer to (readonly) array of arguments.
    1317  * @param   cArgs       Number of arguments in the array.
    1318  * @param   pszPrefix   The symbol prefix.
    1319  */
    1320 static DECLCALLBACK(int) dbgcCmdRegCommon(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs,
     1228        return dbgcCmdRegHyper(pCmd, pCmdHlp, pUVM, paArgs, cArgs);
     1229    return dbgcCmdRegGuest(pCmd, pCmdHlp, pUVM, paArgs, cArgs);
     1230}
     1231
     1232
     1233/**
     1234 * @interface_method_impl{FNDBCCMD, Common worker for the dbgcCmdReg*()
     1235 *                       commands.}
     1236 */
     1237static DECLCALLBACK(int) dbgcCmdRegCommon(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs,
    13211238                                          const char *pszPrefix)
    13221239{
    13231240    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    1324     Assert(cArgs == 1 || cArgs == 2); /* cArgs == 0 is handled by the caller */
    1325     if (   paArgs[0].enmType != DBGCVAR_TYPE_STRING
    1326         && paArgs[0].enmType != DBGCVAR_TYPE_SYMBOL)
    1327         return DBGCCmdHlpPrintf(pCmdHlp, "internal error: The parser doesn't do its job properly yet.. Try drop the '@' or/and quote the register name\n");
     1241    Assert(cArgs == 1 || cArgs == 2); /* cArgs == 0 is handled by the caller  */
     1242    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs == 1 || cArgs == 2);
     1243    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0,    paArgs[0].enmType == DBGCVAR_TYPE_STRING
     1244                                                    || paArgs[0].enmType == DBGCVAR_TYPE_SYMBOL);
    13281245
    13291246    /*
     
    13481265    DBGFREGVALTYPE  enmType;
    13491266    DBGFREGVAL      Value;
    1350     int rc = DBGFR3RegNmQuery(pVM, idCpu, pszReg, &Value, &enmType);
     1267    int rc = DBGFR3RegNmQuery(pUVM, idCpu, pszReg, &Value, &enmType);
    13511268    if (RT_FAILURE(rc))
    13521269    {
     
    13741291         * Modify the register.
    13751292         */
    1376         if (   paArgs[1].enmType == DBGCVAR_TYPE_STRING
    1377             || paArgs[1].enmType == DBGCVAR_TYPE_SYMBOL)
    1378             return DBGCCmdHlpPrintf(pCmdHlp, "internal error: The parser doesn't do its job properly on the 2nd argument yet...\n");
     1293        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 1,    paArgs[1].enmType == DBGCVAR_TYPE_STRING
     1294                                                        || paArgs[1].enmType == DBGCVAR_TYPE_SYMBOL);
    13791295        if (enmType != DBGFREGVALTYPE_DTR)
    13801296        {
     
    13911307        if (RT_SUCCESS(rc))
    13921308        {
    1393             rc = DBGFR3RegNmSet(pVM, idCpu, pszReg, &Value, enmType);
     1309            rc = DBGFR3RegNmSet(pUVM, idCpu, pszReg, &Value, enmType);
    13941310            if (RT_FAILURE(rc))
    13951311                rc = DBGCCmdHlpVBoxError(pCmdHlp, rc, "DBGFR3RegNmSet failed settings '%s%s': %Rrc\n",
     
    14091325
    14101326/**
    1411  * The 'rg', 'rg64' and 'rg32' commands.
    1412  *
    1413  * @returns VBox status.
    1414  * @param   pCmd        Pointer to the command descriptor (as registered).
    1415  * @param   pCmdHlp     Pointer to command helper functions.
    1416  * @param   pVM         Pointer to the current VM (if any).
    1417  * @param   paArgs      Pointer to (readonly) array of arguments.
    1418  * @param   cArgs       Number of arguments in the array.
    1419  */
    1420 static DECLCALLBACK(int) dbgcCmdRegGuest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1327 * @interface_method_impl{FNDBCCMD, The 'rg', 'rg64' and 'rg32' commands.}
     1328 */
     1329static DECLCALLBACK(int) dbgcCmdRegGuest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    14211330{
    14221331    /*
     
    14281337        bool const  f64BitMode = !strcmp(pCmd->pszCmd, "rg64")
    14291338                              || (   !strcmp(pCmd->pszCmd, "rg32")
    1430                                   && CPUMIsGuestIn64BitCode(VMMGetCpuById(pVM, pDbgc->idCpu)));
     1339                                  && CPUMIsGuestIn64BitCode(VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu)));
    14311340        char        szDisAndRegs[8192];
    14321341        int         rc;
     
    14351344        {
    14361345            if (f64BitMode)
    1437                 rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu, &szDisAndRegs[0], sizeof(szDisAndRegs),
     1346                rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu, &szDisAndRegs[0], sizeof(szDisAndRegs),
    14381347                                     "u %016VR{rip} L 0\n"
    14391348                                     "rax=%016VR{rax} rbx=%016VR{rbx} rcx=%016VR{rcx} rdx=%016VR{rdx}\n"
     
    14441353                                     "cs=%04VR{cs} ds=%04VR{ds} es=%04VR{es} fs=%04VR{fs} gs=%04VR{gs} ss=%04VR{ss}                     rflags=%08VR{rflags}\n");
    14451354            else
    1446                 rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu, szDisAndRegs, sizeof(szDisAndRegs),
     1355                rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu, szDisAndRegs, sizeof(szDisAndRegs),
    14471356                                     "u %04VR{cs}:%08VR{eip} L 0\n"
    14481357                                     "eax=%08VR{eax} ebx=%08VR{ebx} ecx=%08VR{ecx} edx=%08VR{edx} esi=%08VR{esi} edi=%08VR{edi}\n"
     
    14531362        {
    14541363            if (f64BitMode)
    1455                 rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu, &szDisAndRegs[0], sizeof(szDisAndRegs),
     1364                rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu, &szDisAndRegs[0], sizeof(szDisAndRegs),
    14561365                                     "u %016VR{rip} L 0\n"
    14571366                                     "rax=%016VR{rax} rbx=%016VR{rbx} rcx=%016VR{rcx} rdx=%016VR{rdx}\n"
     
    14811390                                     );
    14821391            else
    1483                 rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu, szDisAndRegs, sizeof(szDisAndRegs),
     1392                rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu, szDisAndRegs, sizeof(szDisAndRegs),
    14841393                                     "u %04VR{cs}:%08VR{eip} L 0\n"
    14851394                                     "eax=%08VR{eax} ebx=%08VR{ebx} ecx=%08VR{ecx} edx=%08VR{edx} esi=%08VR{esi} edi=%08VR{edi}\n"
     
    15091418        return pCmdHlp->pfnExec(pCmdHlp, "%s", szDisAndRegs);
    15101419    }
    1511     return dbgcCmdRegCommon(pCmd, pCmdHlp, pVM, paArgs, cArgs, "");
    1512 }
    1513 
    1514 
    1515 /**
    1516  * The 'rh' command.
    1517  *
    1518  * @returns VBox status.
    1519  * @param   pCmd        Pointer to the command descriptor (as registered).
    1520  * @param   pCmdHlp     Pointer to command helper functions.
    1521  * @param   pVM         Pointer to the current VM (if any).
    1522  * @param   paArgs      Pointer to (readonly) array of arguments.
    1523  * @param   cArgs       Number of arguments in the array.
    1524  */
    1525 static DECLCALLBACK(int) dbgcCmdRegHyper(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1420    return dbgcCmdRegCommon(pCmd, pCmdHlp, pUVM, paArgs, cArgs, "");
     1421}
     1422
     1423
     1424/**
     1425 * @interface_method_impl{FNDBCCMD, The 'rh' command.}
     1426 */
     1427static DECLCALLBACK(int) dbgcCmdRegHyper(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    15261428{
    15271429    /*
     
    15351437
    15361438        if (pDbgc->fRegTerse)
    1537             rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu | DBGFREG_HYPER_VMCPUID, szDisAndRegs, sizeof(szDisAndRegs),
     1439            rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu | DBGFREG_HYPER_VMCPUID, szDisAndRegs, sizeof(szDisAndRegs),
    15381440                                 "u %VR{cs}:%VR{eip} L 0\n"
    15391441                                 ".eax=%08VR{eax} .ebx=%08VR{ebx} .ecx=%08VR{ecx} .edx=%08VR{edx} .esi=%08VR{esi} .edi=%08VR{edi}\n"
     
    15411443                                 ".cs=%04VR{cs} .ds=%04VR{ds} .es=%04VR{es} .fs=%04VR{fs} .gs=%04VR{gs} .ss=%04VR{ss}              .eflags=%08VR{eflags}\n");
    15421444        else
    1543             rc = DBGFR3RegPrintf(pVM, pDbgc->idCpu | DBGFREG_HYPER_VMCPUID, szDisAndRegs, sizeof(szDisAndRegs),
     1445            rc = DBGFR3RegPrintf(pUVM, pDbgc->idCpu | DBGFREG_HYPER_VMCPUID, szDisAndRegs, sizeof(szDisAndRegs),
    15441446                                 "u %04VR{cs}:%08VR{eip} L 0\n"
    15451447                                 ".eax=%08VR{eax} .ebx=%08VR{ebx} .ecx=%08VR{ecx} .edx=%08VR{edx} .esi=%08VR{esi} .edi=%08VR{edi}\n"
     
    15661468        return pCmdHlp->pfnExec(pCmdHlp, "%s", szDisAndRegs);
    15671469    }
    1568     return dbgcCmdRegCommon(pCmd, pCmdHlp, pVM, paArgs, cArgs, ".");
    1569 }
    1570 
    1571 
    1572 /**
    1573  * The 'rt' command.
    1574  *
    1575  * @returns VBox status.
    1576  * @param   pCmd        Pointer to the command descriptor (as registered).
    1577  * @param   pCmdHlp     Pointer to command helper functions.
    1578  * @param   pVM         Pointer to the current VM (if any).
    1579  * @param   paArgs      Pointer to (readonly) array of arguments.
    1580  * @param   cArgs       Number of arguments in the array.
    1581  */
    1582 static DECLCALLBACK(int) dbgcCmdRegTerse(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    1583 {
    1584     NOREF(pCmd); NOREF(pVM); NOREF(paArgs); NOREF(cArgs);
     1470    return dbgcCmdRegCommon(pCmd, pCmdHlp, pUVM, paArgs, cArgs, ".");
     1471}
     1472
     1473
     1474/**
     1475 * @interface_method_impl{FNDBCCMD, The 'rt' command.}
     1476 */
     1477static DECLCALLBACK(int) dbgcCmdRegTerse(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     1478{
     1479    NOREF(pCmd); NOREF(pUVM); NOREF(paArgs); NOREF(cArgs);
    15851480
    15861481    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    15911486
    15921487/**
    1593  * The 't' command.
    1594  *
    1595  * @returns VBox status.
    1596  * @param   pCmd        Pointer to the command descriptor (as registered).
    1597  * @param   pCmdHlp     Pointer to command helper functions.
    1598  * @param   pVM         Pointer to the current VM (if any).
    1599  * @param   paArgs      Pointer to (readonly) array of arguments.
    1600  * @param   cArgs       Number of arguments in the array.
    1601  */
    1602 static DECLCALLBACK(int) dbgcCmdTrace(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1488 * @interface_method_impl{FNDBCCMD, The 't' command.}
     1489 */
     1490static DECLCALLBACK(int) dbgcCmdTrace(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    16031491{
    16041492    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    16051493
    1606     int rc = DBGFR3Step(pVM, pDbgc->idCpu);
     1494    int rc = DBGFR3Step(pUVM, pDbgc->idCpu);
    16071495    if (RT_SUCCESS(rc))
    16081496        pDbgc->fReady = false;
     
    16161504
    16171505/**
    1618  * The 'k', 'kg' and 'kh' commands.
    1619  *
    1620  * @returns VBox status.
    1621  * @param   pCmd        Pointer to the command descriptor (as registered).
    1622  * @param   pCmdHlp     Pointer to command helper functions.
    1623  * @param   pVM         Pointer to the current VM (if any).
    1624  * @param   paArgs      Pointer to (readonly) array of arguments.
    1625  * @param   cArgs       Number of arguments in the array.
    1626  */
    1627 static DECLCALLBACK(int) dbgcCmdStack(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1506 * @interface_method_impl{FNDBCCMD, The 'k', 'kg' and 'kh' commands.}
     1507 */
     1508static DECLCALLBACK(int) dbgcCmdStack(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    16281509{
    16291510    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    16361517    bool const          fGuest = pCmd->pszCmd[1] == 'g'
    16371518                              || (!pCmd->pszCmd[1] && pDbgc->fRegCtxGuest);
    1638     rc = DBGFR3StackWalkBegin(pVM, pDbgc->idCpu, fGuest ? DBGFCODETYPE_GUEST : DBGFCODETYPE_HYPER, &pFirstFrame);
     1519    rc = DBGFR3StackWalkBegin(pUVM, pDbgc->idCpu, fGuest ? DBGFCODETYPE_GUEST : DBGFCODETYPE_HYPER, &pFirstFrame);
    16391520    if (RT_FAILURE(rc))
    16401521        return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "Failed to begin stack walk, rc=%Rrc\n", rc);
     
    20181899
    20191900/**
    2020  * The 'dg', 'dga', 'dl' and 'dla' commands.
    2021  *
    2022  * @returns VBox status.
    2023  * @param   pCmd        Pointer to the command descriptor (as registered).
    2024  * @param   pCmdHlp     Pointer to command helper functions.
    2025  * @param   pVM         Pointer to the current VM (if any).
    2026  * @param   paArgs      Pointer to (readonly) array of arguments.
    2027  * @param   cArgs       Number of arguments in the array.
    2028  */
    2029 static DECLCALLBACK(int) dbgcCmdDumpDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     1901 * @interface_method_impl{FNDBCCMD, The 'dg', 'dga', 'dl' and 'dla' commands.}
     1902 */
     1903static DECLCALLBACK(int) dbgcCmdDumpDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    20301904{
    20311905    /*
    20321906     * Validate input.
    20331907     */
    2034     if (!pVM)
    2035         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     1908    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    20361909
    20371910    /*
     
    20401913     */
    20411914    PDBGC       pDbgc   = DBGC_CMDHLP2DBGC(pCmdHlp);
    2042     PVMCPU      pVCpu   = VMMGetCpuById(pVM, pDbgc->idCpu);
     1915    PVMCPU      pVCpu   = VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu);
    20431916    CPUMMODE    enmMode = CPUMGetGuestMode(pVCpu);
    20441917    bool        fGdt    = pCmd->pszCmd[1] == 'g';
     
    20671940          * argument is given, that that into account.
    20681941          */
    2069         /* check that what we got makes sense as we don't trust the parser yet. */
    2070         if (    paArgs[i].enmType != DBGCVAR_TYPE_NUMBER
    2071             &&  !DBGCVAR_ISPOINTER(paArgs[i].enmType))
    2072             return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: arg #%u isn't of number or pointer type but %d.\n", i, paArgs[i].enmType);
     1942        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, i, paArgs[i].enmType == DBGCVAR_TYPE_NUMBER || DBGCVAR_ISPOINTER(paArgs[i].enmType));
    20731943        uint64_t u64;
    20741944        unsigned cSels = 1;
     
    20991969            {
    21001970                DBGFSELINFO SelInfo;
    2101                 int rc = DBGFR3SelQueryInfo(pVM, pDbgc->idCpu, Sel | SelTable, DBGFSELQI_FLAGS_DT_GUEST, &SelInfo);
     1971                int rc = DBGFR3SelQueryInfo(pUVM, pDbgc->idCpu, Sel | SelTable, DBGFSELQI_FLAGS_DT_GUEST, &SelInfo);
    21021972                if (RT_SUCCESS(rc))
    21031973                {
     
    21422012
    21432013/**
    2144  * The 'di' and 'dia' commands.
    2145  *
    2146  * @returns VBox status.
    2147  * @param   pCmd        Pointer to the command descriptor (as registered).
    2148  * @param   pCmdHlp     Pointer to command helper functions.
    2149  * @param   pVM         Pointer to the current VM (if any).
    2150  * @param   paArgs      Pointer to (readonly) array of arguments.
    2151  * @param   cArgs       Number of arguments in the array.
    2152  */
    2153 static DECLCALLBACK(int) dbgcCmdDumpIDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2014 * @interface_method_impl{FNDBCCMD, The 'di' and 'dia' commands.}
     2015 */
     2016static DECLCALLBACK(int) dbgcCmdDumpIDT(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    21542017{
    21552018    /*
    21562019     * Validate input.
    21572020     */
    2158     if (!pVM)
    2159         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     2021    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    21602022
    21612023    /*
     
    21642026     */
    21652027    PDBGC       pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    2166     PVMCPU      pVCpu     = VMMGetCpuById(pVM, pDbgc->idCpu);
     2028    PVMCPU      pVCpu     = VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu);
    21672029    uint16_t    cbLimit;
    21682030    RTGCUINTPTR GCPtrBase = CPUMGetGuestIDTR(pVCpu, &cbLimit);
     
    21952057    for (unsigned i = 0; i < cArgs; i++)
    21962058    {
    2197         /* check that what we got makes sense as we don't trust the parser yet. */
    2198         if (paArgs[i].enmType != DBGCVAR_TYPE_NUMBER)
    2199             return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: arg #%u isn't of number type but %d.\n", i, paArgs[i].enmType);
     2059        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, i, paArgs[i].enmType == DBGCVAR_TYPE_NUMBER);
    22002060        if (paArgs[i].u.u64Number < 256)
    22012061        {
     
    22272087                AddrVar.u.GCFlat = GCPtrBase + iInt * cbEntry;
    22282088                AddrVar.enmRangeType = DBGCVAR_RANGE_NONE;
    2229                 int rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &u, cbEntry, &AddrVar, NULL);
     2089                int rc = pCmdHlp->pfnMemRead(pCmdHlp, &u, cbEntry, &AddrVar, NULL);
    22302090                if (RT_FAILURE(rc))
    22312091                    return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Reading IDT entry %#04x.\n", (unsigned)iInt);
     
    22662126
    22672127/**
    2268  * The 'da', 'dq', 'dd', 'dw' and 'db' commands.
    2269  *
    2270  * @returns VBox status.
    2271  * @param   pCmd        Pointer to the command descriptor (as registered).
    2272  * @param   pCmdHlp     Pointer to command helper functions.
    2273  * @param   pVM         Pointer to the current VM (if any).
    2274  * @param   paArgs      Pointer to (readonly) array of arguments.
    2275  * @param   cArgs       Number of arguments in the array.
    2276  */
    2277 static DECLCALLBACK(int) dbgcCmdDumpMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2128 * @interface_method_impl{FNDBCCMD, The 'da', 'dq', 'dd', 'dw' and 'db'
     2129 *                       commands.}
     2130 */
     2131static DECLCALLBACK(int) dbgcCmdDumpMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    22782132{
    22792133    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    22822136     * Validate input.
    22832137     */
    2284     if (    cArgs > 1
    2285         ||  (cArgs == 1 && !DBGCVAR_ISPOINTER(paArgs[0].enmType)))
    2286         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "internal error: The parser doesn't do its job properly yet.. It might help to use the '%%' operator.\n");
    2287     if (!pVM)
    2288         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     2138    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs <= 1);
     2139    if (cArgs == 1)
     2140        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
     2141    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    22892142
    22902143    /*
     
    23622215        size_t  cbReq = RT_MIN((int)sizeof(achBuffer), cbLeft);
    23632216        size_t  cb = RT_MIN((int)sizeof(achBuffer), cbLeft);
    2364         int rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &achBuffer, cbReq, &pDbgc->DumpPos, &cb);
     2217        int rc = pCmdHlp->pfnMemRead(pCmdHlp, &achBuffer, cbReq, &pDbgc->DumpPos, &cb);
    23652218        if (RT_FAILURE(rc))
    23662219        {
     
    24722325static RTGCPHYS dbgcGetGuestPageMode(PDBGC pDbgc, bool *pfPAE, bool *pfLME, bool *pfPSE, bool *pfPGE, bool *pfNXE)
    24732326{
    2474     PVMCPU      pVCpu = VMMGetCpuById(pDbgc->pVM, pDbgc->idCpu);
     2327    PVMCPU      pVCpu = VMMR3GetCpuByIdU(pDbgc->pUVM, pDbgc->idCpu);
    24752328    RTGCUINTREG cr4   = CPUMGetGuestCR4(pVCpu);
    24762329    *pfPSE = !!(cr4 & X86_CR4_PSE);
     
    25032356static RTHCPHYS dbgcGetShadowPageMode(PDBGC pDbgc, bool *pfPAE, bool *pfLME, bool *pfPSE, bool *pfPGE, bool *pfNXE)
    25042357{
    2505     PVMCPU pVCpu = VMMGetCpuById(pDbgc->pVM, pDbgc->idCpu);
     2358    PVMCPU pVCpu = VMMR3GetCpuByIdU(pDbgc->pUVM, pDbgc->idCpu);
    25062359
    25072360    *pfPSE = true;
     
    25342387
    25352388/**
    2536  * The 'dpd', 'dpda', 'dpdb', 'dpdg' and 'dpdh' commands.
    2537  *
    2538  * @returns VBox status.
    2539  * @param   pCmd        Pointer to the command descriptor (as registered).
    2540  * @param   pCmdHlp     Pointer to command helper functions.
    2541  * @param   pVM         Pointer to the current VM (if any).
    2542  * @param   paArgs      Pointer to (readonly) array of arguments.
    2543  * @param   cArgs       Number of arguments in the array.
    2544  */
    2545 static DECLCALLBACK(int) dbgcCmdDumpPageDir(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2389 * @interface_method_impl{FNDBCCMD, The 'dpd', 'dpda', 'dpdb', 'dpdg' and 'dpdh'
     2390 *                       commands.}
     2391 */
     2392static DECLCALLBACK(int) dbgcCmdDumpPageDir(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    25462393{
    25472394    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    25502397     * Validate input.
    25512398     */
    2552     if (    cArgs > 1
    2553         ||  (cArgs == 1 && pCmd->pszCmd[3] == 'a' && !DBGCVAR_ISPOINTER(paArgs[0].enmType))
    2554         ||  (cArgs == 1 && pCmd->pszCmd[3] != 'a' && !(paArgs[0].enmType == DBGCVAR_TYPE_NUMBER || DBGCVAR_ISPOINTER(paArgs[0].enmType)))
    2555         )
    2556         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "internal error: The parser doesn't do its job properly yet.. It might help to use the '%%' operator.\n");
    2557     if (!pVM)
    2558         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     2399    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs <= 1);
     2400    if (cArgs == 1 && pCmd->pszCmd[3] == 'a')
     2401        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
     2402    if (cArgs == 1 && pCmd->pszCmd[3] != 'a')
     2403        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0,    paArgs[0].enmType == DBGCVAR_TYPE_NUMBER
     2404                                                        || DBGCVAR_ISPOINTER(paArgs[0].enmType));
     2405    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    25592406
    25602407    /*
     
    26762523            VarCur.u.u64Number += (((uint64_t)VarGCPtr.u.GCFlat >> X86_PML4_SHIFT) & X86_PML4_MASK) * sizeof(X86PML4E);
    26772524            X86PML4E Pml4e;
    2678             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pml4e, sizeof(Pml4e), &VarCur, NULL);
     2525            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pml4e, sizeof(Pml4e), &VarCur, NULL);
    26792526            if (RT_FAILURE(rc))
    26802527                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PML4E memory at %DV.\n", &VarCur);
     
    26902537            X86PDPE Pdpe;
    26912538            VarCur.u.u64Number += ((VarGCPtr.u.GCFlat >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE) * sizeof(Pdpe);
    2692             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pdpe, sizeof(Pdpe), &VarCur, NULL);
     2539            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pdpe, sizeof(Pdpe), &VarCur, NULL);
    26932540            if (RT_FAILURE(rc))
    26942541                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PDPE memory at %DV.\n", &VarCur);
     
    27272574        X86PDEPAE Pde;
    27282575        Pde.u = 0;
    2729         rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pde, cbEntry, &VarPDEAddr, NULL);
     2576        rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pde, cbEntry, &VarPDEAddr, NULL);
    27302577        if (RT_FAILURE(rc))
    27312578            return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Reading PDE memory at %DV.\n", &VarPDEAddr);
     
    27942641
    27952642/**
    2796  * The 'dpdb' command.
    2797  *
    2798  * @returns VBox status.
    2799  * @param   pCmd        Pointer to the command descriptor (as registered).
    2800  * @param   pCmdHlp     Pointer to command helper functions.
    2801  * @param   pVM         Pointer to the current VM (if any).
    2802  * @param   paArgs      Pointer to (readonly) array of arguments.
    2803  * @param   cArgs       Number of arguments in the array.
    2804  */
    2805 static DECLCALLBACK(int) dbgcCmdDumpPageDirBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    2806 {
    2807     if (!pVM)
    2808         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     2643 * @interface_method_impl{FNDBCCMD, The 'dpdb' command.}
     2644 */
     2645static DECLCALLBACK(int) dbgcCmdDumpPageDirBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     2646{
     2647    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    28092648    int rc1 = pCmdHlp->pfnExec(pCmdHlp, "dpdg %DV", &paArgs[0]);
    28102649    int rc2 = pCmdHlp->pfnExec(pCmdHlp, "dpdh %DV", &paArgs[0]);
     
    28172656
    28182657/**
    2819  * The 'dph*' commands and main part of 'm'.
    2820  *
    2821  * @returns VBox status.
    2822  * @param   pCmd        Pointer to the command descriptor (as registered).
    2823  * @param   pCmdHlp     Pointer to command helper functions.
    2824  * @param   pVM         Pointer to the current VM (if any).
    2825  * @param   paArgs      Pointer to (readonly) array of arguments.
    2826  * @param   cArgs       Number of arguments in the array.
    2827  */
    2828 static DECLCALLBACK(int) dbgcCmdDumpPageHierarchy(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2658 * @interface_method_impl{FNDBCCMD, The 'dph*' commands and main part of 'm'.}
     2659 */
     2660static DECLCALLBACK(int) dbgcCmdDumpPageHierarchy(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    28292661{
    28302662    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    2831     if (!pVM)
    2832         return DBGCCmdHlpFail(pCmdHlp, pCmd, "No VM.\n");
     2663    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    28332664
    28342665    /*
     
    29312762     * Call the worker.
    29322763     */
    2933     rc = DBGFR3PagingDumpEx(pVM, pDbgc->idCpu, fFlags, cr3, GCPtrFirst, GCPtrLast, 99 /*cMaxDepth*/,
     2764    rc = DBGFR3PagingDumpEx(pUVM, pDbgc->idCpu, fFlags, cr3, GCPtrFirst, GCPtrLast, 99 /*cMaxDepth*/,
    29342765                            DBGCCmdHlpGetDbgfOutputHlp(pCmdHlp));
    29352766    if (RT_FAILURE(rc))
     
    29412772
    29422773/**
    2943  * The 'dpg*' commands.
    2944  *
    2945  * @returns VBox status.
    2946  * @param   pCmd        Pointer to the command descriptor (as registered).
    2947  * @param   pCmdHlp     Pointer to command helper functions.
    2948  * @param   pVM         Pointer to the current VM (if any).
    2949  * @param   paArgs      Pointer to (readonly) array of arguments.
    2950  * @param   cArgs       Number of arguments in the array.
    2951  */
    2952 static DECLCALLBACK(int) dbgcCmdDumpPageTable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     2774 * @interface_method_impl{FNDBCCMD, The 'dpg*' commands.}
     2775 */
     2776static DECLCALLBACK(int) dbgcCmdDumpPageTable(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    29532777{
    29542778    PDBGC   pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    29572781     * Validate input.
    29582782     */
    2959     if (    cArgs != 1
    2960         ||  (pCmd->pszCmd[3] == 'a' && !DBGCVAR_ISPOINTER(paArgs[0].enmType))
    2961         ||  (pCmd->pszCmd[3] != 'a' && !(paArgs[0].enmType == DBGCVAR_TYPE_NUMBER || DBGCVAR_ISPOINTER(paArgs[0].enmType)))
    2962         )
    2963         return DBGCCmdHlpPrintf(pCmdHlp, "internal error: The parser doesn't do its job properly yet.. It might help to use the '%%' operator.\n");
    2964     if (!pVM)
    2965         return DBGCCmdHlpPrintf(pCmdHlp, "error: No VM.\n");
     2783    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs == 1);
     2784    if (pCmd->pszCmd[3] == 'a')
     2785        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
     2786    else
     2787        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0,    paArgs[0].enmType == DBGCVAR_TYPE_NUMBER
     2788                                                        || DBGCVAR_ISPOINTER(paArgs[0].enmType));
     2789    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    29662790
    29672791    /*
     
    30452869            VarCur.u.u64Number += (((uint64_t)VarGCPtr.u.GCFlat >> X86_PML4_SHIFT) & X86_PML4_MASK) * sizeof(X86PML4E);
    30462870            X86PML4E Pml4e;
    3047             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pml4e, sizeof(Pml4e), &VarCur, NULL);
     2871            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pml4e, sizeof(Pml4e), &VarCur, NULL);
    30482872            if (RT_FAILURE(rc))
    30492873                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PML4E memory at %DV.\n", &VarCur);
     
    30592883            X86PDPE Pdpe;
    30602884            VarCur.u.u64Number += ((VarGCPtr.u.GCFlat >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE) * sizeof(Pdpe);
    3061             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pdpe, sizeof(Pdpe), &VarCur, NULL);
     2885            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pdpe, sizeof(Pdpe), &VarCur, NULL);
    30622886            if (RT_FAILURE(rc))
    30632887                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PDPE memory at %DV.\n", &VarCur);
     
    30702894            X86PDEPAE Pde;
    30712895            VarCur.u.u64Number += ((VarGCPtr.u.GCFlat >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK) * sizeof(Pde);
    3072             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pde, sizeof(Pde), &VarCur, NULL);
     2896            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pde, sizeof(Pde), &VarCur, NULL);
    30732897            if (RT_FAILURE(rc))
    30742898                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PDE memory at %DV.\n", &VarCur);
     
    30882912            X86PDE Pde;
    30892913            VarCur.u.u64Number += ((VarGCPtr.u.GCFlat >> X86_PD_SHIFT) & X86_PD_MASK) * sizeof(Pde);
    3090             rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pde, sizeof(Pde), &VarCur, NULL);
     2914            rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pde, sizeof(Pde), &VarCur, NULL);
    30912915            if (RT_FAILURE(rc))
    30922916                return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PDE memory at %DV.\n", &VarCur);
     
    31202944        X86PTEPAE Pte;
    31212945        Pte.u = 0;
    3122         rc = pCmdHlp->pfnMemRead(pCmdHlp, pVM, &Pte, cbEntry, &VarPTEAddr, NULL);
     2946        rc = pCmdHlp->pfnMemRead(pCmdHlp, &Pte, cbEntry, &VarPTEAddr, NULL);
    31232947        if (RT_FAILURE(rc))
    31242948            return DBGCCmdHlpVBoxError(pCmdHlp, rc, "Reading PTE memory at %DV.\n", &VarPTEAddr);
     
    31692993
    31702994/**
    3171  * The 'dptb' command.
    3172  *
    3173  * @returns VBox status.
    3174  * @param   pCmd        Pointer to the command descriptor (as registered).
    3175  * @param   pCmdHlp     Pointer to command helper functions.
    3176  * @param   pVM         Pointer to the current VM (if any).
    3177  * @param   paArgs      Pointer to (readonly) array of arguments.
    3178  * @param   cArgs       Number of arguments in the array.
    3179  */
    3180 static DECLCALLBACK(int) dbgcCmdDumpPageTableBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
    3181 {
    3182     if (!pVM)
    3183         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: No VM.\n");
     2995 * @interface_method_impl{FNDBCCMD, The 'dptb' command.}
     2996 */
     2997static DECLCALLBACK(int) dbgcCmdDumpPageTableBoth(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
     2998{
     2999    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    31843000    int rc1 = pCmdHlp->pfnExec(pCmdHlp, "dptg %DV", &paArgs[0]);
    31853001    int rc2 = pCmdHlp->pfnExec(pCmdHlp, "dpth %DV", &paArgs[0]);
     
    31923008
    31933009/**
    3194  * The 'dt' command.
    3195  *
    3196  * @returns VBox status.
    3197  * @param   pCmd        Pointer to the command descriptor (as registered).
    3198  * @param   pCmdHlp     Pointer to command helper functions.
    3199  * @param   pVM         Pointer to the current VM (if any).
    3200  * @param   paArgs      Pointer to (readonly) array of arguments.
    3201  * @param   cArgs       Number of arguments in the array.
    3202  */
    3203 static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3010 * @interface_method_impl{FNDBCCMD, The 'dt' command.}
     3011 */
     3012static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    32043013{
    32053014    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
    32063015    int   rc;
    32073016
    3208     if (!pVM)
    3209         return DBGCCmdHlpFail(pCmdHlp, pCmd, "No VM.\n");
    3210     if (    cArgs > 1
    3211         ||  (cArgs == 1 && paArgs[0].enmType == DBGCVAR_TYPE_STRING)
    3212         ||  (cArgs == 1 && paArgs[0].enmType == DBGCVAR_TYPE_SYMBOL))
    3213         return DBGCCmdHlpFail(pCmdHlp, pCmd, "internal error: The parser doesn't do its job properly yet...\n");
     3017    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
     3018    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs <= 1);
     3019    if (cArgs == 1)
     3020        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0,    paArgs[0].enmType != DBGCVAR_TYPE_STRING
     3021                                                        && paArgs[0].enmType != DBGCVAR_TYPE_SYMBOL);
    32143022
    32153023    /*
     
    32333041        /** @todo consider querying the hidden bits instead (missing API). */
    32343042        uint16_t SelTR;
    3235         rc = DBGFR3RegCpuQueryU16(pVM, pDbgc->idCpu, DBGFREG_TR, &SelTR);
     3043        rc = DBGFR3RegCpuQueryU16(pUVM, pDbgc->idCpu, DBGFREG_TR, &SelTR);
    32363044        if (RT_FAILURE(rc))
    32373045            return DBGCCmdHlpFail(pCmdHlp, pCmd, "Failed to query TR, rc=%Rrc\n", rc);
     
    32653073        SelTss = VarTssAddr.u.GCFar.sel;
    32663074        DBGFSELINFO SelInfo;
    3267         rc = DBGFR3SelQueryInfo(pVM, pDbgc->idCpu, VarTssAddr.u.GCFar.sel, DBGFSELQI_FLAGS_DT_GUEST, &SelInfo);
     3075        rc = DBGFR3SelQueryInfo(pUVM, pDbgc->idCpu, VarTssAddr.u.GCFar.sel, DBGFSELQI_FLAGS_DT_GUEST, &SelInfo);
    32683076        if (RT_FAILURE(rc))
    32693077            return DBGCCmdHlpFail(pCmdHlp, pCmd, "DBGFR3SelQueryInfo(,%u,%d,,) -> %Rrc.\n",
     
    33073115        {
    33083116            uint64_t uEfer;
    3309             rc = DBGFR3RegCpuQueryU64(pVM, pDbgc->idCpu, DBGFREG_MSR_K6_EFER, &uEfer);
     3117            rc = DBGFR3RegCpuQueryU64(pUVM, pDbgc->idCpu, DBGFREG_MSR_K6_EFER, &uEfer);
    33103118            if (   RT_FAILURE(rc)
    33113119                || !(uEfer &  MSR_K6_EFER_LMA) )
     
    33533161    uint8_t  abBuf[_64K];
    33543162    size_t   cbTssRead;
    3355     rc = DBGCCmdHlpMemRead(pCmdHlp, pVM, abBuf, cbTss, &VarTssAddr, &cbTssRead);
     3163    rc = DBGCCmdHlpMemRead(pCmdHlp, abBuf, cbTss, &VarTssAddr, &cbTssRead);
    33563164    if (RT_FAILURE(rc))
    33573165        return DBGCCmdHlpFail(pCmdHlp, pCmd, "Failed to read TSS at %Dv: %Rrc\n", &VarTssAddr, rc);
     
    35263334
    35273335/**
    3528  * The 'm' command.
    3529  *
    3530  * @returns VBox status.
    3531  * @param   pCmd        Pointer to the command descriptor (as registered).
    3532  * @param   pCmdHlp     Pointer to command helper functions.
    3533  * @param   pVM         Pointer to the current VM (if any).
    3534  * @param   paArgs      Pointer to (readonly) array of arguments.
    3535  * @param   cArgs       Number of arguments in the array.
    3536  */
    3537 static DECLCALLBACK(int) dbgcCmdMemoryInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3336 * @interface_method_impl{FNDBCCMD, The 'm' command.}
     3337 */
     3338static DECLCALLBACK(int) dbgcCmdMemoryInfo(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    35383339{
    35393340    DBGCCmdHlpPrintf(pCmdHlp, "Address: %DV\n", &paArgs[0]);
    3540     if (!pVM)
    3541         return DBGCCmdHlpFail(pCmdHlp, pCmd, "No VM.\n");
    3542     return dbgcCmdDumpPageHierarchy(pCmd, pCmdHlp, pVM, paArgs, cArgs);
     3341    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
     3342    return dbgcCmdDumpPageHierarchy(pCmd, pCmdHlp, pUVM, paArgs, cArgs);
    35433343}
    35443344
     
    36823482
    36833483/**
    3684  * The 'eb', 'ew', 'ed' and 'eq' commands.
    3685  *
    3686  * @returns VBox status.
    3687  * @param   pCmd        Pointer to the command descriptor (as registered).
    3688  * @param   pCmdHlp     Pointer to command helper functions.
    3689  * @param   pVM         Pointer to the current VM (if any).
    3690  * @param   paArgs      Pointer to (readonly) array of arguments.
    3691  * @param   cArgs       Number of arguments in the array.
    3692  */
    3693 static DECLCALLBACK(int) dbgcCmdEditMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3484 * @interface_method_impl{FNDBCCMD, The 'eb', 'ew', 'ed' and 'eq' commands.}
     3485 */
     3486static DECLCALLBACK(int) dbgcCmdEditMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    36943487{
    36953488    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    36993492     * Validate input.
    37003493     */
    3701     if (     cArgs < 2
    3702         ||  !DBGCVAR_ISPOINTER(paArgs[0].enmType))
    3703         return DBGCCmdHlpFail(pCmdHlp, pCmd, "internal error: The parser doesn't do its job properly yet... It might help to use the '%%' operator.\n");
     3494    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs >= 2);
     3495    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, DBGCVAR_ISPOINTER(paArgs[0].enmType));
    37043496    for (iArg = 1; iArg < cArgs; iArg++)
    3705         if (paArgs[iArg].enmType != DBGCVAR_TYPE_NUMBER)
    3706             return DBGCCmdHlpFail(pCmdHlp, pCmd, "internal error: The parser doesn't do its job properly yet: Arg #%u is not a number.\n", iArg);
    3707     if (!pVM)
    3708         return DBGCCmdHlpFail(pCmdHlp, pCmd, "error: No VM.\n");
     3497        DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, paArgs[iArg].enmType == DBGCVAR_TYPE_NUMBER);
     3498    DBGC_CMDHLP_REQ_UVM_RET(pCmdHlp, pCmd, pUVM);
    37093499
    37103500    /*
     
    37283518    {
    37293519        size_t cbWritten;
    3730         int rc = pCmdHlp->pfnMemWrite(pCmdHlp, pVM, &paArgs[iArg].u, cbElement, &Addr, &cbWritten);
     3520        int rc = pCmdHlp->pfnMemWrite(pCmdHlp, &paArgs[iArg].u, cbElement, &Addr, &cbWritten);
    37313521        if (RT_FAILURE(rc))
    37323522            return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "Writing memory at %DV.\n", &Addr);
     
    37523542 * @returns VBox status code.
    37533543 * @param   pCmdHlp     The command helpers.
    3754  * @param   pVM         The VM handle.
     3544 * @param   pUVM        The user mode VM handle.
    37553545 * @param   pAddress    The address to start searching from. (undefined on output)
    37563546 * @param   cbRange     The address range to search. Must not wrap.
     
    37613551 * @param   pResult     Where to store the result if it's a function invocation.
    37623552 */
    3763 static int dbgcCmdWorkerSearchMemDoIt(PDBGCCMDHLP pCmdHlp, PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR cbRange,
     3553static int dbgcCmdWorkerSearchMemDoIt(PDBGCCMDHLP pCmdHlp, PUVM pUVM, PDBGFADDRESS pAddress, RTGCUINTPTR cbRange,
    37643554                                      const uint8_t *pabBytes, uint32_t cbBytes,
    37653555                                      uint32_t cbUnit, uint64_t cMaxHits, PDBGCVAR pResult)
     
    37753565        /* search */
    37763566        DBGFADDRESS HitAddress;
    3777         int rc = DBGFR3MemScan(pVM, pDbgc->idCpu, pAddress, cbRange, 1, pabBytes, cbBytes, &HitAddress);
     3567        int rc = DBGFR3MemScan(pUVM, pDbgc->idCpu, pAddress, cbRange, 1, pabBytes, cbBytes, &HitAddress);
    37783568        if (RT_FAILURE(rc))
    37793569        {
     
    38393629 * @returns VBox status code.
    38403630 * @param   pCmdHlp     Pointer to the command helper functions.
    3841  * @param   pVM         Pointer to the current VM (if any).
     3631 * @param   pUVM        The user mode VM handle.
    38423632 * @param   pResult     Where to store the result of a function invocation.
    38433633 */
    3844 static int dbgcCmdWorkerSearchMemResume(PDBGCCMDHLP pCmdHlp, PVM pVM, PDBGCVAR pResult)
     3634static int dbgcCmdWorkerSearchMemResume(PDBGCCMDHLP pCmdHlp, PUVM pUVM, PDBGCVAR pResult)
    38453635{
    38463636    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    38713661        cbRange = ~(RTGCUINTPTR)0 - pDbgc->SearchAddr.FlatPtr + !!pDbgc->SearchAddr.FlatPtr;
    38723662
    3873     return dbgcCmdWorkerSearchMemDoIt(pCmdHlp, pVM, &Address, cbRange, pDbgc->abSearch, pDbgc->cbSearch,
     3663    return dbgcCmdWorkerSearchMemDoIt(pCmdHlp, pUVM, &Address, cbRange, pDbgc->abSearch, pDbgc->cbSearch,
    38743664                                      pDbgc->cbSearchUnit, pDbgc->cMaxSearchHits, pResult);
    38753665}
     
    38813671 * @returns VBox status.
    38823672 * @param   pCmdHlp     Pointer to the command helper functions.
    3883  * @param   pVM         Pointer to the current VM (if any).
     3673 * @param   pUVM        The user mode VM handle.
    38843674 * @param   pAddress    Where to start searching. If no range, search till end of address space.
    38853675 * @param   cMaxHits    The maximum number of hits.
     
    38893679 * @param   pResult     Where to store the result of a function invocation.
    38903680 */
    3891 static int dbgcCmdWorkerSearchMem(PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR pAddress, uint64_t cMaxHits, char chType,
     3681static int dbgcCmdWorkerSearchMem(PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR pAddress, uint64_t cMaxHits, char chType,
    38923682                                  PCDBGCVAR paPatArgs, unsigned cPatArgs, PDBGCVAR pResult)
    38933683{
     
    39503740     * Ok, do it.
    39513741     */
    3952     return dbgcCmdWorkerSearchMemDoIt(pCmdHlp, pVM, &Address, cbRange, abBytes, cbBytes, cbUnit, cMaxHits, pResult);
    3953 }
    3954 
    3955 
    3956 /**
    3957  * The 's' command.
    3958  *
    3959  * @returns VBox status.
    3960  * @param   pCmd        Pointer to the command descriptor (as registered).
    3961  * @param   pCmdHlp     Pointer to command helper functions.
    3962  * @param   pVM         Pointer to the current VM (if any).
    3963  * @param   paArgs      Pointer to (readonly) array of arguments.
    3964  * @param   cArgs       Number of arguments in the array.
    3965  */
    3966 static DECLCALLBACK(int) dbgcCmdSearchMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3742    return dbgcCmdWorkerSearchMemDoIt(pCmdHlp, pUVM, &Address, cbRange, abBytes, cbBytes, cbUnit, cMaxHits, pResult);
     3743}
     3744
     3745
     3746/**
     3747 * @interface_method_impl{FNDBCCMD, The 's' command.}
     3748 */
     3749static DECLCALLBACK(int) dbgcCmdSearchMem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    39673750{
    39683751    /* check that the parser did what it's supposed to do. */
     
    39753758     */
    39763759    if (cArgs == 0)
    3977         return dbgcCmdWorkerSearchMemResume(pCmdHlp, pVM, NULL);
     3760        return dbgcCmdWorkerSearchMemResume(pCmdHlp, pUVM, NULL);
    39783761
    39793762    /*
     
    39863769
    39873770/**
    3988  * The 's?' command.
    3989  *
    3990  * @returns VBox status.
    3991  * @param   pCmd        Pointer to the command descriptor (as registered).
    3992  * @param   pCmdHlp     Pointer to command helper functions.
    3993  * @param   pVM         Pointer to the current VM (if any).
    3994  * @param   paArgs      Pointer to (readonly) array of arguments.
    3995  * @param   cArgs       Number of arguments in the array.
    3996  */
    3997 static DECLCALLBACK(int) dbgcCmdSearchMemType(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3771 * @interface_method_impl{FNDBCCMD, The 's?' command.}
     3772 */
     3773static DECLCALLBACK(int) dbgcCmdSearchMemType(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    39983774{
    39993775    /* check that the parser did what it's supposed to do. */
    4000     if (    cArgs < 2
    4001         ||  !DBGCVAR_ISGCPOINTER(paArgs[0].enmType))
    4002         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "parser error\n");
    4003     return dbgcCmdWorkerSearchMem(pCmdHlp, pVM, &paArgs[0], 25, pCmd->pszCmd[1], paArgs + 1, cArgs - 1, NULL);
     3776    DBGC_CMDHLP_ASSERT_PARSER_RET(pCmdHlp, pCmd, 0, cArgs >= 2 && DBGCVAR_ISGCPOINTER(paArgs[0].enmType));
     3777    return dbgcCmdWorkerSearchMem(pCmdHlp, pUVM, &paArgs[0], 25, pCmd->pszCmd[1], paArgs + 1, cArgs - 1, NULL);
    40043778}
    40053779
     
    40103784 * @returns VBox status code.
    40113785 * @param   pCmdHlp     Pointer to command helper functions.
    4012  * @param   pVM         Pointer to the current VM (if any).
     3786 * @param   pUVM        The user mode VM handle.
    40133787 * @param   pArg        Pointer to the address or symbol to lookup.
    40143788 */
    4015 static int dbgcDoListNear(PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR pArg)
     3789static int dbgcDoListNear(PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR pArg)
    40163790{
    40173791    PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp);
     
    40243798         * Lookup the symbol address.
    40253799         */
    4026         rc = DBGFR3AsSymbolByName(pVM, pDbgc->hDbgAs, pArg->u.pszString, &Symbol, NULL);
     3800        rc = DBGFR3AsSymbolByName(pUVM, pDbgc->hDbgAs, pArg->u.pszString, &Symbol, NULL);
    40273801        if (RT_FAILURE(rc))
    40283802            return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3AsSymbolByName(,,%s,)\n", pArg->u.pszString);
     
    40423816        RTINTPTR    offDisp;
    40433817        DBGFADDRESS Addr;
    4044         rc = DBGFR3AsSymbolByAddr(pVM, pDbgc->hDbgAs, DBGFR3AddrFromFlat(pVM, &Addr, AddrVar.u.GCFlat), &offDisp, &Symbol, NULL);
     3818        rc = DBGFR3AsSymbolByAddr(pUVM, pDbgc->hDbgAs, DBGFR3AddrFromFlat(pDbgc->pUVM, &Addr, AddrVar.u.GCFlat), &offDisp, &Symbol, NULL);
    40453819        if (RT_FAILURE(rc))
    40463820            return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3ASymbolByAddr(,,%RGv,,)\n", AddrVar.u.GCFlat);
     
    40633837
    40643838/**
    4065  * The 'ln' (listnear) command.
    4066  *
    4067  * @returns VBox status.
    4068  * @param   pCmd        Pointer to the command descriptor (as registered).
    4069  * @param   pCmdHlp     Pointer to command helper functions.
    4070  * @param   pVM         Pointer to the current VM (if any).
    4071  * @param   paArgs      Pointer to (readonly) array of arguments.
    4072  * @param   cArgs       Number of arguments in the array.
    4073  */
    4074 static DECLCALLBACK(int) dbgcCmdListNear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3839 * @interface_method_impl{FNDBCCMD, The 'ln' (listnear) command.}
     3840 */
     3841static DECLCALLBACK(int) dbgcCmdListNear(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    40753842{
    40763843    if (!cArgs)
     
    40833850        if (RT_FAILURE(rc))
    40843851            return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "%%(cs:eip)\n");
    4085         return dbgcDoListNear(pCmdHlp, pVM, &AddrVar);
     3852        return dbgcDoListNear(pCmdHlp, pUVM, &AddrVar);
    40863853    }
    40873854
     
    40923859    for (unsigned iArg = 0; iArg < cArgs; iArg++)
    40933860    {
    4094         int rc = dbgcDoListNear(pCmdHlp, pVM, &paArgs[iArg]);
     3861        int rc = dbgcDoListNear(pCmdHlp, pUVM, &paArgs[iArg]);
    40953862        if (RT_FAILURE(rc))
    40963863            return rc;
     
    41203887
    41213888/**
    4122  * The 'ln' (listnear) command.
    4123  *
    4124  * @returns VBox status.
    4125  * @param   pCmd        Pointer to the command descriptor (as registered).
    4126  * @param   pCmdHlp     Pointer to command helper functions.
    4127  * @param   pVM         Pointer to the current VM (if any).
    4128  * @param   paArgs      Pointer to (readonly) array of arguments.
    4129  * @param   cArgs       Number of arguments in the array.
    4130  */
    4131 static DECLCALLBACK(int) dbgcCmdListModules(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs)
     3889 * @interface_method_impl{FNDBCCMD, The 'ln' (list near) command.}
     3890 */
     3891static DECLCALLBACK(int) dbgcCmdListModules(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs)
    41323892{
    41333893    bool const  fMappings   = pCmd->pszCmd[2] == 'o';
     
    41383898     * those matching the input.
    41393899     */
    4140     RTDBGAS     hAs         = DBGFR3AsResolveAndRetain(pVM, pDbgc->hDbgAs);
     3900    RTDBGAS     hAs         = DBGFR3AsResolveAndRetain(pUVM, pDbgc->hDbgAs);
    41413901    uint32_t    cMods       = RTDbgAsModuleCount(hAs);
    41423902    for (uint32_t iMod = 0; iMod < cMods; iMod++)
     
    42133973 * @callback_method_impl{Reads a unsigned 8-bit value.}
    42143974 */
    4215 static DECLCALLBACK(int) dbgcFuncReadU8(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     3975static DECLCALLBACK(int) dbgcFuncReadU8(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    42163976                                        PDBGCVAR pResult)
    42173977{
     
    42213981
    42223982    uint8_t b;
    4223     int rc = DBGCCmdHlpMemRead(pCmdHlp, pVM, &b, sizeof(b), &paArgs[0], NULL);
     3983    int rc = DBGCCmdHlpMemRead(pCmdHlp, &b, sizeof(b), &paArgs[0], NULL);
    42243984    if (RT_FAILURE(rc))
    42253985        return rc;
     
    42343994 * @callback_method_impl{Reads a unsigned 16-bit value.}
    42353995 */
    4236 static DECLCALLBACK(int) dbgcFuncReadU16(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     3996static DECLCALLBACK(int) dbgcFuncReadU16(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    42373997                                         PDBGCVAR pResult)
    42383998{
     
    42424002
    42434003    uint16_t u16;
    4244     int rc = DBGCCmdHlpMemRead(pCmdHlp, pVM, &u16, sizeof(u16), &paArgs[0], NULL);
     4004    int rc = DBGCCmdHlpMemRead(pCmdHlp, &u16, sizeof(u16), &paArgs[0], NULL);
    42454005    if (RT_FAILURE(rc))
    42464006        return rc;
     
    42554015 * @callback_method_impl{Reads a unsigned 32-bit value.}
    42564016 */
    4257 static DECLCALLBACK(int) dbgcFuncReadU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4017static DECLCALLBACK(int) dbgcFuncReadU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    42584018                                         PDBGCVAR pResult)
    42594019{
     
    42634023
    42644024    uint32_t u32;
    4265     int rc = DBGCCmdHlpMemRead(pCmdHlp, pVM, &u32, sizeof(u32), &paArgs[0], NULL);
     4025    int rc = DBGCCmdHlpMemRead(pCmdHlp, &u32, sizeof(u32), &paArgs[0], NULL);
    42664026    if (RT_FAILURE(rc))
    42674027        return rc;
     
    42764036 * @callback_method_impl{Reads a unsigned 64-bit value.}
    42774037 */
    4278 static DECLCALLBACK(int) dbgcFuncReadU64(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4038static DECLCALLBACK(int) dbgcFuncReadU64(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    42794039                                         PDBGCVAR pResult)
    42804040{
     
    42844044
    42854045    uint64_t u64;
    4286     int rc = DBGCCmdHlpMemRead(pCmdHlp, pVM, &u64, sizeof(u64), &paArgs[0], NULL);
     4046    int rc = DBGCCmdHlpMemRead(pCmdHlp, &u64, sizeof(u64), &paArgs[0], NULL);
    42874047    if (RT_FAILURE(rc))
    42884048        return rc;
     
    42974057 * @callback_method_impl{Reads a unsigned pointer-sized value.}
    42984058 */
    4299 static DECLCALLBACK(int) dbgcFuncReadPtr(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4059static DECLCALLBACK(int) dbgcFuncReadPtr(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    43004060                                         PDBGCVAR pResult)
    43014061{
     
    43064066    CPUMMODE enmMode = DBGCCmdHlpGetCpuMode(pCmdHlp);
    43074067    if (enmMode == CPUMMODE_LONG)
    4308         return dbgcFuncReadU64(pFunc, pCmdHlp, pVM, paArgs, cArgs, pResult);
    4309     return dbgcFuncReadU32(pFunc, pCmdHlp, pVM, paArgs, cArgs, pResult);
     4068        return dbgcFuncReadU64(pFunc, pCmdHlp, pUVM, paArgs, cArgs, pResult);
     4069    return dbgcFuncReadU32(pFunc, pCmdHlp, pUVM, paArgs, cArgs, pResult);
    43104070}
    43114071
     
    43144074 * @callback_method_impl{The hi(value) function implementation.}
    43154075 */
    4316 static DECLCALLBACK(int) dbgcFuncHi(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4076static DECLCALLBACK(int) dbgcFuncHi(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    43174077                                    PDBGCVAR pResult)
    43184078{
     
    43344094    DBGCVAR_SET_RANGE(pResult, paArgs[0].enmRangeType, paArgs[0].u64Range);
    43354095
    4336     NOREF(pFunc); NOREF(pCmdHlp); NOREF(pVM);
     4096    NOREF(pFunc); NOREF(pCmdHlp); NOREF(pUVM);
    43374097    return VINF_SUCCESS;
    43384098}
     
    43424102 * @callback_method_impl{The low(value) function implementation.}
    43434103 */
    4344 static DECLCALLBACK(int) dbgcFuncLow(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4104static DECLCALLBACK(int) dbgcFuncLow(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    43454105                                     PDBGCVAR pResult)
    43464106{
     
    43624122    DBGCVAR_SET_RANGE(pResult, paArgs[0].enmRangeType, paArgs[0].u64Range);
    43634123
    4364     NOREF(pFunc); NOREF(pCmdHlp); NOREF(pVM);
     4124    NOREF(pFunc); NOREF(pCmdHlp); NOREF(pUVM);
    43654125    return VINF_SUCCESS;
    43664126}
     
    43704130 * @callback_method_impl{The low(value) function implementation.}
    43714131 */
    4372 static DECLCALLBACK(int) dbgcFuncNot(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     4132static DECLCALLBACK(int) dbgcFuncNot(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    43734133                                     PDBGCVAR pResult)
    43744134{
    43754135    AssertReturn(cArgs == 1, VERR_DBGC_PARSE_BUG);
    4376     NOREF(pFunc); NOREF(pCmdHlp); NOREF(pVM);
     4136    NOREF(pFunc); NOREF(pCmdHlp); NOREF(pUVM);
    43774137    return DBGCCmdHlpEval(pCmdHlp, pResult, "!(%Dv)", &paArgs[0]);
    43784138}
  • trunk/src/VBox/Debugger/DBGCEval.cpp

    r41780 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    434434                                  pszArgs, &iArg, &cArgs);
    435435    if (RT_SUCCESS(rc))
    436         rc = pFunc->pfnHandler(pFunc, &pDbgc->CmdHlp, pDbgc->pVM, &pDbgc->aArgs[iArg], cArgs, pResult);
     436        rc = pFunc->pfnHandler(pFunc, &pDbgc->CmdHlp, pDbgc->pUVM, &pDbgc->aArgs[iArg], cArgs, pResult);
    437437    pDbgc->iArg = iArg;
    438438    return rc;
     
    13711371         */
    13721372        if (!fNoExecute)
    1373             rc = pCmd->pfnHandler(pCmd, &pDbgc->CmdHlp, pDbgc->pVM, &pDbgc->aArgs[iArg], cArgs);
     1373            rc = pCmd->pfnHandler(pCmd, &pDbgc->CmdHlp, pDbgc->pUVM, &pDbgc->aArgs[iArg], cArgs);
    13741374        pDbgc->rcCmd = rc;
    13751375        pDbgc->iArg  = iArg;
  • trunk/src/VBox/Debugger/DBGCFunctions.cpp

    r41561 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4545 * @callback_method_impl{The randu32() function implementation.}
    4646 */
    47 static DECLCALLBACK(int) dbgcFuncRandU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, uint32_t cArgs,
     47static DECLCALLBACK(int) dbgcFuncRandU32(PCDBGCFUNC pFunc, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, uint32_t cArgs,
    4848                                         PDBGCVAR pResult)
    4949{
     
    5151    uint32_t u32 = RTRandU32();
    5252    DBGCVAR_INIT_NUMBER(pResult, u32);
    53     NOREF(pFunc); NOREF(pCmdHlp); NOREF(pVM); NOREF(paArgs);
     53    NOREF(pFunc); NOREF(pCmdHlp); NOREF(pUVM); NOREF(paArgs);
    5454    return VINF_SUCCESS;
    5555}
  • trunk/src/VBox/Debugger/DBGCInternal.h

    r41561 r44399  
    112112    /** Pointer to the current VM. */
    113113    PVM                 pVM;
     114    /** The user mode handle of the current VM. */
     115    PUVM                pUVM;
    114116    /** The ID of current virtual CPU. */
    115117    VMCPUID             idCpu;
  • trunk/src/VBox/Debugger/DBGCOps.cpp

    r41573 r44399  
    462462    if (enmCat == DBGCVAR_CAT_SYMBOL)
    463463    {
    464         int rc = DBGFR3RegNmValidate(pDbgc->pVM, pDbgc->idCpu, pArg->u.pszString);
     464        int rc = DBGFR3RegNmValidate(pDbgc->pUVM, pDbgc->idCpu, pArg->u.pszString);
    465465        if (RT_SUCCESS(rc))
    466466            DBGCVAR_INIT_STRING(pResult, pArg->u.pszString);
     
    473473    DBGFREGVALTYPE  enmType;
    474474    DBGFREGVAL      Value;
    475     int rc = DBGFR3RegNmQuery(pDbgc->pVM, pDbgc->idCpu, pArg->u.pszString, &Value, &enmType);
     475    int rc = DBGFR3RegNmQuery(pDbgc->pUVM, pDbgc->idCpu, pArg->u.pszString, &Value, &enmType);
    476476    if (RT_SUCCESS(rc))
    477477    {
  • trunk/src/VBox/Debugger/DBGCTcp.cpp

    r35628 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    185185 * @param   pvUser      The VM handle.
    186186 */
    187 static int      dbgcTcpConnection(RTSOCKET Sock, void *pvUser)
     187static DECLCALLBACK(int) dbgcTcpConnection(RTSOCKET Sock, void *pvUser)
    188188{
    189189    LogFlow(("dbgcTcpConnection: connection! Sock=%d pvUser=%p\n", Sock, pvUser));
     
    199199    DbgcTcp.fAlive = true;
    200200    DbgcTcp.Sock   = Sock;
    201     int rc = DBGCCreate((PVM)pvUser, &DbgcTcp.Back, 0);
     201    int rc = DBGCCreate((PUVM)pvUser, &DbgcTcp.Back, 0);
    202202    LogFlow(("dbgcTcpConnection: disconnect rc=%Rrc\n", rc));
    203203    return rc;
     
    209209 *
    210210 * @returns VBox status.
    211  * @param   pVM        VM handle.
     211 * @param   pUVM        The user mode VM handle.
    212212 * @param   ppvData     Where to store a pointer to the instance data.
    213213 */
    214 DBGDECL(int)    DBGCTcpCreate(PVM pVM, void **ppvData)
     214DBGDECL(int)    DBGCTcpCreate(PUVM pUVM, void **ppvData)
    215215{
    216216    /*
    217217     * Check what the configuration says.
    218218     */
    219     PCFGMNODE pKey = CFGMR3GetChild(CFGMR3GetRoot(pVM), "DBGC");
     219    PCFGMNODE pKey = CFGMR3GetChild(CFGMR3GetRootU(pUVM), "DBGC");
    220220    bool fEnabled;
    221221    int rc = CFGMR3QueryBoolDef(pKey, "Enabled", &fEnabled,
     
    227227        );
    228228    if (RT_FAILURE(rc))
    229         return VM_SET_ERROR(pVM, rc, "Configuration error: Failed querying \"DBGC/Enabled\"");
     229        return VM_SET_ERROR_U(pUVM, rc, "Configuration error: Failed querying \"DBGC/Enabled\"");
    230230
    231231    if (!fEnabled)
     
    241241    rc = CFGMR3QueryU32Def(pKey, "Port", &u32Port, 5000);
    242242    if (RT_FAILURE(rc))
    243         return VM_SET_ERROR(pVM, rc, "Configuration error: Failed querying \"DBGC/Port\"");
     243        return VM_SET_ERROR_U(pUVM, rc, "Configuration error: Failed querying \"DBGC/Port\"");
    244244
    245245    /*
     
    249249    rc = CFGMR3QueryStringDef(pKey, "Address", szAddress, sizeof(szAddress), "");
    250250    if (RT_FAILURE(rc))
    251         return VM_SET_ERROR(pVM, rc, "Configuration error: Failed querying \"DBGC/Address\"");
     251        return VM_SET_ERROR_U(pUVM, rc, "Configuration error: Failed querying \"DBGC/Address\"");
    252252
    253253    /*
     
    255255     */
    256256    PRTTCPSERVER pServer;
    257     rc = RTTcpServerCreate(szAddress, u32Port, RTTHREADTYPE_DEBUGGER, "DBGC", dbgcTcpConnection, pVM, &pServer);
     257    rc = RTTcpServerCreate(szAddress, u32Port, RTTHREADTYPE_DEBUGGER, "DBGC", dbgcTcpConnection, pUVM, &pServer);
    258258    if (RT_SUCCESS(rc))
    259259    {
     
    264264
    265265    LogFlow(("DBGCTcpCreate: returns %Rrc\n", rc));
    266     return VM_SET_ERROR(pVM, rc, "Cannot start TCP-based debugging console service");
     266    return VM_SET_ERROR_U(pUVM, rc, "Cannot start TCP-based debugging console service");
    267267}
    268268
     
    272272 *
    273273 * @returns VBox status.
    274  * @param   pVM         VM handle.
    275  */
    276 DBGDECL(int) DBGCTcpTerminate(PVM pVM, void *pvData)
     274 * @param   pUVM            The user mode VM handle.
     275 * @param   pvData          The data returned by DBGCTcpCreate.
     276 */
     277DBGDECL(int) DBGCTcpTerminate(PUVM pUVM, void *pvData)
    277278{
    278279    /*
  • trunk/src/VBox/Debugger/DBGConsole.cpp

    r43394 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    162162#include <VBox/dbg.h>
    163163#include <VBox/vmm/dbgf.h>
     164#include <VBox/vmm/vmapi.h> /* VMR3GetVM() */
    164165#include <VBox/err.h>
    165166#include <VBox/log.h>
     
    259260     */
    260261    RTDBGSYMBOL Symbol;
    261     rc = DBGFR3AsSymbolByName(pDbgc->pVM, pDbgc->hDbgAs, pszSymbol, &Symbol, NULL);
     262    rc = DBGFR3AsSymbolByName(pDbgc->pUVM, pDbgc->hDbgAs, pszSymbol, &Symbol, NULL);
    262263    if (RT_SUCCESS(rc))
    263264    {
     
    674675                    break;
    675676            }
    676             if (RT_SUCCESS(rc) && DBGFR3IsHalted(pDbgc->pVM))
     677            if (RT_SUCCESS(rc) && DBGFR3IsHalted(pDbgc->pUVM))
    677678                rc = pDbgc->CmdHlp.pfnExec(&pDbgc->CmdHlp, "r");
    678679            else
     
    810811    for (;;)
    811812    {
    812         if (    pDbgc->pVM
    813             &&  DBGFR3CanWait(pDbgc->pVM))
     813        if (    pDbgc->pUVM
     814            &&  DBGFR3CanWait(pDbgc->pUVM))
    814815        {
    815816            /*
     
    817818             */
    818819            PCDBGFEVENT pEvent;
    819             rc = DBGFR3EventWait(pDbgc->pVM, pDbgc->fLog ? 1 : 32, &pEvent);
     820            rc = DBGFR3EventWait(pDbgc->pUVM, pDbgc->fLog ? 1 : 32, &pEvent);
    820821            if (RT_SUCCESS(rc))
    821822            {
     
    891892    pDbgc->pBack            = pBack;
    892893    pDbgc->pVM              = NULL;
     894    pDbgc->pUVM             = NULL;
    893895    pDbgc->idCpu            = 0;
    894896    pDbgc->hDbgAs           = DBGF_AS_GLOBAL;
     
    954956
    955957    /* Detach from the VM. */
    956     if (pDbgc->pVM)
    957         DBGFR3Detach(pDbgc->pVM);
     958    if (pDbgc->pUVM)
     959        DBGFR3Detach(pDbgc->pUVM);
    958960
    959961    /* finally, free the instance memory. */
     
    971973 * @returns The VBox status code causing the console termination.
    972974 *
    973  * @param   pVM         VM Handle.
     975 * @param   pUVM        The user mode VM handle.
    974976 * @param   pBack       Pointer to the backend structure. This must contain
    975977 *                      a full set of function pointers to service the console.
     
    978980 *          callbacks to return fatal failures.
    979981 */
    980 DBGDECL(int) DBGCCreate(PVM pVM, PDBGCBACK pBack, unsigned fFlags)
     982DBGDECL(int) DBGCCreate(PUVM pUVM, PDBGCBACK pBack, unsigned fFlags)
    981983{
    982984    /*
    983985     * Validate input.
    984986     */
    985     AssertPtrNullReturn(pVM, VERR_INVALID_POINTER);
     987    AssertPtrNullReturn(pUVM, VERR_INVALID_VM_HANDLE);
     988    PVM pVM = NULL;
     989    if (pUVM)
     990    {
     991        pVM = VMR3GetVM(pUVM);
     992        AssertPtrReturn(pVM, VERR_INVALID_VM_HANDLE);
     993    }
    986994
    987995    /*
     
    10021010     * Attach to the specified VM.
    10031011     */
    1004     if (RT_SUCCESS(rc) && pVM)
    1005     {
    1006         rc = DBGFR3Attach(pVM);
     1012    if (RT_SUCCESS(rc) && pUVM)
     1013    {
     1014        rc = DBGFR3Attach(pUVM);
    10071015        if (RT_SUCCESS(rc))
    10081016        {
    10091017            pDbgc->pVM   = pVM;
     1018            pDbgc->pUVM  = pUVM;
    10101019            pDbgc->idCpu = 0;
    10111020            rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL,
  • trunk/src/VBox/Debugger/DBGPlugInCommonELF.h

    r33540 r44399  
    3535/* @} */
    3636
    37 int DBGDiggerCommonParseElf32Mod(PVM pVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
     37int DBGDiggerCommonParseElf32Mod(PUVM pUVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
    3838                                 Elf32_Ehdr const *pEhdr, Elf32_Shdr const *paShdrs,
    3939                                 Elf32_Sym const *paSyms, size_t cMaxSyms,
     
    4141                                 RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag);
    4242
    43 int DBGDiggerCommonParseElf64Mod(PVM pVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
     43int DBGDiggerCommonParseElf64Mod(PUVM pUVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
    4444                                 Elf64_Ehdr const *pEhdr, Elf64_Shdr const *paShdrs,
    4545                                 Elf64_Sym const *paSyms, size_t cMaxSyms,
  • trunk/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h

    r43876 r44399  
    4444 * @returns VBox status code.
    4545 *
    46  * @param   pVM             The VM handle.
     46 * @param   pUVM            The user mode VM handle.
    4747 * @param   pszModName      The module name.
    4848 * @param   pszFilename     The filename. optional.
     
    6969 * @param   uModTag         Module tag. Pass 0 if tagging is of no interest.
    7070 */
    71 int DBGDiggerCommonParseElfMod(PVM pVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
     71int DBGDiggerCommonParseElfMod(PUVM pUVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
    7272                               Elf_Ehdr const *pEhdr, Elf_Shdr const *paShdrs,
    7373                               Elf_Sym const *paSyms, size_t cMaxSyms,
     
    7575                               RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag)
    7676{
    77     AssertPtrReturn(pVM, VERR_INVALID_POINTER);
     77    AssertPtrReturn(pUVM, VERR_INVALID_POINTER);
    7878    AssertPtrReturn(pszModName, VERR_INVALID_POINTER);
    7979    AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
     
    316316     * Link it into the address space.
    317317     */
    318     RTDBGAS hAs = DBGFR3AsResolveAndRetain(pVM, DBGF_AS_KERNEL);
     318    RTDBGAS hAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
    319319    if (hAs != NIL_RTDBGAS)
    320320        rc = dbgDiggerCommonLinkElfSegs(hAs, hMod, paSegs, cSegs);
  • trunk/src/VBox/Debugger/DBGPlugInDiggers.cpp

    r40726 r44399  
    2828
    2929
    30 DECLEXPORT(int) DBGCPlugInEntry(DBGCPLUGINOP enmOperation, PVM pVM, uintptr_t uArg)
     30DECLEXPORT(int) DBGCPlugInEntry(DBGCPLUGINOP enmOperation, PUVM pUVM, uintptr_t uArg)
    3131{
    3232    static PCDBGFOSREG s_aPlugIns[] =
     
    4848            for (unsigned i = 0; i < RT_ELEMENTS(s_aPlugIns); i++)
    4949            {
    50                 int rc = DBGFR3OSRegister(pVM, s_aPlugIns[i]);
     50                int rc = DBGFR3OSRegister(pUVM, s_aPlugIns[i]);
    5151                if (RT_FAILURE(rc))
    5252                {
    5353                    AssertRC(rc);
    5454                    while (i-- > 0)
    55                         DBGFR3OSDeregister(pVM, s_aPlugIns[i]);
     55                        DBGFR3OSDeregister(pUVM, s_aPlugIns[i]);
    5656                    return rc;
    5757                }
     
    6464            for (unsigned i = 0; i < RT_ELEMENTS(s_aPlugIns); i++)
    6565            {
    66                 int rc = DBGFR3OSDeregister(pVM, s_aPlugIns[i]);
     66                int rc = DBGFR3OSDeregister(pUVM, s_aPlugIns[i]);
    6767                AssertRC(rc);
    6868            }
  • trunk/src/VBox/Debugger/DBGPlugInLinux.cpp

    r35346 r44399  
    7474*   Internal Functions                                                         *
    7575*******************************************************************************/
    76 static DECLCALLBACK(int)  dbgDiggerLinuxInit(PVM pVM, void *pvData);
     76static DECLCALLBACK(int)  dbgDiggerLinuxInit(PUVM pUVM, void *pvData);
    7777
    7878
     
    9292 * @copydoc DBGFOSREG::pfnQueryInterface
    9393 */
    94 static DECLCALLBACK(void *) dbgDiggerLinuxQueryInterface(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf)
     94static DECLCALLBACK(void *) dbgDiggerLinuxQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    9595{
    9696    return NULL;
     
    101101 * @copydoc DBGFOSREG::pfnQueryVersion
    102102 */
    103 static DECLCALLBACK(int)  dbgDiggerLinuxQueryVersion(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion)
     103static DECLCALLBACK(int)  dbgDiggerLinuxQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    104104{
    105105    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     
    109109     * It's all in the linux banner.
    110110     */
    111     int rc = DBGFR3MemReadString(pVM, 0, &pThis->AddrLinuxBanner, pszVersion, cchVersion);
     111    int rc = DBGFR3MemReadString(pUVM, 0, &pThis->AddrLinuxBanner, pszVersion, cchVersion);
    112112    if (RT_SUCCESS(rc))
    113113    {
     
    129129 * @copydoc DBGFOSREG::pfnTerm
    130130 */
    131 static DECLCALLBACK(void)  dbgDiggerLinuxTerm(PVM pVM, void *pvData)
     131static DECLCALLBACK(void)  dbgDiggerLinuxTerm(PUVM pUVM, void *pvData)
    132132{
    133133    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     
    141141 * @copydoc DBGFOSREG::pfnRefresh
    142142 */
    143 static DECLCALLBACK(int)  dbgDiggerLinuxRefresh(PVM pVM, void *pvData)
     143static DECLCALLBACK(int)  dbgDiggerLinuxRefresh(PUVM pUVM, void *pvData)
    144144{
    145145    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     
    150150     * For now we'll flush and reload everything.
    151151     */
    152     dbgDiggerLinuxTerm(pVM, pvData);
    153     return dbgDiggerLinuxInit(pVM, pvData);
     152    dbgDiggerLinuxTerm(pUVM, pvData);
     153    return dbgDiggerLinuxInit(pUVM, pvData);
    154154}
    155155
     
    158158 * @copydoc DBGFOSREG::pfnInit
    159159 */
    160 static DECLCALLBACK(int)  dbgDiggerLinuxInit(PVM pVM, void *pvData)
     160static DECLCALLBACK(int)  dbgDiggerLinuxInit(PUVM pUVM, void *pvData)
    161161{
    162162    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     
    183183 * @copydoc DBGFOSREG::pfnProbe
    184184 */
    185 static DECLCALLBACK(bool)  dbgDiggerLinuxProbe(PVM pVM, void *pvData)
     185static DECLCALLBACK(bool)  dbgDiggerLinuxProbe(PUVM pUVM, void *pvData)
    186186{
    187187    PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData;
     
    196196    {
    197197        DBGFADDRESS KernelAddr;
    198         DBGFR3AddrFromFlat(pVM, &KernelAddr, g_au64LnxKernelAddresses[i]);
     198        DBGFR3AddrFromFlat(pUVM, &KernelAddr, g_au64LnxKernelAddresses[i]);
    199199        DBGFADDRESS HitAddr;
    200200        static const uint8_t s_abLinuxVersion[] = "Linux version 2.";
    201         int rc = DBGFR3MemScan(pVM, 0, &KernelAddr, LNX_MAX_KERNEL_SIZE, 1,
     201        int rc = DBGFR3MemScan(pUVM, 0, &KernelAddr, LNX_MAX_KERNEL_SIZE, 1,
    202202                               s_abLinuxVersion, sizeof(s_abLinuxVersion) - 1, &HitAddr);
    203203        if (RT_SUCCESS(rc))
     
    205205            char szTmp[128];
    206206            char const *pszY = &szTmp[sizeof(s_abLinuxVersion) - 1];
    207             rc = DBGFR3MemReadString(pVM, 0, &HitAddr, szTmp, sizeof(szTmp));
     207            rc = DBGFR3MemReadString(pUVM, 0, &HitAddr, szTmp, sizeof(szTmp));
    208208            if (    RT_SUCCESS(rc)
    209209                &&  *pszY >= '0'
     
    223223 * @copydoc DBGFOSREG::pfnDestruct
    224224 */
    225 static DECLCALLBACK(void)  dbgDiggerLinuxDestruct(PVM pVM, void *pvData)
     225static DECLCALLBACK(void)  dbgDiggerLinuxDestruct(PUVM pUVM, void *pvData)
    226226{
    227227
     
    232232 * @copydoc DBGFOSREG::pfnConstruct
    233233 */
    234 static DECLCALLBACK(int)  dbgDiggerLinuxConstruct(PVM pVM, void *pvData)
     234static DECLCALLBACK(int)  dbgDiggerLinuxConstruct(PUVM pUVM, void *pvData)
    235235{
    236236    return VINF_SUCCESS;
  • trunk/src/VBox/Debugger/DBGPlugInOS2.cpp

    r43876 r44399  
    8585*   Internal Functions                                                         *
    8686*******************************************************************************/
    87 static DECLCALLBACK(int)  dbgDiggerOS2Init(PVM pVM, void *pvData);
     87static DECLCALLBACK(int)  dbgDiggerOS2Init(PUVM pUVM, void *pvData);
    8888
    8989
     
    9696 * Process a PE image found in guest memory.
    9797 *
    98  * @param   pThis               The instance data.
    99  * @param   pVM                 The VM handle.
    100  * @param   pszName             The image name.
    101  * @param   pImageAddr          The image address.
    102  * @param   cbImage             The size of the image.
    103  * @param   pbBuf               Scratch buffer containing the first
    104  *                              RT_MIN(cbBuf, cbImage) bytes of the image.
    105  * @param   cbBuf               The scratch buffer size.
    106  */
    107 static void dbgDiggerOS2ProcessImage(PDBGDIGGEROS2 pThis, PVM pVM, const char *pszName,
     98 * @param   pThis           The instance data.
     99 * @param   pUVM            The user mode VM handle.
     100 * @param   pszName         The image name.
     101 * @param   pImageAddr      The image address.
     102 * @param   cbImage         The size of the image.
     103 * @param   pbBuf           Scratch buffer containing the first
     104 *                          RT_MIN(cbBuf, cbImage) bytes of the image.
     105 * @param   cbBuf           The scratch buffer size.
     106 */
     107static void dbgDiggerOS2ProcessImage(PDBGDIGGEROS2 pThis, PUVM pUVM, const char *pszName,
    108108                                     PCDBGFADDRESS pImageAddr, uint32_t cbImage,
    109109                                     uint8_t *pbBuf, size_t cbBuf)
     
    118118 * @copydoc DBGFOSREG::pfnQueryInterface
    119119 */
    120 static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf)
     120static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    121121{
    122122    return NULL;
     
    127127 * @copydoc DBGFOSREG::pfnQueryVersion
    128128 */
    129 static DECLCALLBACK(int)  dbgDiggerOS2QueryVersion(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion)
     129static DECLCALLBACK(int)  dbgDiggerOS2QueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    130130{
    131131    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     
    171171 * @copydoc DBGFOSREG::pfnTerm
    172172 */
    173 static DECLCALLBACK(void)  dbgDiggerOS2Term(PVM pVM, void *pvData)
     173static DECLCALLBACK(void)  dbgDiggerOS2Term(PUVM pUVM, void *pvData)
    174174{
    175175    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     
    183183 * @copydoc DBGFOSREG::pfnRefresh
    184184 */
    185 static DECLCALLBACK(int)  dbgDiggerOS2Refresh(PVM pVM, void *pvData)
     185static DECLCALLBACK(int)  dbgDiggerOS2Refresh(PUVM pUVM, void *pvData)
    186186{
    187187    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     
    192192     * For now we'll flush and reload everything.
    193193     */
    194     RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pVM, DBGF_AS_KERNEL);
     194    RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
    195195    if (hDbgAs != NIL_RTDBGAS)
    196196    {
     
    212212    }
    213213
    214     dbgDiggerOS2Term(pVM, pvData);
    215     return dbgDiggerOS2Init(pVM, pvData);
     214    dbgDiggerOS2Term(pUVM, pvData);
     215    return dbgDiggerOS2Init(pUVM, pvData);
    216216}
    217217
     
    220220 * @copydoc DBGFOSREG::pfnInit
    221221 */
    222 static DECLCALLBACK(int)  dbgDiggerOS2Init(PVM pVM, void *pvData)
     222static DECLCALLBACK(int)  dbgDiggerOS2Init(PUVM pUVM, void *pvData)
    223223{
    224224    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
     
    240240    do {
    241241        /* Version info is at GIS:15h (major/minor/revision). */
    242         rc = DBGFR3AddrFromSelOff(pVM, 0 /*idCpu*/, &Addr, pThis->selGIS, 0x15);
     242        rc = DBGFR3AddrFromSelOff(pUVM, 0 /*idCpu*/, &Addr, pThis->selGIS, 0x15);
    243243        if (RT_FAILURE(rc))
    244244            break;
    245         rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &Addr, u.au32, sizeof(uint32_t));
     245        rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &Addr, u.au32, sizeof(uint32_t));
    246246        if (RT_FAILURE(rc))
    247247            break;
     
    260260 * @copydoc DBGFOSREG::pfnProbe
    261261 */
    262 static DECLCALLBACK(bool)  dbgDiggerOS2Probe(PVM pVM, void *pvData)
     262static DECLCALLBACK(bool)  dbgDiggerOS2Probe(PUVM pUVM, void *pvData)
    263263{
    264264    PDBGDIGGEROS2   pThis = (PDBGDIGGEROS2)pvData;
     
    283283     */
    284284    do {
    285         rc = DBGFR3AddrFromSelOff(pVM, 0 /*idCpu*/, &Addr, 0x70, 0x00);
     285        rc = DBGFR3AddrFromSelOff(pUVM, 0 /*idCpu*/, &Addr, 0x70, 0x00);
    286286        if (RT_FAILURE(rc))
    287287            break;
    288         rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &Addr, u.au32, 256);
     288        rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &Addr, u.au32, 256);
    289289        if (RT_FAILURE(rc))
    290290            break;
     
    318318 * @copydoc DBGFOSREG::pfnDestruct
    319319 */
    320 static DECLCALLBACK(void)  dbgDiggerOS2Destruct(PVM pVM, void *pvData)
     320static DECLCALLBACK(void)  dbgDiggerOS2Destruct(PUVM pUVM, void *pvData)
    321321{
    322322
     
    327327 * @copydoc DBGFOSREG::pfnConstruct
    328328 */
    329 static DECLCALLBACK(int)  dbgDiggerOS2Construct(PVM pVM, void *pvData)
     329static DECLCALLBACK(int)  dbgDiggerOS2Construct(PUVM pUVM, void *pvData)
    330330{
    331331    PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData;
  • trunk/src/VBox/Debugger/DBGPlugInSolaris.cpp

    r35346 r44399  
    350350*   Internal Functions                                                         *
    351351*******************************************************************************/
    352 static DECLCALLBACK(int)  dbgDiggerSolarisInit(PVM pVM, void *pvData);
     352static DECLCALLBACK(int)  dbgDiggerSolarisInit(PUVM pUVM, void *pvData);
    353353
    354354
     
    357357 * @copydoc DBGFOSREG::pfnQueryInterface
    358358 */
    359 static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf)
     359static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    360360{
    361361    return NULL;
     
    366366 * @copydoc DBGFOSREG::pfnQueryVersion
    367367 */
    368 static DECLCALLBACK(int)  dbgDiggerSolarisQueryVersion(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion)
     368static DECLCALLBACK(int)  dbgDiggerSolarisQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    369369{
    370370    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     
    377377    SOL_utsname_t UtsName;
    378378    RTDBGSYMBOL SymUtsName;
    379     int rc = DBGFR3AsSymbolByName(pVM, DBGF_AS_KERNEL, "utsname", &SymUtsName, NULL);
     379    int rc = DBGFR3AsSymbolByName(pUVM, DBGF_AS_KERNEL, "utsname", &SymUtsName, NULL);
    380380    if (RT_SUCCESS(rc))
    381         rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, SymUtsName.Value), &UtsName, sizeof(UtsName));
     381        rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, SymUtsName.Value), &UtsName, sizeof(UtsName));
    382382    if (RT_FAILURE(rc))
    383383    {
     
    387387        memset(&UtsName, '\0', sizeof(UtsName));
    388388        strcpy(&UtsName.sysname[0], "SunOS");
    389         rc = DBGFR3MemScan(pVM, 0, &pThis->AddrUnixData, SOL_UNIX_MAX_DATA_SEG_SIZE, 1,
     389        rc = DBGFR3MemScan(pUVM, 0, &pThis->AddrUnixData, SOL_UNIX_MAX_DATA_SEG_SIZE, 1,
    390390                           &UtsName.sysname[0], sizeof(UtsName.sysname), &Addr);
    391391        if (RT_SUCCESS(rc))
    392             rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, Addr.FlatPtr - RT_OFFSETOF(SOL_utsname_t, sysname)),
     392            rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, Addr.FlatPtr - RT_OFFSETOF(SOL_utsname_t, sysname)),
    393393                               &UtsName, sizeof(UtsName));
    394394    }
     
    423423 * Processes a modctl_t.
    424424 *
    425  * @param   pVM     The VM handle.
     425 * @param   pUVM    The user mode VM handle.
    426426 * @param   pThis   Our instance data.
    427427 * @param   pModCtl Pointer to the modctl structure.
    428428 */
    429 static void dbgDiggerSolarisProcessModCtl32(PVM pVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
     429static void dbgDiggerSolarisProcessModCtl32(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
    430430{
    431431    /* skip it if it's not loaded and installed */
     
    444444    char szModName[64];
    445445    DBGFADDRESS Addr;
    446     int rc = DBGFR3MemReadString(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_32.mod_modname), szModName, sizeof(szModName));
     446    int rc = DBGFR3MemReadString(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_32.mod_modname), szModName, sizeof(szModName));
    447447    if (RT_FAILURE(rc))
    448448        return;
     
    452452    AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_filename, v9_32.mod_filename);
    453453    char szFilename[256];
    454     rc = DBGFR3MemReadString(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_32.mod_filename), szFilename, sizeof(szFilename));
     454    rc = DBGFR3MemReadString(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_32.mod_filename), szFilename, sizeof(szFilename));
    455455    if (RT_FAILURE(rc))
    456456        strcpy(szFilename, szModName);
     
    463463    AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_mp, v9_32.mod_mp);
    464464    struct SOL32_module Module;
    465     rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_32.mod_mp), &Module, sizeof(Module));
     465    rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_32.mod_mp), &Module, sizeof(Module));
    466466    if (RT_FAILURE(rc))
    467467        return;
     
    533533    if (!paShdrs)
    534534        return;
    535     rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, Module.shdrs), paShdrs, cb);
     535    rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, Module.shdrs), paShdrs, cb);
    536536    if (RT_SUCCESS(rc))
    537537    {
     
    539539        if (pvSymSpace)
    540540        {
    541             rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, Module.symspace), pvSymSpace, Module.symsize);
     541            rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, Module.symspace), pvSymSpace, Module.symsize);
    542542            if (RT_SUCCESS(rc))
    543543            {
     
    554554                cMaxSyms = RT_MIN(cMaxSyms, Module.nsyms);
    555555
    556                 DBGDiggerCommonParseElf32Mod(pVM, szModName, szFilename, DBG_DIGGER_ELF_FUNNY_SHDRS,
     556                DBGDiggerCommonParseElf32Mod(pUVM, szModName, szFilename, DBG_DIGGER_ELF_FUNNY_SHDRS,
    557557                                             &Module.hdr, paShdrs, paSyms, cMaxSyms, pbStrings, cbMaxStrings,
    558558                                             SOL32_MIN_KRNL_ADDR, SOL32_MAX_KRNL_ADDR - 1, DIG_SOL_MOD_TAG);
     
    570570 * Processes a modctl_t.
    571571 *
    572  * @param   pVM     The VM handle.
     572 * @param   pUVM    The user mode VM handle.
    573573 * @param   pThis   Our instance data.
    574574 * @param   pModCtl Pointer to the modctl structure.
    575575 */
    576 static void dbgDiggerSolarisProcessModCtl64(PVM pVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
     576static void dbgDiggerSolarisProcessModCtl64(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl)
    577577{
    578578    /* skip it if it's not loaded and installed */
     
    591591    char szModName[64];
    592592    DBGFADDRESS Addr;
    593     int rc = DBGFR3MemReadString(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_64.mod_modname), szModName, sizeof(szModName));
     593    int rc = DBGFR3MemReadString(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_64.mod_modname), szModName, sizeof(szModName));
    594594    if (RT_FAILURE(rc))
    595595        return;
     
    599599    AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_filename, v9_64.mod_filename);
    600600    char szFilename[256];
    601     rc = DBGFR3MemReadString(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_64.mod_filename), szFilename, sizeof(szFilename));
     601    rc = DBGFR3MemReadString(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_64.mod_filename), szFilename, sizeof(szFilename));
    602602    if (RT_FAILURE(rc))
    603603        strcpy(szFilename, szModName);
     
    610610    AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_mp, v9_64.mod_mp);
    611611    struct SOL64_module Module;
    612     rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->v9_64.mod_mp), &Module, sizeof(Module));
     612    rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, pModCtl->v9_64.mod_mp), &Module, sizeof(Module));
    613613    if (RT_FAILURE(rc))
    614614        return;
     
    679679    if (!paShdrs)
    680680        return;
    681     rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, Module.shdrs), paShdrs, cb);
     681    rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, Module.shdrs), paShdrs, cb);
    682682    if (RT_SUCCESS(rc))
    683683    {
     
    685685        if (pvSymSpace)
    686686        {
    687             rc = DBGFR3MemRead(pVM, 0, DBGFR3AddrFromFlat(pVM, &Addr, Module.symspace), pvSymSpace, Module.symsize);
     687            rc = DBGFR3MemRead(pUVM, 0, DBGFR3AddrFromFlat(pUVM, &Addr, Module.symspace), pvSymSpace, Module.symsize);
    688688            if (RT_SUCCESS(rc))
    689689            {
     
    700700                cMaxSyms = RT_MIN(cMaxSyms, Module.nsyms);
    701701
    702                 DBGDiggerCommonParseElf64Mod(pVM, szModName, szFilename, DBG_DIGGER_ELF_FUNNY_SHDRS,
     702                DBGDiggerCommonParseElf64Mod(pUVM, szModName, szFilename, DBG_DIGGER_ELF_FUNNY_SHDRS,
    703703                                             &Module.hdr, paShdrs, paSyms, cMaxSyms, pbStrings, cbMaxStrings,
    704704                                             SOL64_MIN_KRNL_ADDR, SOL64_MAX_KRNL_ADDR - 1, DIG_SOL_MOD_TAG);
     
    716716 * @copydoc DBGFOSREG::pfnTerm
    717717 */
    718 static DECLCALLBACK(void)  dbgDiggerSolarisTerm(PVM pVM, void *pvData)
     718static DECLCALLBACK(void)  dbgDiggerSolarisTerm(PUVM pUVM, void *pvData)
    719719{
    720720    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     
    728728 * @copydoc DBGFOSREG::pfnRefresh
    729729 */
    730 static DECLCALLBACK(int)  dbgDiggerSolarisRefresh(PVM pVM, void *pvData)
     730static DECLCALLBACK(int)  dbgDiggerSolarisRefresh(PUVM pUVM, void *pvData)
    731731{
    732732    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     
    737737     * For now we'll flush and reload everything.
    738738     */
    739     RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pVM, DBGF_AS_KERNEL);
     739    RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
    740740    if (hDbgAs != NIL_RTDBGAS)
    741741    {
     
    757757    }
    758758
    759     dbgDiggerSolarisTerm(pVM, pvData);
    760     return dbgDiggerSolarisInit(pVM, pvData);
     759    dbgDiggerSolarisTerm(pUVM, pvData);
     760    return dbgDiggerSolarisInit(pUVM, pvData);
    761761}
    762762
     
    765765 * @copydoc DBGFOSREG::pfnInit
    766766 */
    767 static DECLCALLBACK(int)  dbgDiggerSolarisInit(PVM pVM, void *pvData)
     767static DECLCALLBACK(int)  dbgDiggerSolarisInit(PUVM pUVM, void *pvData)
    768768{
    769769    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     
    775775     * On Solaris the kernel and is the global address space.
    776776     */
    777     DBGFR3AsSetAlias(pVM, DBGF_AS_KERNEL, DBGF_AS_GLOBAL);
     777    DBGFR3AsSetAlias(pUVM, DBGF_AS_KERNEL, DBGF_AS_GLOBAL);
    778778
    779779/** @todo Use debug_info, build 7x / S10U6. */
     
    783783     * We know it resides in the unix data segment.
    784784     */
    785     DBGFR3AddrFromFlat(pVM, &pThis->AddrUnixModCtl, 0);
     785    DBGFR3AddrFromFlat(pUVM, &pThis->AddrUnixModCtl, 0);
    786786
    787787    DBGFADDRESS     CurAddr = pThis->AddrUnixData;
    788788    DBGFADDRESS     MaxAddr;
    789     DBGFR3AddrFromFlat(pVM, &MaxAddr, CurAddr.FlatPtr + SOL_UNIX_MAX_DATA_SEG_SIZE);
     789    DBGFR3AddrFromFlat(pUVM, &MaxAddr, CurAddr.FlatPtr + SOL_UNIX_MAX_DATA_SEG_SIZE);
    790790    const uint8_t  *pbExpr = (const uint8_t *)&pThis->AddrUnixText.FlatPtr;
    791791    const uint32_t  cbExpr = pThis->f64Bit ? sizeof(uint64_t) : sizeof(uint32_t);
     
    794794    {
    795795        DBGFADDRESS HitAddr;
    796         rc = DBGFR3MemScan(pVM, 0, &CurAddr, MaxAddr.FlatPtr - CurAddr.FlatPtr, 1, pbExpr, cbExpr, &HitAddr);
     796        rc = DBGFR3MemScan(pUVM, 0, &CurAddr, MaxAddr.FlatPtr - CurAddr.FlatPtr, 1, pbExpr, cbExpr, &HitAddr);
    797797        if (RT_FAILURE(rc))
    798798            break;
     
    806806        if (pThis->f64Bit)
    807807        {
    808             DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v11_modctl_t, mod_text));
     808            DBGFR3AddrFromFlat(pUVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v11_modctl_t, mod_text));
    809809            SOL64v11_modctl_t ModCtlv11;
    810             rc = DBGFR3MemRead(pVM, 0, &ModCtlAddr, &ModCtlv11, sizeof(ModCtlv11));
     810            rc = DBGFR3MemRead(pUVM, 0, &ModCtlAddr, &ModCtlv11, sizeof(ModCtlv11));
    811811            if (RT_SUCCESS(rc))
    812812            {
     
    828828                    char szUnix[5];
    829829                    DBGFADDRESS NameAddr;
    830                     DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtlv11.mod_modname);
    831                     rc = DBGFR3MemRead(pVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
     830                    DBGFR3AddrFromFlat(pUVM, &NameAddr, ModCtlv11.mod_modname);
     831                    rc = DBGFR3MemRead(pUVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
    832832                    if (RT_SUCCESS(rc))
    833833                    {
     
    846846        else
    847847        {
    848             DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v11_modctl_t, mod_text));
     848            DBGFR3AddrFromFlat(pUVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v11_modctl_t, mod_text));
    849849            SOL32v11_modctl_t ModCtlv11;
    850             rc = DBGFR3MemRead(pVM, 0, &ModCtlAddr, &ModCtlv11, sizeof(ModCtlv11));
     850            rc = DBGFR3MemRead(pUVM, 0, &ModCtlAddr, &ModCtlv11, sizeof(ModCtlv11));
    851851            if (RT_SUCCESS(rc))
    852852            {
     
    868868                    char szUnix[5];
    869869                    DBGFADDRESS NameAddr;
    870                     DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtlv11.mod_modname);
    871                     rc = DBGFR3MemRead(pVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
     870                    DBGFR3AddrFromFlat(pUVM, &NameAddr, ModCtlv11.mod_modname);
     871                    rc = DBGFR3MemRead(pUVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
    872872                    if (RT_SUCCESS(rc))
    873873                    {
     
    888888        if (pThis->f64Bit)
    889889        {
    890             DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL64v9_modctl_t, mod_text));
     890            DBGFR3AddrFromFlat(pUVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL64v9_modctl_t, mod_text));
    891891            SOL64v9_modctl_t ModCtlv9;
    892             rc = DBGFR3MemRead(pVM, 0, &ModCtlAddr, &ModCtlv9, sizeof(ModCtlv9));
     892            rc = DBGFR3MemRead(pUVM, 0, &ModCtlAddr, &ModCtlv9, sizeof(ModCtlv9));
    893893            if (RT_SUCCESS(rc))
    894894            {
     
    908908                    char szUnix[5];
    909909                    DBGFADDRESS NameAddr;
    910                     DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtlv9.mod_modname);
    911                     rc = DBGFR3MemRead(pVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
     910                    DBGFR3AddrFromFlat(pUVM, &NameAddr, ModCtlv9.mod_modname);
     911                    rc = DBGFR3MemRead(pUVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
    912912                    if (RT_SUCCESS(rc))
    913913                    {
     
    926926        else
    927927        {
    928             DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v9_modctl_t, mod_text));
     928            DBGFR3AddrFromFlat(pUVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32v9_modctl_t, mod_text));
    929929            SOL32v9_modctl_t ModCtlv9;
    930             rc = DBGFR3MemRead(pVM, 0, &ModCtlAddr, &ModCtlv9, sizeof(ModCtlv9));
     930            rc = DBGFR3MemRead(pUVM, 0, &ModCtlAddr, &ModCtlv9, sizeof(ModCtlv9));
    931931            if (RT_SUCCESS(rc))
    932932            {
     
    946946                    char szUnix[5];
    947947                    DBGFADDRESS NameAddr;
    948                     DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtlv9.mod_modname);
    949                     rc = DBGFR3MemRead(pVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
     948                    DBGFR3AddrFromFlat(pUVM, &NameAddr, ModCtlv9.mod_modname);
     949                    rc = DBGFR3MemRead(pUVM, 0, &NameAddr, &szUnix, sizeof(szUnix));
    950950                    if (RT_SUCCESS(rc))
    951951                    {
     
    964964
    965965        /* next */
    966         DBGFR3AddrFromFlat(pVM, &CurAddr, HitAddr.FlatPtr + cbExpr);
     966        DBGFR3AddrFromFlat(pUVM, &CurAddr, HitAddr.FlatPtr + cbExpr);
    967967    }
    968968
     
    978978            /* read it */
    979979            SOL_modctl_t ModCtl;
    980             rc = DBGFR3MemRead(pVM, 0, &CurAddr, &ModCtl, cbModCtl);
     980            rc = DBGFR3MemRead(pUVM, 0, &CurAddr, &ModCtl, cbModCtl);
    981981            if (RT_FAILURE(rc))
    982982            {
     
    987987            /* process it. */
    988988            if (pThis->f64Bit)
    989                 dbgDiggerSolarisProcessModCtl64(pVM, pThis, &ModCtl);
     989                dbgDiggerSolarisProcessModCtl64(pUVM, pThis, &ModCtl);
    990990            else
    991                 dbgDiggerSolarisProcessModCtl32(pVM, pThis, &ModCtl);
     991                dbgDiggerSolarisProcessModCtl32(pUVM, pThis, &ModCtl);
    992992
    993993            /* next */
     
    10001000                    break;
    10011001                }
    1002                 DBGFR3AddrFromFlat(pVM, &CurAddr, ModCtl.v9_64.mod_next);
     1002                DBGFR3AddrFromFlat(pUVM, &CurAddr, ModCtl.v9_64.mod_next);
    10031003            }
    10041004            else
     
    10101010                    break;
    10111011                }
    1012                 DBGFR3AddrFromFlat(pVM, &CurAddr, ModCtl.v9_32.mod_next);
     1012                DBGFR3AddrFromFlat(pUVM, &CurAddr, ModCtl.v9_32.mod_next);
    10131013            }
    10141014            if (++iMod >= 1024)
     
    10281028 * @copydoc DBGFOSREG::pfnProbe
    10291029 */
    1030 static DECLCALLBACK(bool)  dbgDiggerSolarisProbe(PVM pVM, void *pvData)
     1030static DECLCALLBACK(bool)  dbgDiggerSolarisProbe(PUVM pUVM, void *pvData)
    10311031{
    10321032    PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
     
    10391039
    10401040    /* 32-bit search range. */
    1041     DBGFR3AddrFromFlat(pVM, &Addr, 0xfe800000);
     1041    DBGFR3AddrFromFlat(pUVM, &Addr, 0xfe800000);
    10421042    RTGCUINTPTR cbRange = 0xfec00000 - 0xfe800000;
    10431043
    10441044    DBGFADDRESS HitAddr;
    10451045    static const uint8_t s_abSunRelease[] = "SunOS Release ";
    1046     int rc = DBGFR3MemScan(pVM, 0, &Addr, cbRange, 1, s_abSunRelease, sizeof(s_abSunRelease) - 1, &HitAddr);
     1046    int rc = DBGFR3MemScan(pUVM, 0, &Addr, cbRange, 1, s_abSunRelease, sizeof(s_abSunRelease) - 1, &HitAddr);
    10471047    if (RT_FAILURE(rc))
    10481048    {
    10491049        /* 64-bit.... */
    1050         DBGFR3AddrFromFlat(pVM, &Addr, UINT64_C(0xfffffffffb800000));
     1050        DBGFR3AddrFromFlat(pUVM, &Addr, UINT64_C(0xfffffffffb800000));
    10511051        cbRange = UINT64_C(0xfffffffffbc00000) - UINT64_C(0xfffffffffb800000);
    1052         rc = DBGFR3MemScan(pVM, 0, &Addr, cbRange, 1, s_abSunRelease, sizeof(s_abSunRelease) - 1, &HitAddr);
     1052        rc = DBGFR3MemScan(pUVM, 0, &Addr, cbRange, 1, s_abSunRelease, sizeof(s_abSunRelease) - 1, &HitAddr);
    10531053        if (RT_FAILURE(rc))
    10541054            return false;
     
    10611061    static const uint8_t s_abSMI[] = "Sun Microsystems, Inc.";
    10621062    static const uint8_t s_abORCL[] = "Oracle and/or its affiliates.";
    1063     rc = DBGFR3MemScan(pVM, 0, &Addr, cbRange, 1, s_abSMI, sizeof(s_abSMI) - 1, &HitAddr);
     1063    rc = DBGFR3MemScan(pUVM, 0, &Addr, cbRange, 1, s_abSMI, sizeof(s_abSMI) - 1, &HitAddr);
    10641064    if (RT_FAILURE(rc))
    10651065    {
    10661066        /* Try the alternate copyright string. */
    1067         rc = DBGFR3MemScan(pVM, 0, &Addr, cbRange, 1, s_abORCL, sizeof(s_abORCL) - 1, &HitAddr);
     1067        rc = DBGFR3MemScan(pUVM, 0, &Addr, cbRange, 1, s_abORCL, sizeof(s_abORCL) - 1, &HitAddr);
    10681068        if (RT_FAILURE(rc))
    10691069            return false;
     
    10851085 * @copydoc DBGFOSREG::pfnDestruct
    10861086 */
    1087 static DECLCALLBACK(void)  dbgDiggerSolarisDestruct(PVM pVM, void *pvData)
     1087static DECLCALLBACK(void)  dbgDiggerSolarisDestruct(PUVM pUVM, void *pvData)
    10881088{
    10891089
     
    10941094 * @copydoc DBGFOSREG::pfnConstruct
    10951095 */
    1096 static DECLCALLBACK(int)  dbgDiggerSolarisConstruct(PVM pVM, void *pvData)
     1096static DECLCALLBACK(int)  dbgDiggerSolarisConstruct(PUVM pUVM, void *pvData)
    10971097{
    10981098    return VINF_SUCCESS;
  • trunk/src/VBox/Debugger/DBGPlugInWinNt.cpp

    r37809 r44399  
    261261*   Internal Functions                                                         *
    262262*******************************************************************************/
    263 static DECLCALLBACK(int)  dbgDiggerWinNtInit(PVM pVM, void *pvData);
     263static DECLCALLBACK(int)  dbgDiggerWinNtInit(PUVM pUVM, void *pvData);
    264264
    265265
     
    277277 * Process a PE image found in guest memory.
    278278 *
    279  * @param   pThis               The instance data.
    280  * @param   pVM                 The VM handle.
    281  * @param   pszName             The image name.
    282  * @param   pImageAddr          The image address.
    283  * @param   cbImage             The size of the image.
    284  * @param   pbBuf               Scratch buffer containing the first
    285  *                              RT_MIN(cbBuf, cbImage) bytes of the image.
    286  * @param   cbBuf               The scratch buffer size.
    287  */
    288 static void dbgDiggerWinNtProcessImage(PDBGDIGGERWINNT pThis, PVM pVM, const char *pszName,
     279 * @param   pThis           The instance data.
     280 * @param   pUVM            The user mode VM handle.
     281 * @param   pszName         The image name.
     282 * @param   pImageAddr      The image address.
     283 * @param   cbImage         The size of the image.
     284 * @param   pbBuf           Scratch buffer containing the first
     285 *                          RT_MIN(cbBuf, cbImage) bytes of the image.
     286 * @param   cbBuf           The scratch buffer size.
     287 */
     288static void dbgDiggerWinNtProcessImage(PDBGDIGGERWINNT pThis, PUVM pUVM, const char *pszName,
    289289                                       PCDBGFADDRESS pImageAddr, uint32_t cbImage,
    290290                                       uint8_t *pbBuf, size_t cbBuf)
     
    409409        DBGFADDRESS Addr = *pImageAddr;
    410410        DBGFR3AddrAdd(&Addr, uRvaDebugDir);
    411         rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &Addr, pbBuf, RT_MIN(cbDebugDir, cbBuf));
     411        rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &Addr, pbBuf, RT_MIN(cbDebugDir, cbBuf));
    412412        if (RT_SUCCESS(rc))
    413413        {
     
    430430     * Link the module.
    431431     */
    432     RTDBGAS hAs = DBGFR3AsResolveAndRetain(pVM, DBGF_AS_KERNEL);
     432    RTDBGAS hAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
    433433    if (hAs != NIL_RTDBGAS)
    434434        rc = RTDbgAsModuleLink(hAs, hMod, pImageAddr->FlatPtr, RTDBGASLINK_FLAGS_REPLACE /*fFlags*/);
     
    443443 * @copydoc DBGFOSREG::pfnQueryInterface
    444444 */
    445 static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf)
     445static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf)
    446446{
    447447    return NULL;
     
    452452 * @copydoc DBGFOSREG::pfnQueryVersion
    453453 */
    454 static DECLCALLBACK(int)  dbgDiggerWinNtQueryVersion(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion)
     454static DECLCALLBACK(int)  dbgDiggerWinNtQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion)
    455455{
    456456    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     
    472472 * @copydoc DBGFOSREG::pfnTerm
    473473 */
    474 static DECLCALLBACK(void)  dbgDiggerWinNtTerm(PVM pVM, void *pvData)
     474static DECLCALLBACK(void)  dbgDiggerWinNtTerm(PUVM pUVM, void *pvData)
    475475{
    476476    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     
    484484 * @copydoc DBGFOSREG::pfnRefresh
    485485 */
    486 static DECLCALLBACK(int)  dbgDiggerWinNtRefresh(PVM pVM, void *pvData)
     486static DECLCALLBACK(int)  dbgDiggerWinNtRefresh(PUVM pUVM, void *pvData)
    487487{
    488488    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     
    493493     * For now we'll flush and reload everything.
    494494     */
    495     RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pVM, DBGF_AS_KERNEL);
     495    RTDBGAS hDbgAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
    496496    if (hDbgAs != NIL_RTDBGAS)
    497497    {
     
    513513    }
    514514
    515     dbgDiggerWinNtTerm(pVM, pvData);
    516     return dbgDiggerWinNtInit(pVM, pvData);
     515    dbgDiggerWinNtTerm(pUVM, pvData);
     516    return dbgDiggerWinNtInit(pUVM, pvData);
    517517}
    518518
     
    521521 * @copydoc DBGFOSREG::pfnInit
    522522 */
    523 static DECLCALLBACK(int)  dbgDiggerWinNtInit(PVM pVM, void *pvData)
     523static DECLCALLBACK(int)  dbgDiggerWinNtInit(PUVM pUVM, void *pvData)
    524524{
    525525    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     
    538538     * Figure the NT version.
    539539     */
    540     DBGFR3AddrFromFlat(pVM, &Addr, pThis->f32Bit ? NTKUSERSHAREDDATA_WINNT32 : NTKUSERSHAREDDATA_WINNT64);
    541     rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &Addr, &u, PAGE_SIZE);
     540    DBGFR3AddrFromFlat(pUVM, &Addr, pThis->f32Bit ? NTKUSERSHAREDDATA_WINNT32 : NTKUSERSHAREDDATA_WINNT64);
     541    rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &Addr, &u, PAGE_SIZE);
    542542    if (RT_FAILURE(rc))
    543543        return rc;
     
    557557        /* Read the validate the MTE. */
    558558        NTMTE Mte;
    559         rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &Addr, &Mte, pThis->f32Bit ? sizeof(Mte.vX_32) : sizeof(Mte.vX_64));
     559        rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &Addr, &Mte, pThis->f32Bit ? sizeof(Mte.vX_32) : sizeof(Mte.vX_64));
    560560        if (RT_FAILURE(rc))
    561561            break;
     
    591591        /* Read the full name. */
    592592        DBGFADDRESS AddrName;
    593         DBGFR3AddrFromFlat(pVM, &AddrName, WINNT_UNION(pThis, &Mte, FullDllName.Buffer));
     593        DBGFR3AddrFromFlat(pUVM, &AddrName, WINNT_UNION(pThis, &Mte, FullDllName.Buffer));
    594594        uint16_t    cbName = WINNT_UNION(pThis, &Mte, FullDllName.Length);
    595595        if (cbName < sizeof(u))
    596             rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &AddrName, &u, cbName);
     596            rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &AddrName, &u, cbName);
    597597        else
    598598            rc = VERR_OUT_OF_RANGE;
    599599        if (RT_FAILURE(rc))
    600600        {
    601             DBGFR3AddrFromFlat(pVM, &AddrName, WINNT_UNION(pThis, &Mte, BaseDllName.Buffer));
     601            DBGFR3AddrFromFlat(pUVM, &AddrName, WINNT_UNION(pThis, &Mte, BaseDllName.Buffer));
    602602            cbName = WINNT_UNION(pThis, &Mte, BaseDllName.Length);
    603603            if (cbName < sizeof(u))
    604                 rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &AddrName, &u, cbName);
     604                rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &AddrName, &u, cbName);
    605605            else
    606606                rc = VERR_OUT_OF_RANGE;
     
    615615                /* Read the start of the PE image and pass it along to a worker. */
    616616                DBGFADDRESS ImageAddr;
    617                 DBGFR3AddrFromFlat(pVM, &ImageAddr, WINNT_UNION(pThis, &Mte, DllBase));
     617                DBGFR3AddrFromFlat(pUVM, &ImageAddr, WINNT_UNION(pThis, &Mte, DllBase));
    618618                uint32_t    cbImageBuf = RT_MIN(sizeof(u), WINNT_UNION(pThis, &Mte, SizeOfImage));
    619                 rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &ImageAddr, &u, cbImageBuf);
     619                rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &ImageAddr, &u, cbImageBuf);
    620620                if (RT_SUCCESS(rc))
    621621                    dbgDiggerWinNtProcessImage(pThis,
    622                                                pVM,
     622                                               pUVM,
    623623                                               pszName,
    624624                                               &ImageAddr,
     
    632632        /* next */
    633633        AddrPrev = Addr;
    634         DBGFR3AddrFromFlat(pVM, &Addr, WINNT_UNION(pThis, &Mte, InLoadOrderLinks.Flink));
     634        DBGFR3AddrFromFlat(pUVM, &Addr, WINNT_UNION(pThis, &Mte, InLoadOrderLinks.Flink));
    635635    } while (   Addr.FlatPtr != pThis->KernelMteAddr.FlatPtr
    636636             && Addr.FlatPtr != pThis->PsLoadedModuleListAddr.FlatPtr);
     
    644644 * @copydoc DBGFOSREG::pfnProbe
    645645 */
    646 static DECLCALLBACK(bool)  dbgDiggerWinNtProbe(PVM pVM, void *pvData)
     646static DECLCALLBACK(bool)  dbgDiggerWinNtProbe(PUVM pUVM, void *pvData)
    647647{
    648648    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
     
    663663     * success.
    664664     */
    665     CPUMMODE enmMode = DBGFR3CpuGetMode(pVM, 0 /*idCpu*/);
     665    CPUMMODE enmMode = DBGFR3CpuGetMode(pUVM, 0 /*idCpu*/);
    666666    if (enmMode == CPUMMODE_LONG)
    667667    {
     
    671671    {
    672672        DBGFADDRESS KernelAddr;
    673         for (DBGFR3AddrFromFlat(pVM, &KernelAddr, UINT32_C(0x80001000));
     673        for (DBGFR3AddrFromFlat(pUVM, &KernelAddr, UINT32_C(0x80001000));
    674674             KernelAddr.FlatPtr < UINT32_C(0xffff0000);
    675675             KernelAddr.FlatPtr += PAGE_SIZE)
    676676        {
    677             int rc = DBGFR3MemScan(pVM, 0 /*idCpu*/, &KernelAddr, UINT32_C(0xffff0000) - KernelAddr.FlatPtr,
     677            int rc = DBGFR3MemScan(pUVM, 0 /*idCpu*/, &KernelAddr, UINT32_C(0xffff0000) - KernelAddr.FlatPtr,
    678678                                   1, "MISYSPTE", sizeof("MISYSPTE") - 1, &KernelAddr);
    679679            if (RT_FAILURE(rc))
     
    682682
    683683            /* MZ + PE header. */
    684             rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, &KernelAddr, &u, sizeof(u));
     684            rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &KernelAddr, &u, sizeof(u));
    685685            if (    RT_SUCCESS(rc)
    686686                &&  u.MzHdr.e_magic == IMAGE_DOS_SIGNATURE
     
    707707                    Mte.SizeOfImage = pHdrs->OptionalHeader.SizeOfImage;
    708708                    DBGFADDRESS HitAddr;
    709                     rc = DBGFR3MemScan(pVM, 0 /*idCpu*/, &KernelAddr, UINT32_MAX - KernelAddr.FlatPtr,
     709                    rc = DBGFR3MemScan(pUVM, 0 /*idCpu*/, &KernelAddr, UINT32_MAX - KernelAddr.FlatPtr,
    710710                                       4 /*align*/, &Mte.DllBase, 3 * sizeof(uint32_t), &HitAddr);
    711711                    while (RT_SUCCESS(rc))
     
    714714                        NTMTE32 Mte2;
    715715                        DBGFADDRESS MteAddr = HitAddr;
    716                         rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, DBGFR3AddrSub(&MteAddr, RT_OFFSETOF(NTMTE32, DllBase)),
     716                        rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, DBGFR3AddrSub(&MteAddr, RT_OFFSETOF(NTMTE32, DllBase)),
    717717                                           &Mte2, sizeof(Mte2));
    718718                        if (    RT_SUCCESS(rc)
     
    731731                           )
    732732                        {
    733                             rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, DBGFR3AddrFromFlat(pVM, &Addr, Mte2.BaseDllName.Buffer),
     733                            rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, DBGFR3AddrFromFlat(pUVM, &Addr, Mte2.BaseDllName.Buffer),
    734734                                               u.wsz, Mte2.BaseDllName.Length);
    735735                            u.wsz[Mte2.BaseDllName.Length / 2] = '\0';
     
    741741                            {
    742742                                NTMTE32 Mte3;
    743                                 rc = DBGFR3MemRead(pVM, 0 /*idCpu*/, DBGFR3AddrFromFlat(pVM, &Addr, Mte2.InLoadOrderLinks.Blink),
     743                                rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, DBGFR3AddrFromFlat(pUVM, &Addr, Mte2.InLoadOrderLinks.Blink),
    744744                                                   &Mte3, RT_SIZEOFMEMB(NTMTE32, InLoadOrderLinks));
    745745                                if (   RT_SUCCESS(rc)
     
    761761                        DBGFR3AddrAdd(&HitAddr, 4);
    762762                        if (HitAddr.FlatPtr <= UINT32_C(0xfffff000))
    763                             rc = DBGFR3MemScan(pVM, 0 /*idCpu*/, &HitAddr, UINT32_MAX - HitAddr.FlatPtr,
     763                            rc = DBGFR3MemScan(pUVM, 0 /*idCpu*/, &HitAddr, UINT32_MAX - HitAddr.FlatPtr,
    764764                                               4 /*align*/, &Mte.DllBase, 3 * sizeof(uint32_t), &HitAddr);
    765765                        else
     
    777777 * @copydoc DBGFOSREG::pfnDestruct
    778778 */
    779 static DECLCALLBACK(void)  dbgDiggerWinNtDestruct(PVM pVM, void *pvData)
     779static DECLCALLBACK(void)  dbgDiggerWinNtDestruct(PUVM pUVM, void *pvData)
    780780{
    781781
     
    786786 * @copydoc DBGFOSREG::pfnConstruct
    787787 */
    788 static DECLCALLBACK(int)  dbgDiggerWinNtConstruct(PVM pVM, void *pvData)
     788static DECLCALLBACK(int)  dbgDiggerWinNtConstruct(PUVM pUVM, void *pvData)
    789789{
    790790    PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData;
  • trunk/src/VBox/Debugger/VBoxDbgBase.cpp

    r44393 r44399  
    9898    if (    pUVM
    9999        &&  VMR3GetStateU(pUVM) < VMSTATE_DESTROYING)
    100         return DBGCCreate(VMR3GetVM(pUVM), pBack, fFlags);
     100        return DBGCCreate(pUVM, pBack, fFlags);
    101101    return VERR_INVALID_HANDLE;
    102102}
  • trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp

    r42165 r44399  
    2323
    2424#include <VBox/vmm/dbgf.h>
    25 VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr)
    26 {
    27     return NULL;
    28 }
    29 
    30 VMMR3DECL(int) DBGFR3AddrFromSelOff(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off)
     25VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PUVM pUVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr)
     26{
     27    return NULL;
     28}
     29
     30VMMR3DECL(int) DBGFR3AddrFromSelOff(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off)
    3131{
    3232    /* bad:bad -> provke error during parsing. */
     
    4242}
    4343
    44 VMMR3DECL(int)  DBGFR3AddrToPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys)
    45 {
    46     return VERR_INTERNAL_ERROR;
    47 }
    48 
    49 VMMR3DECL(int)  DBGFR3AddrToHostPhys(PVMCPU pVCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
    50 {
    51     return VERR_INTERNAL_ERROR;
    52 }
    53 
    54 VMMR3DECL(int)  DBGFR3AddrToVolatileR3Ptr(PVMCPU pVCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
    55 {
    56     return VERR_INTERNAL_ERROR;
    57 }
    58 
    59 VMMR3DECL(int) DBGFR3Attach(PVM pVM)
    60 {
    61     return VERR_INTERNAL_ERROR;
    62 }
    63 
    64 VMMR3DECL(int) DBGFR3BpClear(PVM pVM, RTUINT iBp)
    65 {
    66     return VERR_INTERNAL_ERROR;
    67 }
    68 VMMR3DECL(int) DBGFR3BpDisable(PVM pVM, RTUINT iBp)
    69 {
    70     return VERR_INTERNAL_ERROR;
    71 }
    72 VMMR3DECL(int) DBGFR3BpEnable(PVM pVM, RTUINT iBp)
    73 {
    74     return VERR_INTERNAL_ERROR;
    75 }
    76 VMMR3DECL(int) DBGFR3BpEnum(PVM pVM, PFNDBGFBPENUM pfnCallback, void *pvUser)
    77 {
    78     return VERR_INTERNAL_ERROR;
    79 }
    80 VMMR3DECL(int) DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
    81 {
    82     return VERR_INTERNAL_ERROR;
    83 }
    84 VMMR3DECL(int) DBGFR3BpSetReg(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable,
     44VMMR3DECL(int)  DBGFR3AddrToPhys(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys)
     45{
     46    return VERR_INTERNAL_ERROR;
     47}
     48
     49VMMR3DECL(int) DBGFR3Attach(PUVM pUVM)
     50{
     51    return VERR_INTERNAL_ERROR;
     52}
     53
     54VMMR3DECL(int) DBGFR3BpClear(PUVM pUVM, RTUINT iBp)
     55{
     56    return VERR_INTERNAL_ERROR;
     57}
     58VMMR3DECL(int) DBGFR3BpDisable(PUVM pUVM, RTUINT iBp)
     59{
     60    return VERR_INTERNAL_ERROR;
     61}
     62VMMR3DECL(int) DBGFR3BpEnable(PUVM pUVM, RTUINT iBp)
     63{
     64    return VERR_INTERNAL_ERROR;
     65}
     66VMMR3DECL(int) DBGFR3BpEnum(PUVM pUVM, PFNDBGFBPENUM pfnCallback, void *pvUser)
     67{
     68    return VERR_INTERNAL_ERROR;
     69}
     70VMMR3DECL(int) DBGFR3BpSet(PUVM pUVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
     71{
     72    return VERR_INTERNAL_ERROR;
     73}
     74VMMR3DECL(int) DBGFR3BpSetReg(PUVM pUVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable,
    8575                              uint8_t fType, uint8_t cb, PRTUINT piBp)
    8676{
    8777    return VERR_INTERNAL_ERROR;
    8878}
    89 VMMR3DECL(int) DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
    90 {
    91     return VERR_INTERNAL_ERROR;
    92 }
    93 VMMR3DECL(bool) DBGFR3CanWait(PVM pVM)
     79VMMR3DECL(int) DBGFR3BpSetREM(PUVM pUVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
     80{
     81    return VERR_INTERNAL_ERROR;
     82}
     83VMMR3DECL(bool) DBGFR3CanWait(PUVM pUVM)
    9484{
    9585    return true;
    9686}
    97 VMMR3DECL(int) DBGFR3Detach(PVM pVM)
    98 {
    99     return VERR_INTERNAL_ERROR;
    100 }
    101 VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
     87VMMR3DECL(int) DBGFR3Detach(PUVM pUVM)
     88{
     89    return VERR_INTERNAL_ERROR;
     90}
     91VMMR3DECL(int) DBGFR3DisasInstrEx(PUVM pUVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
    10292                                  char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
    10393{
    10494    return VERR_INTERNAL_ERROR;
    10595}
    106 VMMR3DECL(int) DBGFR3EventWait(PVM pVM, RTMSINTERVAL cMillies, PCDBGFEVENT *ppEvent)
    107 {
    108     return VERR_INTERNAL_ERROR;
    109 }
    110 VMMR3DECL(int) DBGFR3Halt(PVM pVM)
    111 {
    112     return VERR_INTERNAL_ERROR;
    113 }
    114 VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
    115 {
    116     return VERR_INTERNAL_ERROR;
    117 }
    118 VMMR3DECL(int) DBGFR3InfoEx(PVM pVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
    119 {
    120     return VERR_INTERNAL_ERROR;
    121 }
    122 VMMR3DECL(bool) DBGFR3IsHalted(PVM pVM)
     96VMMR3DECL(int) DBGFR3EventWait(PUVM pUVM, RTMSINTERVAL cMillies, PCDBGFEVENT *ppEvent)
     97{
     98    return VERR_INTERNAL_ERROR;
     99}
     100VMMR3DECL(int) DBGFR3Halt(PUVM pUVM)
     101{
     102    return VERR_INTERNAL_ERROR;
     103}
     104VMMR3DECL(int) DBGFR3Info(PUVM pUVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
     105{
     106    return VERR_INTERNAL_ERROR;
     107}
     108VMMR3DECL(int) DBGFR3InfoEx(PUVM pUVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
     109{
     110    return VERR_INTERNAL_ERROR;
     111}
     112VMMR3DECL(bool) DBGFR3IsHalted(PUVM pUVM)
    123113{
    124114    return true;
    125115}
    126 VMMR3DECL(int) DBGFR3LineByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine)
    127 {
    128     return VERR_INTERNAL_ERROR;
    129 }
    130 VMMR3DECL(int) DBGFR3LogModifyDestinations(PVM pVM, const char *pszDestSettings)
    131 {
    132     return VERR_INTERNAL_ERROR;
    133 }
    134 VMMR3DECL(int) DBGFR3LogModifyFlags(PVM pVM, const char *pszFlagSettings)
    135 {
    136     return VERR_INTERNAL_ERROR;
    137 }
    138 VMMR3DECL(int) DBGFR3LogModifyGroups(PVM pVM, const char *pszGroupSettings)
    139 {
    140     return VERR_INTERNAL_ERROR;
    141 }
    142 VMMR3DECL(int) DBGFR3ModuleLoad(PVM pVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage)
    143 {
    144     return VERR_INTERNAL_ERROR;
    145 }
    146 VMMR3DECL(int) DBGFR3AsLoadImage(PVM pVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags)
    147 {
    148     return VERR_INTERNAL_ERROR;
    149 }
    150 VMMR3DECL(int) DBGFR3AsLoadMap(PVM pVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, RTGCUINTPTR uSubtrahend, uint32_t fFlags)
    151 {
    152     return VERR_INTERNAL_ERROR;
    153 }
    154 VMMR3DECL(RTDBGAS) DBGFR3AsResolveAndRetain(PVM pVM, RTDBGAS hAlias)
     116VMMR3DECL(int) DBGFR3LineByAddr(PUVM pUVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine)
     117{
     118    return VERR_INTERNAL_ERROR;
     119}
     120VMMR3DECL(int) DBGFR3LogModifyDestinations(PUVM pUVM, const char *pszDestSettings)
     121{
     122    return VERR_INTERNAL_ERROR;
     123}
     124VMMR3DECL(int) DBGFR3LogModifyFlags(PUVM pUVM, const char *pszFlagSettings)
     125{
     126    return VERR_INTERNAL_ERROR;
     127}
     128VMMR3DECL(int) DBGFR3LogModifyGroups(PUVM pUVM, const char *pszGroupSettings)
     129{
     130    return VERR_INTERNAL_ERROR;
     131}
     132VMMR3DECL(int) DBGFR3ModuleLoad(PUVM pUVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage)
     133{
     134    return VERR_INTERNAL_ERROR;
     135}
     136VMMR3DECL(int) DBGFR3AsLoadImage(PUVM pUVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags)
     137{
     138    return VERR_INTERNAL_ERROR;
     139}
     140VMMR3DECL(int) DBGFR3AsLoadMap(PUVM pUVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, RTGCUINTPTR uSubtrahend, uint32_t fFlags)
     141{
     142    return VERR_INTERNAL_ERROR;
     143}
     144VMMR3DECL(RTDBGAS) DBGFR3AsResolveAndRetain(PUVM pUVM, RTDBGAS hAlias)
    155145{
    156146    return NIL_RTDBGAS;
    157147}
    158 VMMR3DECL(int) DBGFR3Resume(PVM pVM)
    159 {
    160     return VERR_INTERNAL_ERROR;
    161 }
    162 VMMR3DECL(int) DBGFR3StackWalkBegin(PVM pVM, VMCPUID idCpu, DBGFCODETYPE enmCodeType, PCDBGFSTACKFRAME *ppFirstFrame)
     148VMMR3DECL(int) DBGFR3Resume(PUVM pUVM)
     149{
     150    return VERR_INTERNAL_ERROR;
     151}
     152VMMR3DECL(int) DBGFR3StackWalkBegin(PUVM pUVM, VMCPUID idCpu, DBGFCODETYPE enmCodeType, PCDBGFSTACKFRAME *ppFirstFrame)
    163153{
    164154    return VERR_INTERNAL_ERROR;
     
    171161{
    172162}
    173 VMMR3DECL(int) DBGFR3Step(PVM pVM, VMCPUID idCpu)
    174 {
    175     return VERR_INTERNAL_ERROR;
    176 }
    177 VMMR3DECL(int) DBGFR3AsSymbolByAddr(PVM pVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, PRTGCINTPTR poffDisplacement, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
    178 {
    179     return VERR_INTERNAL_ERROR;
    180 }
    181 VMMR3DECL(int) DBGFR3AsSymbolByName(PVM pVM, RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
    182 {
    183     return VERR_INTERNAL_ERROR;
    184 }
    185 VMMR3DECL(int) DBGFR3MemScan(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, RTGCUINTPTR uAlign, const void *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress)
    186 {
    187     return VERR_INTERNAL_ERROR;
    188 }
    189 VMMR3DECL(int) DBGFR3MemRead(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead)
    190 {
    191     return VERR_INTERNAL_ERROR;
    192 }
    193 VMMR3DECL(int) DBGFR3MemReadString(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cchBuf)
    194 {
    195     return VERR_INTERNAL_ERROR;
    196 }
    197 VMMR3DECL(int) DBGFR3MemWrite(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, const void *pvBuf, size_t cbRead)
    198 {
    199     return VERR_INTERNAL_ERROR;
    200 }
    201 VMMDECL(int) DBGFR3PagingDumpEx(PVM pVM, VMCPUID idCpu, uint32_t fFlags, uint64_t cr3, uint64_t u64FirstAddr,
     163VMMR3DECL(int) DBGFR3Step(PUVM pUVM, VMCPUID idCpu)
     164{
     165    return VERR_INTERNAL_ERROR;
     166}
     167VMMR3DECL(int) DBGFR3AsSymbolByAddr(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, PRTGCINTPTR poffDisplacement, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
     168{
     169    return VERR_INTERNAL_ERROR;
     170}
     171VMMR3DECL(int) DBGFR3AsSymbolByName(PUVM pUVM, RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
     172{
     173    return VERR_INTERNAL_ERROR;
     174}
     175VMMR3DECL(int) DBGFR3MemScan(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, RTGCUINTPTR uAlign, const void *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress)
     176{
     177    return VERR_INTERNAL_ERROR;
     178}
     179VMMR3DECL(int) DBGFR3MemRead(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead)
     180{
     181    return VERR_INTERNAL_ERROR;
     182}
     183VMMR3DECL(int) DBGFR3MemReadString(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cchBuf)
     184{
     185    return VERR_INTERNAL_ERROR;
     186}
     187VMMR3DECL(int) DBGFR3MemWrite(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, const void *pvBuf, size_t cbRead)
     188{
     189    return VERR_INTERNAL_ERROR;
     190}
     191VMMDECL(int) DBGFR3PagingDumpEx(PUVM pUVM, VMCPUID idCpu, uint32_t fFlags, uint64_t cr3, uint64_t u64FirstAddr,
    202192                                uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp)
    203193{
    204194    return VERR_INTERNAL_ERROR;
    205195}
    206 VMMR3DECL(int) DBGFR3RegNmValidate(PVM pVM, VMCPUID idDefCpu, const char *pszReg)
     196VMMR3DECL(int) DBGFR3RegNmValidate(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg)
    207197{
    208198    if (   !strcmp(pszReg, "ah")
     
    213203    return VERR_DBGF_REGISTER_NOT_FOUND;
    214204}
    215 VMMR3DECL(int) DBGFR3RegCpuQueryU8(  PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t     *pu8)
    216 {
    217     return VERR_INTERNAL_ERROR;
    218 }
    219 VMMR3DECL(int) DBGFR3RegCpuQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t    *pu16)
    220 {
    221     return VERR_INTERNAL_ERROR;
    222 }
    223 VMMR3DECL(int) DBGFR3RegCpuQueryU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t    *pu32)
    224 {
    225     return VERR_INTERNAL_ERROR;
    226 }
    227 VMMR3DECL(int) DBGFR3RegCpuQueryU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t    *pu64)
    228 {
    229     return VERR_INTERNAL_ERROR;
    230 }
    231 VMMR3DECL(int) DBGFR3RegNmQuery(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PDBGFREGVAL pValue, PDBGFREGVALTYPE penmType)
     205VMMR3DECL(int) DBGFR3RegCpuQueryU8(  PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t     *pu8)
     206{
     207    return VERR_INTERNAL_ERROR;
     208}
     209VMMR3DECL(int) DBGFR3RegCpuQueryU16( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t    *pu16)
     210{
     211    return VERR_INTERNAL_ERROR;
     212}
     213VMMR3DECL(int) DBGFR3RegCpuQueryU32( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t    *pu32)
     214{
     215    return VERR_INTERNAL_ERROR;
     216}
     217VMMR3DECL(int) DBGFR3RegCpuQueryU64( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t    *pu64)
     218{
     219    return VERR_INTERNAL_ERROR;
     220}
     221VMMR3DECL(int) DBGFR3RegNmQuery(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, PDBGFREGVAL pValue, PDBGFREGVALTYPE penmType)
    232222{
    233223    if (idDefCpu == 0 || idDefCpu == DBGFREG_HYPER_VMCPUID)
     
    260250    return VERR_DBGF_REGISTER_NOT_FOUND;
    261251}
    262 VMMR3DECL(int) DBGFR3RegPrintf(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...)
     252VMMR3DECL(int) DBGFR3RegPrintf(PUVM pUVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...)
    263253{
    264254    return VERR_INTERNAL_ERROR;
     
    268258    return VERR_INTERNAL_ERROR;
    269259}
    270 VMMR3DECL(int) DBGFR3RegNmSet(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType)
    271 {
    272     return VERR_INTERNAL_ERROR;
    273 }
    274 
    275 VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr)
    276 {
    277     return NULL;
    278 }
    279 VMMR3DECL(int)  DBGFR3AddrToHostPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
    280 {
    281     return VERR_INTERNAL_ERROR;
    282 }
    283 VMMR3DECL(int)  DBGFR3AddrToVolatileR3Ptr(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
    284 {
    285     return VERR_INTERNAL_ERROR;
    286 }
    287 
    288 VMMR3DECL(int) DBGFR3OSRegister(PVM pVM, PCDBGFOSREG pReg)
    289 {
    290     return VERR_INTERNAL_ERROR;
    291 }
    292 VMMR3DECL(int) DBGFR3OSDetect(PVM pVM, char *pszName, size_t cchName)
    293 {
    294     return VERR_INTERNAL_ERROR;
    295 }
    296 VMMR3DECL(int) DBGFR3OSQueryNameAndVersion(PVM pVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion)
    297 {
    298     return VERR_INTERNAL_ERROR;
    299 }
    300 
    301 VMMR3DECL(int) DBGFR3SelQueryInfo(PVM pVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo)
    302 {
    303     return VERR_INTERNAL_ERROR;
    304 }
    305 
    306 VMMR3DECL(CPUMMODE) DBGFR3CpuGetMode(PVM pVM, VMCPUID idCpu)
     260VMMR3DECL(int) DBGFR3RegNmSet(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType)
     261{
     262    return VERR_INTERNAL_ERROR;
     263}
     264
     265VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PUVM pUVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr)
     266{
     267    return NULL;
     268}
     269VMMR3DECL(int)  DBGFR3AddrToHostPhys(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
     270{
     271    return VERR_INTERNAL_ERROR;
     272}
     273VMMR3DECL(int)  DBGFR3AddrToVolatileR3Ptr(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
     274{
     275    return VERR_INTERNAL_ERROR;
     276}
     277
     278VMMR3DECL(int) DBGFR3OSRegister(PUVM pUVM, PCDBGFOSREG pReg)
     279{
     280    return VERR_INTERNAL_ERROR;
     281}
     282VMMR3DECL(int) DBGFR3OSDetect(PUVM pUVM, char *pszName, size_t cchName)
     283{
     284    return VERR_INTERNAL_ERROR;
     285}
     286VMMR3DECL(int) DBGFR3OSQueryNameAndVersion(PUVM pUVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion)
     287{
     288    return VERR_INTERNAL_ERROR;
     289}
     290
     291VMMR3DECL(int) DBGFR3SelQueryInfo(PUVM pUVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo)
     292{
     293    return VERR_INTERNAL_ERROR;
     294}
     295
     296VMMR3DECL(CPUMMODE) DBGFR3CpuGetMode(PUVM pUVM, VMCPUID idCpu)
    307297{
    308298    return CPUMMODE_INVALID;
    309299}
    310 
    311 VMMR3DECL(int) DBGFR3CoreWrite(PVM pVM, const char *pszFilename, bool fReplaceFile)
     300VMMR3DECL(VMCPUID) DBGFR3CpuGetCount(PUVM pUVM)
     301{
     302    return 1;
     303}
     304
     305VMMR3DECL(int) DBGFR3CoreWrite(PUVM pUVM, const char *pszFilename, bool fReplaceFile)
    312306{
    313307    return VERR_INTERNAL_ERROR;
     
    382376
    383377
    384 #include <VBox/vmm/mm.h>
    385 
    386 VMMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv)
    387 {
    388     return VERR_INTERNAL_ERROR;
    389 }
    390 
    391 
    392 
    393378
    394379#include <VBox/vmm/pgm.h>
     
    404389}
    405390
    406 VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PVM pVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
    407 {
    408     return VERR_INTERNAL_ERROR;
    409 }
    410 
    411 VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PVM pVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
    412 {
    413     return VERR_INTERNAL_ERROR;
    414 }
    415 VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PVM pVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
     391VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
     392{
     393    return VERR_INTERNAL_ERROR;
     394}
     395
     396VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
     397{
     398    return VERR_INTERNAL_ERROR;
     399}
     400VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PUVM pUVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
    416401{
    417402    return VERR_INTERNAL_ERROR;
     
    421406#include <VBox/vmm/vmm.h>
    422407
    423 VMMDECL(PVMCPU) VMMGetCpuById(PVM pVM, RTCPUID idCpu)
    424 {
    425     return NULL;
    426 }
    427 
     408VMMR3DECL(PVMCPU) VMMR3GetCpuByIdU(PUVM pUVM, RTCPUID idCpu)
     409{
     410    return NULL;
     411}
     412
     413
     414VMMR3DECL(PVM) VMR3GetVM(PUVM pUVM)
     415{
     416    return NULL;
     417}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette