Index: /trunk/include/VBox/dis.h
===================================================================
--- /trunk/include/VBox/dis.h	(revision 41668)
+++ /trunk/include/VBox/dis.h	(revision 41669)
@@ -550,5 +550,6 @@
 
 
-DISDECL(int) DISInstr(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput);
+DISDECL(int) DISInstrToStr(void const *pvInstr, DISCPUMODE enmCpuMode,
+                           PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
 DISDECL(int) DISInstrWithOff(PDISCPUSTATE pCpu, RTUINTPTR uInstrAddr, RTUINTPTR offRealAddr, uint32_t *pcbInstr, char *pszOutput);
 DISDECL(int) DISInstrWithReader(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
Index: /trunk/src/VBox/Disassembler/Disasm.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/Disasm.cpp	(revision 41668)
+++ /trunk/src/VBox/Disassembler/Disasm.cpp	(revision 41669)
@@ -36,14 +36,16 @@
  * @param   pCpu            Pointer to cpu structure which have DISCPUSTATE::mode
  *                          set correctly.
- * @param   uInstrAddr      Pointer to the structure to disassemble.
+ * @param   pvInstr         Pointer to the instruction to disassemble.
  * @param   pcbInstr        Where to store the size of the instruction. NULL is
  *                          allowed.
  * @param   pszOutput       Storage for disassembled instruction
+ * @param   cbOutput        Size of the output buffer.
  *
  * @todo    Define output callback.
  */
-DISDECL(int) DISInstr(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput)
+DISDECL(int) DISInstrToStr(void const *pvInstr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr,
+                           char *pszOutput, size_t cbOutput)
 {
-    return DISInstrEx(uInstrAddr, 0, enmCpuMode, NULL, NULL, OPTYPE_ALL,
+    return DISInstrEx((uintptr_t)pvInstr, 0, enmCpuMode, NULL, NULL, OPTYPE_ALL,
                       pCpu, pcbInstr, pszOutput);
 }
@@ -55,5 +57,5 @@
  * @param   pCpu            Pointer to cpu structure which have DISCPUSTATE::mode
  *                          set correctly.
- * @param   uInstrAddr      Pointer to the structure to disassemble.
+ * @param   uInstrAddr      Pointer to the instruction to disassemble.
  * @param   offRealAddr     Offset to add to instruction address to get the real
  *                          virtual address.
Index: /trunk/src/VBox/Disassembler/DisasmTest.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/DisasmTest.cpp	(revision 41668)
+++ /trunk/src/VBox/Disassembler/DisasmTest.cpp	(revision 41669)
@@ -42,5 +42,5 @@
     else
     {
-        RTUINTPTR pInstr = (uintptr_t)TestProc;
+        uint8_t const *pbInstr = (uint8_t const *)(uintptr_t)TestProc;
 
         for (int i=0;i<50;i++)
@@ -50,5 +50,5 @@
             char        szOutput[256];
 
-            if (RT_SUCCESS(DISInstr(pInstr, CPUMODE_32BIT, &cpu, &cb, szOutput)))
+            if (RT_SUCCESS(DISInstrToStr(pbInstr, CPUMODE_32BIT, &cpu, &cb, szOutput, sizeof(szOutput))))
             {
                 printf("%s", szOutput);
@@ -59,10 +59,10 @@
                 return 1;
             }
-            pInstr += cb;
+            pbInstr += cb;
         }
 
 #ifndef RT_OS_OS2
         printf("\n64 bits disassembly\n");
-        pInstr = (uintptr_t)TestProc64;
+        pbInstr = (uint8_t const *)(uintptr_t)TestProc64;
 
 ////__debugbreak();
@@ -73,5 +73,5 @@
             char        szOutput[256];
 
-            if (RT_SUCCESS(DISInstr(pInstr, CPUMODE_64BIT, &cpu, &cb, szOutput)))
+            if (RT_SUCCESS(DISInstrToStr(pbInstr, CPUMODE_64BIT, &cpu, &cb, szOutput, sizeof(szOutput))))
                 printf("%s", szOutput);
             else
@@ -80,5 +80,5 @@
                 return 1;
             }
-            pInstr += cb;
+            pbInstr += cb;
         }
 #endif
Index: /trunk/src/VBox/VMM/testcase/tstCompiler.cpp
===================================================================
--- /trunk/src/VBox/VMM/testcase/tstCompiler.cpp	(revision 41668)
+++ /trunk/src/VBox/VMM/testcase/tstCompiler.cpp	(revision 41669)
@@ -199,24 +199,23 @@
 {
     RTPrintf("tstBitFields: Disassembly of %s:\n", pszName);
-    RTUINTPTR uCur = (uintptr_t)pv;
-    RTUINTPTR uCurMax = uCur + 256;
-    DISCPUSTATE Cpu;
-
-    memset(&Cpu, 0, sizeof(Cpu));
+    uint8_t const *pbCur    = (uint8_t const *)(uintptr_t)pv;
+    uint8_t const *pbCurMax = pbCur + 256;
+    DISCPUSTATE    Cpu;
+
     do
     {
         char        sz[256];
         uint32_t    cbInstr = 0;
-        if (RT_SUCCESS(DISInstr(uCur, CPUMODE_32BIT, &Cpu, &cbInstr, sz)))
+        if (RT_SUCCESS(DISInstrToStr(pbCur, CPUMODE_32BIT, &Cpu, &cbInstr, sz, sizeof(sz))))
         {
             RTPrintf("tstBitFields: %s", sz);
-            uCur += cbInstr;
+            pbCur += cbInstr;
         }
         else
         {
-            RTPrintf("tstBitFields: %p: %02x - DISInstr failed!\n", uCur, *(uint8_t *)(uintptr_t)uCur);
-            uCur += 1;
+            RTPrintf("tstBitFields: %p: %02x - DISInstr failed!\n", pbCur, *pbCur);
+            pbCur += 1;
         }
-    } while (Cpu.pCurInstr->opcode != OP_RETN || uCur > uCurMax);
+    } while (Cpu.pCurInstr->opcode != OP_RETN || (uintptr_t)pbCur > (uintptr_t)pbCurMax);
 }
 
Index: /trunk/src/recompiler/VBoxREMWrapper.cpp
===================================================================
--- /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 41668)
+++ /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 41669)
@@ -652,11 +652,12 @@
     { REMPARMDESC_FLAGS_INT,        sizeof(RTGCUINTPTR),        NULL }
 };
-static const REMPARMDESC g_aArgsDISInstr[] =
-{
-    { REMPARMDESC_FLAGS_INT,        sizeof(RTUINTPTR),          NULL },
+static const REMPARMDESC g_aArgsDISInstrToStr[] =
+{
+    { REMPARMDESC_FLAGS_INT,        sizeof(uint8_t const *),    NULL },
     { REMPARMDESC_FLAGS_INT,        sizeof(DISCPUMODE),         NULL },
     { REMPARMDESC_FLAGS_INT,        sizeof(PDISCPUSTATE),       NULL },
     { REMPARMDESC_FLAGS_INT,        sizeof(uint32_t *),         NULL },
-    { REMPARMDESC_FLAGS_INT,        sizeof(char *),             NULL }
+    { REMPARMDESC_FLAGS_INT,        sizeof(char *),             NULL },
+    { REMPARMDESC_FLAGS_INT,        sizeof(size_t),             NULL }
 };
 static const REMPARMDESC g_aArgsEMR3FatalError[] =
@@ -1233,5 +1234,5 @@
     { "DBGFR3AsSymbolByAddr",                   VMM_FN(DBGFR3AsSymbolByAddr),           &g_aArgsDBGFR3AsSymbolByAddr[0],            RT_ELEMENTS(g_aArgsDBGFR3AsSymbolByAddr),              REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
     { "DBGFR3AddrFromFlat",                     VMM_FN(DBGFR3AddrFromFlat),             &g_aArgsDBGFR3AddrFromFlat[0],              RT_ELEMENTS(g_aArgsDBGFR3AddrFromFlat),                REMFNDESC_FLAGS_RET_INT,    sizeof(PDBGFADDRESS),       NULL },
-    { "DISInstr",                               VMM_FN(DISInstr),                       &g_aArgsDISInstr[0],                        RT_ELEMENTS(g_aArgsDISInstr),                          REMFNDESC_FLAGS_RET_INT,    sizeof(bool),       NULL },
+    { "DISInstrToStr",                          VMM_FN(DISInstrToStr),                  &g_aArgsDISInstrToStr[0],                   RT_ELEMENTS(g_aArgsDISInstrToStr),                     REMFNDESC_FLAGS_RET_INT,    sizeof(bool),       NULL },
     { "EMR3FatalError",                         VMM_FN(EMR3FatalError),                 &g_aArgsEMR3FatalError[0],                  RT_ELEMENTS(g_aArgsEMR3FatalError),                    REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     { "EMRemLock",                              VMM_FN(EMRemLock),                      &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
Index: /trunk/src/recompiler/VBoxRecompiler.c
===================================================================
--- /trunk/src/recompiler/VBoxRecompiler.c	(revision 41668)
+++ /trunk/src/recompiler/VBoxRecompiler.c	(revision 41669)
@@ -4081,5 +4081,6 @@
         {
             uint32_t cbInstr;
-            int rc = DISInstr((uintptr_t)pvCode + off, enmCpuMode, &Cpu, &cbInstr, szOutput);
+            int rc = DISInstrToStr((uint8_t const *)pvCode + off, enmCpuMode,
+                                   &Cpu, &cbInstr, szOutput, sizeof(szOutput));
             if (RT_SUCCESS(rc))
                 RTLogPrintf("%s", szOutput);
