VirtualBox

Changeset 30453 in vbox for trunk


Ignore:
Timestamp:
Jun 27, 2010 7:43:20 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63124
Message:

DBGFR3DisasInstrEx: Flags for overriding the instruction set, adding u64, u32, u16 and uv86 to the debugger.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbgf.h

    r30060 r30453  
    857857/** No address in the output. */
    858858#define DBGF_DISAS_FLAGS_NO_ADDRESS         RT_BIT(5)
     859/** Disassemble in the default mode of the specific context. */
     860#define DBGF_DISAS_FLAGS_DEFAULT_MODE       UINT32_C(0x00000000)
     861/** Disassemble in 16-bit mode. */
     862#define DBGF_DISAS_FLAGS_16BIT_MODE         UINT32_C(0x10000000)
     863/** Disassemble in 16-bit mode with real mode address translation. */
     864#define DBGF_DISAS_FLAGS_16BIT_REAL_MODE    UINT32_C(0x20000000)
     865/** Disassemble in 32-bit mode. */
     866#define DBGF_DISAS_FLAGS_32BIT_MODE         UINT32_C(0x30000000)
     867/** Disassemble in 64-bit mode. */
     868#define DBGF_DISAS_FLAGS_64BIT_MODE         UINT32_C(0x40000000)
     869/** The dissassembly mode mask. */
     870#define DBGF_DISAS_FLAGS_MODE_MASK          UINT32_C(0x70000000)
     871/** Mask containing the valid flags. */
     872#define DBGF_DISAS_FLAGS_VALID_MASK         UINT32_C(0x7000003f)
    859873/** @} */
    860874
     
    862876#define DBGF_SEL_FLAT                       1
    863877
    864 VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, unsigned fFlags, char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr);
     878VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
     879                                  char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr);
    865880VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput);
    866881VMMR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVMCPU pVCpu, const char *pszPrefix);
  • trunk/src/VBox/VMM/DBGFDisas.cpp

    r30263 r30453  
    9393 * @param   pSelInfo    The selector info.
    9494 * @param   enmMode     The guest paging mode.
     95 * @param   fFlags      DBGF_DISAS_FLAGS_XXX.
    9596 * @param   GCPtr       The GC pointer (selector offset).
    9697 * @param   pState      The disas CPU state.
    9798 */
    98 static int dbgfR3DisasInstrFirst(PVM pVM, PVMCPU pVCpu, PDBGFSELINFO pSelInfo, PGMMODE enmMode, RTGCPTR GCPtr, PDBGFDISASSTATE pState)
     99static int dbgfR3DisasInstrFirst(PVM pVM, PVMCPU pVCpu, PDBGFSELINFO pSelInfo, PGMMODE enmMode,
     100                                 RTGCPTR GCPtr, uint32_t fFlags, PDBGFDISASSTATE pState)
    99101{
    100102    pState->GCPtrSegBase    = pSelInfo->GCPtrBase;
     
    111113    pState->fLocked         = false;
    112114    pState->f64Bits         = enmMode >= PGMMODE_AMD64 && pSelInfo->u.Raw.Gen.u1Long;
     115
     116    DISCPUMODE enmCpuMode;
     117    switch (fFlags & DBGF_DISAS_FLAGS_MODE_MASK)
     118    {
     119        case DBGF_DISAS_FLAGS_DEFAULT_MODE:
     120            enmCpuMode   = pState->f64Bits
     121                         ? CPUMODE_64BIT
     122                         : pSelInfo->u.Raw.Gen.u1DefBig
     123                         ? CPUMODE_32BIT
     124                         : CPUMODE_16BIT;
     125            break;
     126        case DBGF_DISAS_FLAGS_16BIT_MODE:
     127        case DBGF_DISAS_FLAGS_16BIT_REAL_MODE:
     128            enmCpuMode = CPUMODE_16BIT;
     129            break;
     130        case DBGF_DISAS_FLAGS_32BIT_MODE:
     131            enmCpuMode = CPUMODE_32BIT;
     132            break;
     133        case DBGF_DISAS_FLAGS_64BIT_MODE:
     134            enmCpuMode = CPUMODE_64BIT;
     135            break;
     136    }
     137
    113138    uint32_t cbInstr;
    114139    int rc = DISCoreOneEx(GCPtr,
    115                           pState->f64Bits
    116                           ? CPUMODE_64BIT
    117                           : pSelInfo->u.Raw.Gen.u1DefBig
    118                           ? CPUMODE_32BIT
    119                           : CPUMODE_16BIT,
     140                          enmCpuMode,
    120141                          dbgfR3DisasInstrRead,
    121142                          &pState->Cpu,
     
    302323 *                              A combination of the DBGF_DISAS_FLAGS_* \#defines.
    303324 * @param       pszOutput       Output buffer.
    304  * @param       cchOutput       Size of the output buffer.
     325 * @param       cbOutput        Size of the output buffer.
    305326 * @param       pcbInstr        Where to return the size of the instruction.
    306327 */
    307328static DECLCALLBACK(int)
    308 dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, unsigned fFlags,
    309                          char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
     329dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, uint32_t fFlags,
     330                         char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr)
    310331{
    311332    VMCPU_ASSERT_EMT(pVCpu);
     
    315336     * Get the Sel and GCPtr if fFlags requests that.
    316337     */
    317     PCCPUMCTXCORE pCtxCore = NULL;
    318     CPUMSELREGHID *pHiddenSel = NULL;
     338    PCCPUMCTXCORE  pCtxCore  = NULL;
     339    PCPUMSELREGHID pHiddenSel = NULL;
    319340    int rc;
    320341    if (fFlags & (DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_CURRENT_HYPER))
     
    334355     * we recently visited REM, we'll not search for the selector there.
    335356     */
    336     DBGFSELINFO SelInfo;
    337     const PGMMODE enmMode = PGMGetGuestMode(pVCpu);
    338     bool fRealModeAddress = false;
     357    DBGFSELINFO     SelInfo;
     358    const PGMMODE   enmMode          = PGMGetGuestMode(pVCpu);
     359    bool            fRealModeAddress = false;
    339360
    340361    if (    pHiddenSel
     
    352373
    353374        SelInfo.u.Raw.au32[0]           = 0;
    354         SelInfo.u.Raw.au32[1]           =  0;
     375        SelInfo.u.Raw.au32[1]           = 0;
    355376        SelInfo.u.Raw.Gen.u16LimitLow   = 0xffff;
    356377        SelInfo.u.Raw.Gen.u4LimitHigh   = 0xf;
     
    402423    else if (   !(fFlags & DBGF_DISAS_FLAGS_CURRENT_HYPER)
    403424             && (   (pCtxCore && pCtxCore->eflags.Bits.u1VM)
    404                  || enmMode == PGMMODE_REAL) )
     425                 || enmMode == PGMMODE_REAL
     426                 || (fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_16BIT_REAL_MODE
     427                )
     428            )
    405429    {   /* V86 mode or real mode - real mode addressing */
    406430        SelInfo.Sel                     = Sel;
     
    425449        if (RT_FAILURE(rc))
    426450        {
    427             RTStrPrintf(pszOutput, cchOutput, "Sel=%04x -> %Rrc\n", Sel, rc);
     451            RTStrPrintf(pszOutput, cbOutput, "Sel=%04x -> %Rrc\n", Sel, rc);
    428452            return rc;
    429453        }
     
    434458     */
    435459    DBGFDISASSTATE State;
    436     rc = dbgfR3DisasInstrFirst(pVM, pVCpu, &SelInfo, enmMode, GCPtr, &State);
     460    rc = dbgfR3DisasInstrFirst(pVM, pVCpu, &SelInfo, enmMode, GCPtr, fFlags, &State);
    437461    if (RT_FAILURE(rc))
    438462    {
    439         RTStrPrintf(pszOutput, cchOutput, "Disas -> %Rrc\n", rc);
     463        RTStrPrintf(pszOutput, cbOutput, "Disas -> %Rrc\n", rc);
    440464        return rc;
    441465    }
     
    456480    {
    457481        if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
    458             RTStrPrintf(pszOutput, cchOutput, "%s", szBuf);
     482            RTStrPrintf(pszOutput, cbOutput, "%s", szBuf);
    459483        else if (fRealModeAddress)
    460             RTStrPrintf(pszOutput, cchOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
     484            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
    461485        else if (Sel == DBGF_SEL_FLAT)
    462486        {
    463487            if (enmMode >= PGMMODE_AMD64)
    464                 RTStrPrintf(pszOutput, cchOutput, "%RGv  %s", GCPtr, szBuf);
     488                RTStrPrintf(pszOutput, cbOutput, "%RGv  %s", GCPtr, szBuf);
    465489            else
    466                 RTStrPrintf(pszOutput, cchOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
     490                RTStrPrintf(pszOutput, cbOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
    467491        }
    468492        else
    469493        {
    470494            if (enmMode >= PGMMODE_AMD64)
    471                 RTStrPrintf(pszOutput, cchOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
     495                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
    472496            else
    473                 RTStrPrintf(pszOutput, cchOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
     497                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
    474498        }
    475499    }
     
    481505        AssertRC(rc);
    482506        if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
    483             RTStrPrintf(pszOutput, cchOutput, "%.*Rhxs%*s %s",
     507            RTStrPrintf(pszOutput, cbOutput, "%.*Rhxs%*s %s",
    484508                        cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
    485509                        szBuf);
    486510        else if (fRealModeAddress)
    487             RTStrPrintf(pszOutput, cchOutput, "%04x:%04x %.*Rhxs%*s %s",
     511            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x %.*Rhxs%*s %s",
    488512                        Sel, (unsigned)GCPtr,
    489513                        cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
     
    492516        {
    493517            if (enmMode >= PGMMODE_AMD64)
    494                 RTStrPrintf(pszOutput, cchOutput, "%RGv %.*Rhxs%*s %s",
     518                RTStrPrintf(pszOutput, cbOutput, "%RGv %.*Rhxs%*s %s",
    495519                            GCPtr,
    496520                            cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
    497521                            szBuf);
    498522            else
    499                 RTStrPrintf(pszOutput, cchOutput, "%08RX32 %.*Rhxs%*s %s",
     523                RTStrPrintf(pszOutput, cbOutput, "%08RX32 %.*Rhxs%*s %s",
    500524                            (uint32_t)GCPtr,
    501525                            cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
     
    505529        {
    506530            if (enmMode >= PGMMODE_AMD64)
    507                 RTStrPrintf(pszOutput, cchOutput, "%04x:%RGv %.*Rhxs%*s %s",
     531                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv %.*Rhxs%*s %s",
    508532                            Sel, GCPtr,
    509533                            cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
    510534                            szBuf);
    511535            else
    512                 RTStrPrintf(pszOutput, cchOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
     536                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
    513537                            Sel, (uint32_t)GCPtr,
    514538                            cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
     
    536560 * @param   fFlags          Flags controlling where to start and how to format.
    537561 *                          A combination of the DBGF_DISAS_FLAGS_* \#defines.
    538  * @param   pszOutput       Output buffer.
    539  * @param   cchOutput       Size of the output buffer.
     562 * @param   pszOutput       Output buffer.  This will always be properly
     563 *                          terminated if @a cbOutput is greater than zero.
     564 * @param   cbOutput        Size of the output buffer.
    540565 * @param   pcbInstr        Where to return the size of the instruction.
    541566 *
     
    543568 *          address conversion.
    544569 */
    545 VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, unsigned fFlags,
    546                                   char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
    547 {
     570VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
     571                                  char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr)
     572{
     573    AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER);
     574    *pszOutput = '\0';
    548575    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
    549576    AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
     577    AssertReturn(!(fFlags & ~DBGF_DISAS_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER);
     578    AssertReturn((fFlags & DBGF_DISAS_FLAGS_MODE_MASK) <= DBGF_DISAS_FLAGS_64BIT_MODE, VERR_INVALID_PARAMETER);
    550579
    551580    /*
     
    557586    if (    pVCpu
    558587        &&  pVCpu->idCpu == idCpu)
    559         rc = dbgfR3DisasInstrExOnVCpu(pVM, pVCpu, Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr);
     588        rc = dbgfR3DisasInstrExOnVCpu(pVM, pVCpu, Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
    560589    else
    561590        rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3DisasInstrExOnVCpu, 8,
    562                              pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr);
     591                             pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
    563592    return rc;
    564593}
     
    571600 * @returns VBox status code.
    572601 * @param   pVCpu           VMCPU handle.
    573  * @param   pszOutput       Output buffer.
    574  * @param   cchOutput       Size of the output buffer.
    575  */
    576 VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cchOutput)
    577 {
     602 * @param   pszOutput       Output buffer.  This will always be properly
     603 *                          terminated if @a cbOutput is greater than zero.
     604 * @param   cbOutput        Size of the output buffer.
     605 */
     606VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput)
     607{
     608    AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER);
    578609    *pszOutput = '\0';
    579610    AssertReturn(pVCpu, VERR_INVALID_CONTEXT);
    580     return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_GUEST,
    581                               pszOutput, cchOutput, NULL);
     611    return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0,
     612                              DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE,
     613                              pszOutput, cbOutput, NULL);
    582614}
    583615
     
    621653{
    622654    char szBuf[256];
    623     szBuf[0] = '\0';
    624     int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, 0, &szBuf[0], sizeof(szBuf), NULL);
     655    int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     656                                &szBuf[0], sizeof(szBuf), NULL);
    625657    if (RT_FAILURE(rc))
    626658        RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrLog(, %RTsel, %RGv) failed with rc=%Rrc\n", Sel, GCPtr, rc);
  • trunk/src/VBox/VMM/HWACCM.cpp

    r30105 r30453  
    16251625        char            szOutput[256];
    16261626
    1627         rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, 0, szOutput, sizeof(szOutput), 0);
     1627        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     1628                                szOutput, sizeof(szOutput), NULL);
    16281629        if (RT_SUCCESS(rc))
    16291630            Log(("Patched instr: %s\n", szOutput));
     
    16481649
    16491650#ifdef LOG_ENABLED
    1650         rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, 0, szOutput, sizeof(szOutput), 0);
     1651        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     1652                                szOutput, sizeof(szOutput), NULL);
    16511653        if (RT_SUCCESS(rc))
    16521654            Log(("Original instr: %s\n", szOutput));
     
    18711873#ifdef LOG_ENABLED
    18721874    char      szOutput[256];
    1873     rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
     1875    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     1876                            szOutput, sizeof(szOutput), NULL);
    18741877    if (RT_SUCCESS(rc))
    18751878        Log(("Failed to patch instr: %s\n", szOutput));
     
    19361939
    19371940#ifdef LOG_ENABLED
    1938         rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
     1941        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     1942                                szOutput, sizeof(szOutput), NULL);
    19391943        if (RT_SUCCESS(rc))
    19401944            Log(("Original instr: %s\n", szOutput));
     
    20662070                uint32_t cb;
    20672071
    2068                 rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pInstr, 0, szOutput, sizeof(szOutput), &cb);
     2072                rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pInstr, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     2073                                        szOutput, sizeof(szOutput), &cb);
    20692074                if (RT_SUCCESS(rc))
    20702075                    Log(("Patch instr %s\n", szOutput));
     
    20852090
    20862091#ifdef LOG_ENABLED
    2087             rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
     2092            rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     2093                                    szOutput, sizeof(szOutput), NULL);
    20882094            if (RT_SUCCESS(rc))
    20892095                Log(("Jump: %s\n", szOutput));
     
    21092115
    21102116#ifdef LOG_ENABLED
    2111     rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
     2117    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     2118                            szOutput, sizeof(szOutput), NULL);
    21122119    if (RT_SUCCESS(rc))
    21132120        Log(("Failed to patch instr: %s\n", szOutput));
  • trunk/src/VBox/VMM/PATM/PATM.cpp

    r30326 r30453  
    58515851#ifdef DEBUG
    58525852        char szBuf[256];
    5853         szBuf[0] = '\0';
    5854         DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, 0, szBuf, sizeof(szBuf), NULL);
     5853        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     5854                          szBuf, sizeof(szBuf), NULL);
    58555855        Log(("DIRTY: %s\n", szBuf));
    58565856#endif
     
    59135913#ifdef DEBUG
    59145914                char szBuf[256];
    5915                 szBuf[0] = '\0';
    5916                 DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, 0, szBuf, sizeof(szBuf), NULL);
     5915                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     5916                                  szBuf, sizeof(szBuf), NULL);
    59175917                Log(("NEW:   %s\n", szBuf));
    59185918#endif
     
    59295929#ifdef DEBUG
    59305930                char szBuf[256];
    5931                 szBuf[0] = '\0';
    5932                 DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, 0, szBuf, sizeof(szBuf), NULL);
     5931                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     5932                                  szBuf, sizeof(szBuf), NULL);
    59335933                Log(("NEW:   %s (FAILED)\n", szBuf));
    59345934#endif
     
    59665966#ifdef DEBUG
    59675967                            char szBuf[256];
    5968                             szBuf[0] = '\0';
    5969                             DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, 0, szBuf, sizeof(szBuf), NULL);
     5968                            DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
     5969                                              szBuf, sizeof(szBuf), NULL);
    59705970                            Log(("FILL:  %s\n", szBuf));
    59715971#endif
     
    59785978#ifdef DEBUG
    59795979                                char szBuf[256];
    5980                                 szBuf[0] = '\0';
    5981                                 DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC + i, 0, szBuf, sizeof(szBuf), NULL);
     5980                                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC + i,
     5981                                                   DBGF_DISAS_FLAGS_DEFAULT_MODE, szBuf, sizeof(szBuf), NULL);
    59825982                                Log(("FILL:  %s\n", szBuf));
    59835983#endif
     
    61706170
    61716171        char szBuf[256];
    6172         szBuf[0] = '\0';
    6173         DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pEip, 0, szBuf, sizeof(szBuf), NULL);
     6172        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pEip, DBGF_DISAS_FLAGS_DEFAULT_MODE, szBuf, sizeof(szBuf), NULL);
    61746173
    61756174        /* Very bad. We crashed in emitted code. Probably stack? */
  • trunk/src/VBox/VMM/VMMGuruMeditation.cpp

    r30083 r30453  
    495495                /* Disassemble the instruction. */
    496496                char szInstr[256];
    497                 rc2 = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_HYPER, &szInstr[0], sizeof(szInstr), NULL);
     497                rc2 = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_HYPER | DBGF_DISAS_FLAGS_DEFAULT_MODE,
     498                                         &szInstr[0], sizeof(szInstr), NULL);
    498499                if (RT_SUCCESS(rc2))
    499500                    pHlp->pfnPrintf(pHlp,
  • trunk/src/recompiler/VBoxRecompiler.c

    r30263 r30453  
    38203820                                        cs,
    38213821                                        eip,
    3822                                         0,
     3822                                        DBGF_DISAS_FLAGS_DEFAULT_MODE,
    38233823                                        szBuf, sizeof(szBuf),
    38243824                                        &cbInstr);
Note: See TracChangeset for help on using the changeset viewer.

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