Index: trunk/src/VBox/VMM/VMMR3/DBGF.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/DBGF.cpp	(revision 46155)
+++ trunk/src/VBox/VMM/VMMR3/DBGF.cpp	(revision 46159)
@@ -974,5 +974,6 @@
      * Check if attached.
      */
-    AssertReturn(pVM->dbgf.s.fAttached, VERR_DBGF_NOT_ATTACHED);
+    if (!pVM->dbgf.s.fAttached)
+        return VERR_DBGF_NOT_ATTACHED;
 
     /*
@@ -1116,5 +1117,6 @@
     if (pVM->enmVMState >= VMSTATE_DESTROYING)
         return VERR_INVALID_VM_HANDLE;
-    AssertReturn(pVM->dbgf.s.fAttached, VERR_DBGF_NOT_ATTACHED);
+    if (!pVM->dbgf.s.fAttached)
+        return VERR_DBGF_NOT_ATTACHED;
 
     if (!RTSemPongShouldWait(&pVM->dbgf.s.PingPong))
Index: trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 46155)
+++ trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 46159)
@@ -26,4 +26,7 @@
 #include <VBox/vmm/pgm.h>
 #include <VBox/vmm/cpum.h>
+#ifdef VBOX_WITH_RAW_MODE
+# include <VBox/vmm/patm.h>
+#endif
 #include "DBGFInternal.h"
 #include <VBox/dis.h>
@@ -57,5 +60,5 @@
     PVMCPU          pVCpu;
     /** The address space for resolving symbol. */
-    RTDBGAS         hAs;
+    RTDBGAS         hDbgAs;
     /** Pointer to the first byte in the segment. */
     RTGCUINTPTR     GCPtrSegBase;
@@ -78,4 +81,8 @@
     /** 64 bits mode or not. */
     bool            f64Bits;
+    /** Read original unpatched bytes from the patch manager. */
+    bool            fUnpatchedBytes;
+    /** Set when fUnpatchedBytes is active and we encounter patched bytes. */
+    bool            fPatchedInstr;
 } DBGFDISASSTATE, *PDBGFDISASSTATE;
 
@@ -109,5 +116,5 @@
     pState->GCPtrPage       = 0;
     pState->pvPageR3        = NULL;
-    pState->hAs             = pSelInfo->fFlags & DBGFSELINFO_FLAGS_HYPER /** @todo Deal more explicitly with RC in DBGFR3Disas*. */
+    pState->hDbgAs          = !HMIsEnabled(pVM)
                             ? DBGF_AS_RC_AND_GC_GLOBAL
                             : DBGF_AS_GLOBAL;
@@ -116,4 +123,8 @@
     pState->fLocked         = false;
     pState->f64Bits         = enmMode >= PGMMODE_AMD64 && pSelInfo->u.Raw.Gen.u1Long;
+#ifdef VBOX_WITH_RAW_MODE
+    pState->fUnpatchedBytes = RT_BOOL(fFlags & DBGF_DISAS_FLAGS_UNPATCHED_BYTES);
+    pState->fPatchedInstr   = false;
+#endif
 
     DISCPUMODE enmCpuMode;
@@ -267,4 +278,32 @@
             cb = cbMaxRead;
 
+#ifdef VBOX_WITH_RAW_MODE
+        /*
+         * Read original bytes from PATM if asked to do so.
+         */
+        if (pState->fUnpatchedBytes)
+        {
+            size_t cbRead = cb;
+            int rc = PATMR3ReadOrgInstr(pState->pVM, GCPtr, &pDis->abInstr[offInstr], cbRead, &cbRead);
+            if (RT_SUCCESS(rc))
+            {
+                pState->fPatchedInstr = true;
+                if (cbRead >= cbMinRead)
+                {
+                    pDis->cbCachedInstr = offInstr + (uint8_t)cbRead;
+                    return rc;
+                }
+
+                cbMinRead -= (uint8_t)cbRead;
+                cbMaxRead -= (uint8_t)cbRead;
+                cb        -= (uint8_t)cbRead;
+                offInstr  += (uint8_t)cbRead;
+                GCPtr     += cbRead;
+                if (!cb)
+                    continue;
+            }
+        }
+#endif /* VBOX_WITH_RAW_MODE */
+
         /*
          * Read and advance,
@@ -301,5 +340,5 @@
         rc = DBGFR3AddrFromSelInfoOff(pState->pVM->pUVM, &Addr, pSelInfo, uAddress);
         if (RT_SUCCESS(rc))
-            rc = DBGFR3AsSymbolByAddr(pState->pVM->pUVM, pState->hAs, &Addr, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL,
+            rc = DBGFR3AsSymbolByAddr(pState->pVM->pUVM, pState->hDbgAs, &Addr, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL,
                                       &off, &Sym, NULL /*phMod*/);
     }
@@ -507,26 +546,37 @@
                     &SelInfo);
 
+#ifdef VBOX_WITH_RAW_MODE
+    /*
+     * Patched instruction annotations.
+     */
+    char szPatchAnnotations[256];
+    szPatchAnnotations[0] = '\0';
+    if (fFlags & DBGF_DISAS_FLAGS_ANNOTATE_PATCHED)
+        PATMR3DbgAnnotatePatchedInstruction(pVM, GCPtr, State.Cpu.cbInstr, szPatchAnnotations, sizeof(szPatchAnnotations));
+#endif
+
     /*
      * Print it to the user specified buffer.
      */
+    size_t cch;
     if (fFlags & DBGF_DISAS_FLAGS_NO_BYTES)
     {
         if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
-            RTStrPrintf(pszOutput, cbOutput, "%s", szBuf);
+            cch = RTStrPrintf(pszOutput, cbOutput, "%s", szBuf);
         else if (fRealModeAddress)
-            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
+            cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%04x  %s", Sel, (unsigned)GCPtr, szBuf);
         else if (Sel == DBGF_SEL_FLAT)
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cbOutput, "%RGv  %s", GCPtr, szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%RGv  %s", GCPtr, szBuf);
             else
-                RTStrPrintf(pszOutput, cbOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%08RX32  %s", (uint32_t)GCPtr, szBuf);
         }
         else
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv  %s", Sel, GCPtr, szBuf);
             else
-                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32  %s", Sel, (uint32_t)GCPtr, szBuf);
         }
     }
@@ -536,39 +586,44 @@
         uint8_t const  *pabInstr = State.Cpu.abInstr;
         if (fFlags & DBGF_DISAS_FLAGS_NO_ADDRESS)
-            RTStrPrintf(pszOutput, cbOutput, "%.*Rhxs%*s %s",
-                        cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                        szBuf);
+            cch = RTStrPrintf(pszOutput, cbOutput, "%.*Rhxs%*s %s",
+                              cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                              szBuf);
         else if (fRealModeAddress)
-            RTStrPrintf(pszOutput, cbOutput, "%04x:%04x %.*Rhxs%*s %s",
-                        Sel, (unsigned)GCPtr,
-                        cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                        szBuf);
+            cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%04x %.*Rhxs%*s %s",
+                              Sel, (unsigned)GCPtr,
+                              cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                              szBuf);
         else if (Sel == DBGF_SEL_FLAT)
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cbOutput, "%RGv %.*Rhxs%*s %s",
-                            GCPtr,
-                            cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                            szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%RGv %.*Rhxs%*s %s",
+                                  GCPtr,
+                                  cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                                  szBuf);
             else
-                RTStrPrintf(pszOutput, cbOutput, "%08RX32 %.*Rhxs%*s %s",
-                            (uint32_t)GCPtr,
-                            cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                            szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%08RX32 %.*Rhxs%*s %s",
+                                  (uint32_t)GCPtr,
+                                  cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                                  szBuf);
         }
         else
         {
             if (enmMode >= PGMMODE_AMD64)
-                RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv %.*Rhxs%*s %s",
-                            Sel, GCPtr,
-                            cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                            szBuf);
+                cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv %.*Rhxs%*s %s",
+                                  Sel, GCPtr,
+                                  cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                                  szBuf);
             else
-                RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
-                            Sel, (uint32_t)GCPtr,
-                            cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
-                            szBuf);
-        }
-    }
+                cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32 %.*Rhxs%*s %s",
+                                  Sel, (uint32_t)GCPtr,
+                                  cbInstr, pabInstr, cbInstr < 8 ? (8 - cbInstr) * 3 : 0, "",
+                                  szBuf);
+        }
+    }
+
+#ifdef VBOX_WITH_RAW_MODE
+    if (szPatchAnnotations[0] && cch + 1 < cbOutput)
+        RTStrPrintf(pszOutput + cch, cbOutput - cch, "  ; %s", szPatchAnnotations);
+#endif
 
     if (pcbInstr)
Index: trunk/src/VBox/VMM/VMMR3/PATM.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/PATM.cpp	(revision 46155)
+++ trunk/src/VBox/VMM/VMMR3/PATM.cpp	(revision 46159)
@@ -3780,5 +3780,6 @@
 
     /* Add relocation record for cached data access. */
-    if (patmPatchAddReloc32(pVM, pPatch, &pPB[pCpu->cbInstr - sizeof(RTRCPTR)], FIXUP_ABSOLUTE, pPatch->pPrivInstrGC, pVM->patm.s.mmio.pCachedData) != VINF_SUCCESS)
+    if (patmPatchAddReloc32(pVM, pPatch, &pPB[pCpu->cbInstr - sizeof(RTRCPTR)], FIXUP_ABSOLUTE, pPatch->pPrivInstrGC,
+                            pVM->patm.s.mmio.pCachedData) != VINF_SUCCESS)
     {
         Log(("Relocation failed for cached mmio address!!\n"));
@@ -3794,5 +3795,6 @@
 
     /* Replace address with that of the cached item. */
-    rc = PGMPhysSimpleDirtyWriteGCPtr(VMMGetCpu0(pVM), pInstrGC + pCpu->cbInstr - sizeof(RTRCPTR), &pVM->patm.s.mmio.pCachedData, sizeof(RTRCPTR));
+    rc = PGMPhysSimpleDirtyWriteGCPtr(VMMGetCpu0(pVM), pInstrGC + pCpu->cbInstr - sizeof(RTRCPTR),
+                                      &pVM->patm.s.mmio.pCachedData, sizeof(RTRCPTR));
     AssertRC(rc);
     if (RT_FAILURE(rc))
Index: trunk/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp	(revision 46155)
+++ trunk/src/VBox/VMM/VMMR3/PATMR3Dbg.cpp	(revision 46159)
@@ -96,4 +96,77 @@
 
 
+static size_t patmR3DbgDescribePatchAsSymbol(PPATMPATCHREC pPatchRec, char *pszName, size_t cbLeft)
+{
+    char * const pszNameStart = pszName;
+#define ADD_SZ(a_sz) \
+        do { \
+            if (cbLeft >= sizeof(a_sz)) \
+            { \
+                memcpy(pszName, a_sz, sizeof(a_sz)); \
+                pszName += sizeof(a_sz) - 1; \
+                cbLeft -= sizeof(a_sz) - 1;\
+            }\
+        } while (0)
+
+    /* Start the name off with the address of the guest code. */
+    size_t cch = RTStrPrintf(pszName, cbLeft, "Patch_%#08x", pPatchRec->patch.pPrivInstrGC);
+    cbLeft  -= cch;
+    pszName += cch;
+
+    /* Append flags. */
+    uint64_t fFlags = pPatchRec->patch.flags;
+    if (fFlags & PATMFL_INTHANDLER)
+        ADD_SZ("_IntHandler");
+    if (fFlags & PATMFL_SYSENTER)
+        ADD_SZ("_SysEnter");
+    if (fFlags & PATMFL_GUEST_SPECIFIC)
+        ADD_SZ("_GuestSpecific");
+    if (fFlags & PATMFL_USER_MODE)
+        ADD_SZ("_UserMode");
+    if (fFlags & PATMFL_IDTHANDLER)
+        ADD_SZ("_IdtHnd");
+    if (fFlags & PATMFL_TRAPHANDLER)
+        ADD_SZ("_TrapHnd");
+    if (fFlags & PATMFL_DUPLICATE_FUNCTION)
+        ADD_SZ("_DupFunc");
+    if (fFlags & PATMFL_REPLACE_FUNCTION_CALL)
+        ADD_SZ("_ReplFunc");
+    if (fFlags & PATMFL_TRAPHANDLER_WITH_ERRORCODE)
+        ADD_SZ("_TrapHndErrCd");
+    if (fFlags & PATMFL_MMIO_ACCESS)
+        ADD_SZ("_MmioAccess");
+    if (fFlags & PATMFL_SYSENTER_XP)
+        ADD_SZ("_SysEnterXP");
+    if (fFlags & PATMFL_INT3_REPLACEMENT)
+        ADD_SZ("_Int3Repl");
+    if (fFlags & PATMFL_SUPPORT_CALLS)
+        ADD_SZ("_SupCalls");
+    if (fFlags & PATMFL_SUPPORT_INDIRECT_CALLS)
+        ADD_SZ("_SupIndirCalls");
+    if (fFlags & PATMFL_IDTHANDLER_WITHOUT_ENTRYPOINT)
+        ADD_SZ("_IdtHandlerWE");
+    if (fFlags & PATMFL_INHIBIT_IRQS)
+        ADD_SZ("_InhibitIrqs");
+    if (fFlags & PATMFL_RECOMPILE_NEXT)
+        ADD_SZ("_RecompileNext");
+    if (fFlags & PATMFL_CALLABLE_AS_FUNCTION)
+        ADD_SZ("_Callable");
+    if (fFlags & PATMFL_TRAMPOLINE)
+        ADD_SZ("_Trampoline");
+    if (fFlags & PATMFL_PATCHED_GUEST_CODE)
+        ADD_SZ("_PatchedGuestCode");
+    if (fFlags & PATMFL_MUST_INSTALL_PATCHJMP)
+        ADD_SZ("_MustInstallPatchJmp");
+    if (fFlags & PATMFL_INT3_REPLACEMENT_BLOCK)
+        ADD_SZ("_Int3ReplBlock");
+    if (fFlags & PATMFL_EXTERNAL_JUMP_INSIDE)
+        ADD_SZ("_ExtJmp");
+    if (fFlags & PATMFL_CODE_REFERENCED)
+        ADD_SZ("_CodeRefed");
+
+    return pszName - pszNameStart;
+}
+
+
 /**
  * Called when a new patch is added or when first populating the address space.
@@ -112,84 +185,19 @@
          *        state considerations right now (I don't recall if we're still
          *        depending on structure layout there or not). */
-        int  rc;
-        char szName[256];
-
-#define ADD_SZ(a_sz)   \
-        do { \
-            if (cbLeft >= sizeof(a_sz)) \
-            { \
-                memcpy(pszName, a_sz, sizeof(a_sz)); \
-                pszName += sizeof(a_sz); \
-                cbLeft -= sizeof(a_sz);\
-            }\
-        } while (0)
-
-        /* Start the name off with the address of the guest code. */
-        size_t cch = RTStrPrintf(szName, sizeof(szName), "Patch_%#08x", pPatchRec->patch.pPrivInstrGC);
-        char   *pszName = &szName[cch];
-        size_t  cbLeft  = sizeof(szName) - cch;
-
-        /* Append flags. */
-        uint64_t fFlags  = pPatchRec->patch.flags;
-        if (fFlags & PATMFL_INTHANDLER)
-            ADD_SZ("_IntHandler");
-        if (fFlags & PATMFL_SYSENTER)
-            ADD_SZ("_SysEnter");
-        if (fFlags & PATMFL_GUEST_SPECIFIC)
-            ADD_SZ("_GuestSpecific");
-        if (fFlags & PATMFL_USER_MODE)
-            ADD_SZ("_UserMode");
-        if (fFlags & PATMFL_IDTHANDLER)
-            ADD_SZ("_IdtHandler");
-        if (fFlags & PATMFL_TRAPHANDLER)
-            ADD_SZ("_TrapHandler");
-        if (fFlags & PATMFL_DUPLICATE_FUNCTION)
-            ADD_SZ("_DupFunc");
-        if (fFlags & PATMFL_REPLACE_FUNCTION_CALL)
-            ADD_SZ("_ReplFunc");
-        if (fFlags & PATMFL_TRAPHANDLER_WITH_ERRORCODE)
-            ADD_SZ("_TrapHandlerErrCd");
-        if (fFlags & PATMFL_MMIO_ACCESS)
-            ADD_SZ("_MmioAccess");
-        if (fFlags & PATMFL_SYSENTER_XP)
-            ADD_SZ("_SysEnterXP");
-        if (fFlags & PATMFL_INT3_REPLACEMENT)
-            ADD_SZ("_Int3Replacement");
-        if (fFlags & PATMFL_SUPPORT_CALLS)
-            ADD_SZ("_SupportCalls");
-        if (fFlags & PATMFL_SUPPORT_INDIRECT_CALLS)
-            ADD_SZ("_SupportIndirectCalls");
-        if (fFlags & PATMFL_IDTHANDLER_WITHOUT_ENTRYPOINT)
-            ADD_SZ("_IdtHandlerWE");
-        if (fFlags & PATMFL_INHIBIT_IRQS)
-            ADD_SZ("_InhibitIrqs");
-        if (fFlags & PATMFL_RECOMPILE_NEXT)
-            ADD_SZ("_RecompileNext");
-        if (fFlags & PATMFL_CALLABLE_AS_FUNCTION)
-            ADD_SZ("_Callable");
-        if (fFlags & PATMFL_TRAMPOLINE)
-            ADD_SZ("_Trampoline");
-        if (fFlags & PATMFL_PATCHED_GUEST_CODE)
-            ADD_SZ("_PatchedGuestCode");
-        if (fFlags & PATMFL_MUST_INSTALL_PATCHJMP)
-            ADD_SZ("_MustInstallPatchJmp");
-        if (fFlags & PATMFL_INT3_REPLACEMENT_BLOCK)
-            ADD_SZ("_Int3ReplacementBlock");
-        if (fFlags & PATMFL_EXTERNAL_JUMP_INSIDE)
-            ADD_SZ("_ExtJmp");
-        if (fFlags & PATMFL_CODE_REFERENCED)
-            ADD_SZ("_CodeRefed");
+        char   szName[256];
+        size_t off = patmR3DbgDescribePatchAsSymbol(pPatchRec, szName, sizeof(szName));
 
         /* If we have a symbol near the guest address, append that. */
-        if (cbLeft > 8)
+        if (off + 8 <= sizeof(szName))
         {
             DBGFSYMBOL Symbol;
             RTGCINTPTR offDisp;
 
-            rc = DBGFR3SymbolByAddr(pVM, pPatchRec->patch.pPrivInstrGC, &offDisp, &Symbol);
+            int rc = DBGFR3SymbolByAddr(pVM, pPatchRec->patch.pPrivInstrGC, &offDisp, &Symbol);
             if (RT_SUCCESS(rc))
             {
-                ADD_SZ("__");
-                RTStrCopy(pszName, cbLeft, Symbol.szName);
+                szName[off++] = '_';
+                szName[off++] = '_';
+                RTStrCopy(&szName[off], sizeof(szName) - off, Symbol.szName);
             }
         }
@@ -200,5 +208,4 @@
                           pPatchRec->patch.cbPatchBlockSize,
                           0 /*fFlags*/, NULL /*piOrdinal*/);
-
     }
 }
@@ -300,2 +307,77 @@
 
 
+/**
+ * Annotates an instruction if patched.
+ *
+ * @param   pVM                 The VM handle.
+ * @param   RCPtr               The instruction address.
+ * @param   cbInstr             The instruction length.
+ * @param   pszBuf              The output buffer.  This will be an empty string
+ *                              if the instruction wasn't patched.  If it's
+ *                              patched, it will hold a symbol-like string
+ *                              describing the patch.
+ * @param   cbBuf               The size of the output buffer.
+ */
+VMMR3_INT_DECL(void) PATMR3DbgAnnotatePatchedInstruction(PVM pVM, RTRCPTR RCPtr, uint8_t cbInstr, char *pszBuf, size_t cbBuf)
+{
+    /*
+     * Always zero the buffer.
+     */
+    AssertReturnVoid(cbBuf > 0);
+    *pszBuf = '\0';
+
+    /*
+     * Drop out immediately if it cannot be a patched instruction.
+     */
+    if (!PATMIsEnabled(pVM))
+        return;
+    if (   RCPtr < pVM->patm.s.pPatchedInstrGCLowest
+        || RCPtr > pVM->patm.s.pPatchedInstrGCHighest)
+        return;
+
+    /*
+     * Look for a patch record covering any part of the instruction.
+     *
+     * The first query results in a patched less or equal to RCPtr. While the
+     * second results in one that's greater than RCPtr.
+     */
+    PPATMPATCHREC pPatchRec;
+    pPatchRec = (PPATMPATCHREC)RTAvloU32GetBestFit(&pVM->patm.s.PatchLookupTreeHC->PatchTree, RCPtr, false /*fFromAbove*/);
+    if (   !pPatchRec
+        || RCPtr - pPatchRec->patch.pPrivInstrGC > pPatchRec->patch.cbPrivInstr)
+    {
+        pPatchRec = (PPATMPATCHREC)RTAvloU32GetBestFit(&pVM->patm.s.PatchLookupTreeHC->PatchTree, RCPtr, true /*fFromAbove*/);
+        if (   !pPatchRec
+            || (RTRCPTR)(RCPtr + cbInstr) < pPatchRec->patch.pPrivInstrGC )
+            return;
+    }
+
+    /*
+     * Lazy bird uses the symbol name generation code for describing the patch.
+     */
+    size_t off = patmR3DbgDescribePatchAsSymbol(pPatchRec, pszBuf, cbBuf);
+    if (off + 1 < cbBuf)
+    {
+        const char *pszState;
+        switch (pPatchRec->patch.uState)
+        {
+            case PATCH_REFUSED:             pszState = "Refused"; break;
+            case PATCH_DISABLED:            pszState = "Disabled"; break;
+            case PATCH_ENABLED:             pszState = "Enabled"; break;
+            case PATCH_UNUSABLE:            pszState = "Unusable"; break;
+            case PATCH_DIRTY:               pszState = "Dirty"; break;
+            case PATCH_DISABLE_PENDING:     pszState = "DisablePending"; break;
+            default:                        pszState = "State???"; AssertFailed(); break;
+        }
+
+        if (pPatchRec->patch.cbPatchBlockSize > 0)
+            off += RTStrPrintf(&pszBuf[off], cbBuf - off, " - %s (%u b) - %#x LB %#x",
+                               pszState, pPatchRec->patch.cbPatchJump,
+                               pPatchRec->patch.pPatchBlockOffset + pVM->patm.s.pPatchMemGC,
+                               pPatchRec->patch.cbPatchBlockSize);
+        else
+            off += RTStrPrintf(&pszBuf[off], cbBuf - off, " - %s (%u b)", pszState, pPatchRec->patch.cbPatchJump);
+    }
+
+}
+
