VirtualBox

Changeset 41764 in vbox


Ignore:
Timestamp:
Jun 15, 2012 5:36:56 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78581
Message:

VMM: Retired CPUMR3DisasmInstr in favor of DBGFR3DisasInstrLog.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpumdis.h

    r37955 r41764  
    3939#ifdef IN_RING3
    4040VMMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu, const char *pszPrefix);
    41 
    42 # ifdef DEBUG
    43 /** @deprecated  Use DBGFR3DisasInstrCurrentLog().  */
    44 VMMR3DECL(void) CPUMR3DisasmInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPTR pc, const char *pszPrefix);
    45 # else
    46 /** @deprecated  Use DBGFR3DisasInstrCurrentLog(). */
    47 #  define CPUMR3DisasmInstr(pVM, pVCpu, pCtx, pc, pszPrefix)                   do {} while (0)
    48 # endif
    49 
    50 #endif /* IN_RING3 */
     41#endif
    5142
    5243/** @} */
  • trunk/include/VBox/vmm/dbgf.h

    r41545 r41764  
    914914#endif
    915915
    916 VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr);
     916VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr, const char *pszPrefix);
    917917
    918918/** @def DBGFR3DisasInstrLog
     
    922922 */
    923923# ifdef LOG_ENABLED
    924 #  define DBGFR3DisasInstrLog(pVCpu, Sel, GCPtr) \
     924#  define DBGFR3DisasInstrLog(pVCpu, Sel, GCPtr, pszPrefix) \
    925925    do { \
    926926        if (LogIsEnabled()) \
    927             DBGFR3DisasInstrLogInternal(pVCpu, Sel, GCPtr); \
     927            DBGFR3DisasInstrLogInternal(pVCpu, Sel, GCPtr, pszPrefix); \
    928928    } while (0)
    929929# else
    930 #  define DBGFR3DisasInstrLog(pVCpu, Sel, GCPtr) do { } while (0)
     930#  define DBGFR3DisasInstrLog(pVCpu, Sel, GCPtr, pszPrefix) do { } while (0)
    931931# endif
    932932#endif
  • trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp

    r41760 r41764  
    639639        RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrCurrentLog failed with rc=%Rrc\n", rc);
    640640    if (pszPrefix && *pszPrefix)
    641         RTLogPrintf("%s-CPU%d: %s\n", pszPrefix, pVCpu->idCpu, szBuf);
     641        RTLogPrintf("%s-CPU%u: %s\n", pszPrefix, pVCpu->idCpu, szBuf);
    642642    else
    643643        RTLogPrintf("%s\n", szBuf);
     
    657657 *                          calculation of the actual instruction address.
    658658 * @param   GCPtr           The code address relative to the base of Sel.
    659  */
    660 VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr)
     659 * @param   pszPrefix       Short prefix string to the disassembly string. (optional)
     660 */
     661VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr, const char *pszPrefix)
    661662{
    662663    char szBuf[256];
     
    665666    if (RT_FAILURE(rc))
    666667        RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrLog(, %RTsel, %RGv) failed with rc=%Rrc\n", Sel, GCPtr, rc);
    667     RTLogPrintf("%s\n", szBuf);
     668    if (pszPrefix && *pszPrefix)
     669        RTLogPrintf("%s-CPU%u: %s\n", pszPrefix, pVCpu->idCpu, szBuf);
     670    else
     671        RTLogPrintf("%s\n", szBuf);
    668672    return rc;
    669673}
  • trunk/src/VBox/VMM/VMMR3/PATM.cpp

    r41760 r41764  
    64686468
    64696469    Log2(("pPatchBlockGC %RRv - pEip %RRv corresponding GC address %RRv\n", PATCHCODE_PTR_GC(&pPatch->patch), pEip, pNewEip));
    6470 #ifdef LOG_ENABLED
    6471     CPUMR3DisasmInstr(pVM, pVCpu, pCtx, pNewEip, "PATCHRET: ");
    6472 #endif
     6470    DBGFR3DisasInstrLog(pVCpu, pCtx->cs, pNewEip, "PATCHRET: ");
    64736471    if (pNewEip >= pPatch->patch.pPrivInstrGC && pNewEip < pPatch->patch.pPrivInstrGC + pPatch->patch.cbPatchJump)
    64746472    {
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