Index: trunk/include/VBox/dbgf.h
===================================================================
--- trunk/include/VBox/dbgf.h	(revision 30452)
+++ trunk/include/VBox/dbgf.h	(revision 30453)
@@ -857,4 +857,18 @@
 /** No address in the output. */
 #define DBGF_DISAS_FLAGS_NO_ADDRESS         RT_BIT(5)
+/** Disassemble in the default mode of the specific context. */
+#define DBGF_DISAS_FLAGS_DEFAULT_MODE       UINT32_C(0x00000000)
+/** Disassemble in 16-bit mode. */
+#define DBGF_DISAS_FLAGS_16BIT_MODE         UINT32_C(0x10000000)
+/** Disassemble in 16-bit mode with real mode address translation. */
+#define DBGF_DISAS_FLAGS_16BIT_REAL_MODE    UINT32_C(0x20000000)
+/** Disassemble in 32-bit mode. */
+#define DBGF_DISAS_FLAGS_32BIT_MODE         UINT32_C(0x30000000)
+/** Disassemble in 64-bit mode. */
+#define DBGF_DISAS_FLAGS_64BIT_MODE         UINT32_C(0x40000000)
+/** The dissassembly mode mask. */
+#define DBGF_DISAS_FLAGS_MODE_MASK          UINT32_C(0x70000000)
+/** Mask containing the valid flags. */
+#define DBGF_DISAS_FLAGS_VALID_MASK         UINT32_C(0x7000003f)
 /** @} */
 
@@ -862,5 +876,6 @@
 #define DBGF_SEL_FLAT                       1
 
-VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, unsigned fFlags, char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr);
+VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
+                                  char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr);
 VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput);
 VMMR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVMCPU pVCpu, const char *pszPrefix);
Index: trunk/src/VBox/VMM/DBGFDisas.cpp
===================================================================
--- trunk/src/VBox/VMM/DBGFDisas.cpp	(revision 30452)
+++ trunk/src/VBox/VMM/DBGFDisas.cpp	(revision 30453)
@@ -93,8 +93,10 @@
  * @param   pSelInfo    The selector info.
  * @param   enmMode     The guest paging mode.
+ * @param   fFlags      DBGF_DISAS_FLAGS_XXX.
  * @param   GCPtr       The GC pointer (selector offset).
  * @param   pState      The disas CPU state.
  */
-static int dbgfR3DisasInstrFirst(PVM pVM, PVMCPU pVCpu, PDBGFSELINFO pSelInfo, PGMMODE enmMode, RTGCPTR GCPtr, PDBGFDISASSTATE pState)
+static int dbgfR3DisasInstrFirst(PVM pVM, PVMCPU pVCpu, PDBGFSELINFO pSelInfo, PGMMODE enmMode,
+                                 RTGCPTR GCPtr, uint32_t fFlags, PDBGFDISASSTATE pState)
 {
     pState->GCPtrSegBase    = pSelInfo->GCPtrBase;
@@ -111,11 +113,30 @@
     pState->fLocked         = false;
     pState->f64Bits         = enmMode >= PGMMODE_AMD64 && pSelInfo->u.Raw.Gen.u1Long;
+
+    DISCPUMODE enmCpuMode;
+    switch (fFlags & DBGF_DISAS_FLAGS_MODE_MASK)
+    {
+        case DBGF_DISAS_FLAGS_DEFAULT_MODE:
+            enmCpuMode   = pState->f64Bits
+                         ? CPUMODE_64BIT
+                         : pSelInfo->u.Raw.Gen.u1DefBig
+                         ? CPUMODE_32BIT
+                         : CPUMODE_16BIT;
+            break;
+        case DBGF_DISAS_FLAGS_16BIT_MODE:
+        case DBGF_DISAS_FLAGS_16BIT_REAL_MODE:
+            enmCpuMode = CPUMODE_16BIT;
+            break;
+        case DBGF_DISAS_FLAGS_32BIT_MODE:
+            enmCpuMode = CPUMODE_32BIT;
+            break;
+        case DBGF_DISAS_FLAGS_64BIT_MODE:
+            enmCpuMode = CPUMODE_64BIT;
+            break;
+    }
+
     uint32_t cbInstr;
     int rc = DISCoreOneEx(GCPtr,
-                          pState->f64Bits
-                          ? CPUMODE_64BIT
-                          : pSelInfo->u.Raw.Gen.u1DefBig
-                          ? CPUMODE_32BIT
-                          : CPUMODE_16BIT,
+                          enmCpuMode,
                           dbgfR3DisasInstrRead,
                           &pState->Cpu,
@@ -302,10 +323,10 @@
  *                              A combination of the DBGF_DISAS_FLAGS_* \#defines.
  * @param       pszOutput       Output buffer.
- * @param       cchOutput       Size of the output buffer.
+ * @param       cbOutput        Size of the output buffer.
  * @param       pcbInstr        Where to return the size of the instruction.
  */
 static DECLCALLBACK(int)
-dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, unsigned fFlags,
-                         char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
+dbgfR3DisasInstrExOnVCpu(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PRTGCPTR pGCPtr, uint32_t fFlags,
+                         char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr)
 {
     VMCPU_ASSERT_EMT(pVCpu);
@@ -315,6 +336,6 @@
      * Get the Sel and GCPtr if fFlags requests that.
      */
-    PCCPUMCTXCORE pCtxCore = NULL;
-    CPUMSELREGHID *pHiddenSel = NULL;
+    PCCPUMCTXCORE  pCtxCore   = NULL;
+    PCPUMSELREGHID pHiddenSel = NULL;
     int rc;
     if (fFlags & (DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_CURRENT_HYPER))
@@ -334,7 +355,7 @@
      * we recently visited REM, we'll not search for the selector there.
      */
-    DBGFSELINFO SelInfo;
-    const PGMMODE enmMode = PGMGetGuestMode(pVCpu);
-    bool fRealModeAddress = false;
+    DBGFSELINFO     SelInfo;
+    const PGMMODE   enmMode          = PGMGetGuestMode(pVCpu);
+    bool            fRealModeAddress = false;
 
     if (    pHiddenSel
@@ -352,5 +373,5 @@
 
         SelInfo.u.Raw.au32[0]           = 0;
-        SelInfo.u.Raw.au32[1]           =  0;
+        SelInfo.u.Raw.au32[1]           = 0;
         SelInfo.u.Raw.Gen.u16LimitLow   = 0xffff;
         SelInfo.u.Raw.Gen.u4LimitHigh   = 0xf;
@@ -402,5 +423,8 @@
     else if (   !(fFlags & DBGF_DISAS_FLAGS_CURRENT_HYPER)
              && (   (pCtxCore && pCtxCore->eflags.Bits.u1VM)
-                 || enmMode == PGMMODE_REAL) )
+                 || enmMode == PGMMODE_REAL
+                 || (fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_16BIT_REAL_MODE
+                )
+            )
     {   /* V86 mode or real mode - real mode addressing */
         SelInfo.Sel                     = Sel;
@@ -425,5 +449,5 @@
         if (RT_FAILURE(rc))
         {
-            RTStrPrintf(pszOutput, cchOutput, "Sel=%04x -> %Rrc\n", Sel, rc);
+            RTStrPrintf(pszOutput, cbOutput, "Sel=%04x -> %Rrc\n", Sel, rc);
             return rc;
         }
@@ -434,8 +458,8 @@
      */
     DBGFDISASSTATE State;
-    rc = dbgfR3DisasInstrFirst(pVM, pVCpu, &SelInfo, enmMode, GCPtr, &State);
+    rc = dbgfR3DisasInstrFirst(pVM, pVCpu, &SelInfo, enmMode, GCPtr, fFlags, &State);
     if (RT_FAILURE(rc))
     {
-        RTStrPrintf(pszOutput, cchOutput, "Disas -> %Rrc\n", rc);
+        RTStrPrintf(pszOutput, cbOutput, "Disas -> %Rrc\n", rc);
         return rc;
     }
@@ -456,20 +480,20 @@
     {
         if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
-            RTStrPrintf(pszOutput, cchOutput, "%s", szBuf);
+            RTStrPrintf(pszOutput, cbOutput, "%s", szBuf);
         else if (fRealModeAddress)
-            RTStrPrintf(pszOutput, cchOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
+            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
         else if (Sel == DBGF_SEL_FLAT)
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cchOutput, "%RGv  %s", GCPtr, szBuf);
+                RTStrPrintf(pszOutput, cbOutput, "%RGv  %s", GCPtr, szBuf);
             else
-                RTStrPrintf(pszOutput, cchOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
+                RTStrPrintf(pszOutput, cbOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
         }
         else
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cchOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
+                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
             else
-                RTStrPrintf(pszOutput, cchOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
+                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
         }
     }
@@ -481,9 +505,9 @@
         AssertRC(rc);
         if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
-            RTStrPrintf(pszOutput, cchOutput, "%.*Rhxs%*s %s",
+            RTStrPrintf(pszOutput, cbOutput, "%.*Rhxs%*s %s",
                         cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
                         szBuf);
         else if (fRealModeAddress)
-            RTStrPrintf(pszOutput, cchOutput, "%04x:%04x %.*Rhxs%*s %s",
+            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x %.*Rhxs%*s %s",
                         Sel, (unsigned)GCPtr,
                         cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
@@ -492,10 +516,10 @@
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cchOutput, "%RGv %.*Rhxs%*s %s",
+                RTStrPrintf(pszOutput, cbOutput, "%RGv %.*Rhxs%*s %s",
                             GCPtr,
                             cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
                             szBuf);
             else
-                RTStrPrintf(pszOutput, cchOutput, "%08RX32 %.*Rhxs%*s %s",
+                RTStrPrintf(pszOutput, cbOutput, "%08RX32 %.*Rhxs%*s %s",
                             (uint32_t)GCPtr,
                             cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
@@ -505,10 +529,10 @@
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cchOutput, "%04x:%RGv %.*Rhxs%*s %s",
+                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv %.*Rhxs%*s %s",
                             Sel, GCPtr,
                             cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
                             szBuf);
             else
-                RTStrPrintf(pszOutput, cchOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
+                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
                             Sel, (uint32_t)GCPtr,
                             cbBits, pau8Bits, cbBits < 8 ? (8 - cbBits) * 3 : 0, "",
@@ -536,6 +560,7 @@
  * @param   fFlags          Flags controlling where to start and how to format.
  *                          A combination of the DBGF_DISAS_FLAGS_* \#defines.
- * @param   pszOutput       Output buffer.
- * @param   cchOutput       Size of the output buffer.
+ * @param   pszOutput       Output buffer.  This will always be properly
+ *                          terminated if @a cbOutput is greater than zero.
+ * @param   cbOutput        Size of the output buffer.
  * @param   pcbInstr        Where to return the size of the instruction.
  *
@@ -543,9 +568,13 @@
  *          address conversion.
  */
-VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, unsigned fFlags,
-                                  char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
-{
+VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
+                                  char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr)
+{
+    AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER);
+    *pszOutput = '\0';
     VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
     AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
+    AssertReturn(!(fFlags & ~DBGF_DISAS_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER);
+    AssertReturn((fFlags & DBGF_DISAS_FLAGS_MODE_MASK) <= DBGF_DISAS_FLAGS_64BIT_MODE, VERR_INVALID_PARAMETER);
 
     /*
@@ -557,8 +586,8 @@
     if (    pVCpu
         &&  pVCpu->idCpu == idCpu)
-        rc = dbgfR3DisasInstrExOnVCpu(pVM, pVCpu, Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr);
+        rc = dbgfR3DisasInstrExOnVCpu(pVM, pVCpu, Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
     else
         rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3DisasInstrExOnVCpu, 8,
-                             pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr);
+                             pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
     return rc;
 }
@@ -571,13 +600,16 @@
  * @returns VBox status code.
  * @param   pVCpu           VMCPU handle.
- * @param   pszOutput       Output buffer.
- * @param   cchOutput       Size of the output buffer.
- */
-VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cchOutput)
-{
+ * @param   pszOutput       Output buffer.  This will always be properly
+ *                          terminated if @a cbOutput is greater than zero.
+ * @param   cbOutput        Size of the output buffer.
+ */
+VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput)
+{
+    AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER);
     *pszOutput = '\0';
     AssertReturn(pVCpu, VERR_INVALID_CONTEXT);
-    return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_GUEST,
-                              pszOutput, cchOutput, NULL);
+    return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0,
+                              DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                              pszOutput, cbOutput, NULL);
 }
 
@@ -621,6 +653,6 @@
 {
     char szBuf[256];
-    szBuf[0] = '\0';
-    int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, 0, &szBuf[0], sizeof(szBuf), NULL);
+    int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                &szBuf[0], sizeof(szBuf), NULL);
     if (RT_FAILURE(rc))
         RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrLog(, %RTsel, %RGv) failed with rc=%Rrc\n", Sel, GCPtr, rc);
Index: trunk/src/VBox/VMM/HWACCM.cpp
===================================================================
--- trunk/src/VBox/VMM/HWACCM.cpp	(revision 30452)
+++ trunk/src/VBox/VMM/HWACCM.cpp	(revision 30453)
@@ -1625,5 +1625,6 @@
         char            szOutput[256];
 
-        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, 0, szOutput, sizeof(szOutput), 0);
+        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                szOutput, sizeof(szOutput), NULL);
         if (RT_SUCCESS(rc))
             Log(("Patched instr: %s\n", szOutput));
@@ -1648,5 +1649,6 @@
 
 #ifdef LOG_ENABLED
-        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, 0, szOutput, sizeof(szOutput), 0);
+        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, CPUMGetGuestCS(pVCpu), pInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                szOutput, sizeof(szOutput), NULL);
         if (RT_SUCCESS(rc))
             Log(("Original instr: %s\n", szOutput));
@@ -1871,5 +1873,6 @@
 #ifdef LOG_ENABLED
     char      szOutput[256];
-    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
+    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                            szOutput, sizeof(szOutput), NULL);
     if (RT_SUCCESS(rc))
         Log(("Failed to patch instr: %s\n", szOutput));
@@ -1936,5 +1939,6 @@
 
 #ifdef LOG_ENABLED
-        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
+        rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                szOutput, sizeof(szOutput), NULL);
         if (RT_SUCCESS(rc))
             Log(("Original instr: %s\n", szOutput));
@@ -2066,5 +2070,6 @@
                 uint32_t cb;
 
-                rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pInstr, 0, szOutput, sizeof(szOutput), &cb);
+                rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pInstr, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                        szOutput, sizeof(szOutput), &cb);
                 if (RT_SUCCESS(rc))
                     Log(("Patch instr %s\n", szOutput));
@@ -2085,5 +2090,6 @@
 
 #ifdef LOG_ENABLED
-            rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
+            rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                    szOutput, sizeof(szOutput), NULL);
             if (RT_SUCCESS(rc))
                 Log(("Jump: %s\n", szOutput));
@@ -2109,5 +2115,6 @@
 
 #ifdef LOG_ENABLED
-    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, 0, szOutput, sizeof(szOutput), 0);
+    rc = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCtx->rip, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                            szOutput, sizeof(szOutput), NULL);
     if (RT_SUCCESS(rc))
         Log(("Failed to patch instr: %s\n", szOutput));
Index: trunk/src/VBox/VMM/PATM/PATM.cpp
===================================================================
--- trunk/src/VBox/VMM/PATM/PATM.cpp	(revision 30452)
+++ trunk/src/VBox/VMM/PATM/PATM.cpp	(revision 30453)
@@ -5851,6 +5851,6 @@
 #ifdef DEBUG
         char szBuf[256];
-        szBuf[0] = '\0';
-        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, 0, szBuf, sizeof(szBuf), NULL);
+        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                           szBuf, sizeof(szBuf), NULL);
         Log(("DIRTY: %s\n", szBuf));
 #endif
@@ -5913,6 +5913,6 @@
 #ifdef DEBUG
                 char szBuf[256];
-                szBuf[0] = '\0';
-                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, 0, szBuf, sizeof(szBuf), NULL);
+                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                   szBuf, sizeof(szBuf), NULL);
                 Log(("NEW:   %s\n", szBuf));
 #endif
@@ -5929,6 +5929,6 @@
 #ifdef DEBUG
                 char szBuf[256];
-                szBuf[0] = '\0';
-                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, 0, szBuf, sizeof(szBuf), NULL);
+                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                   szBuf, sizeof(szBuf), NULL);
                 Log(("NEW:   %s (FAILED)\n", szBuf));
 #endif
@@ -5966,6 +5966,6 @@
 #ifdef DEBUG
                             char szBuf[256];
-                            szBuf[0] = '\0';
-                            DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, 0, szBuf, sizeof(szBuf), NULL);
+                            DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC, DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                               szBuf, sizeof(szBuf), NULL);
                             Log(("FILL:  %s\n", szBuf));
 #endif
@@ -5978,6 +5978,6 @@
 #ifdef DEBUG
                                 char szBuf[256];
-                                szBuf[0] = '\0';
-                                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC + i, 0, szBuf, sizeof(szBuf), NULL);
+                                DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pCurPatchInstrGC + i,
+                                                   DBGF_DISAS_FLAGS_DEFAULT_MODE, szBuf, sizeof(szBuf), NULL);
                                 Log(("FILL:  %s\n", szBuf));
 #endif
@@ -6170,6 +6170,5 @@
 
         char szBuf[256];
-        szBuf[0] = '\0';
-        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pEip, 0, szBuf, sizeof(szBuf), NULL);
+        DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, pCtx->cs, pEip, DBGF_DISAS_FLAGS_DEFAULT_MODE, szBuf, sizeof(szBuf), NULL);
 
         /* Very bad. We crashed in emitted code. Probably stack? */
Index: trunk/src/VBox/VMM/VMMGuruMeditation.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMGuruMeditation.cpp	(revision 30452)
+++ trunk/src/VBox/VMM/VMMGuruMeditation.cpp	(revision 30453)
@@ -495,5 +495,6 @@
                 /* Disassemble the instruction. */
                 char szInstr[256];
-                rc2 = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_HYPER, &szInstr[0], sizeof(szInstr), NULL);
+                rc2 = DBGFR3DisasInstrEx(pVM, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_HYPER | DBGF_DISAS_FLAGS_DEFAULT_MODE,
+                                         &szInstr[0], sizeof(szInstr), NULL);
                 if (RT_SUCCESS(rc2))
                     pHlp->pfnPrintf(pHlp,
Index: trunk/src/recompiler/VBoxRecompiler.c
===================================================================
--- trunk/src/recompiler/VBoxRecompiler.c	(revision 30452)
+++ trunk/src/recompiler/VBoxRecompiler.c	(revision 30453)
@@ -3820,5 +3820,5 @@
                                         cs,
                                         eip,
-                                        0,
+                                        DBGF_DISAS_FLAGS_DEFAULT_MODE,
                                         szBuf, sizeof(szBuf),
                                         &cbInstr);
