Changeset 19639 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 12, 2009 3:22:14 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r19636 r19639 1437 1437 { 1438 1438 char szInstruction[256]; 1439 int rc = DBGFR3DisasInstrCurrent(pVM, szInstruction, sizeof(szInstruction)); 1439 /* @todo SMP support! */ 1440 PVMCPU pVCpu = VMMGetCpu(pVM); 1441 if (!pVCpu) 1442 pVCpu = &pVM->aCpus[0]; 1443 1444 int rc = DBGFR3DisasInstrCurrent(pVCpu, szInstruction, sizeof(szInstruction)); 1440 1445 if (RT_SUCCESS(rc)) 1441 1446 pHlp->pfnPrintf(pHlp, "\nCPUM: %s\n\n", szInstruction); -
trunk/src/VBox/VMM/DBGFDisas.cpp
r19463 r19639 582 582 * 583 583 * @returns VBox status code. 584 * @param pV M VMhandle.584 * @param pVCpu VMCPU handle. 585 585 * @param pszOutput Output buffer. 586 586 * @param cchOutput Size of the output buffer. 587 587 */ 588 VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVM pVM, char *pszOutput, uint32_t cchOutput)588 VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cchOutput) 589 589 { 590 590 *pszOutput = '\0'; 591 PVMCPU pVCpu = VMMGetCpu(pVM);592 591 AssertReturn(pVCpu, VERR_INVALID_CONTEXT); 593 return DBGFR3DisasInstrEx(pV M, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_GUEST,592 return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, DBGF_DISAS_FLAGS_CURRENT_GUEST, 594 593 pszOutput, cchOutput, NULL); 595 594 } … … 601 600 * 602 601 * @returns VBox status code. 603 * @param pV M VMhandle.602 * @param pVCpu VMCPU handle. 604 603 * @param pszPrefix Short prefix string to the dissassembly string. (optional) 605 604 */ 606 VMMR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVM pVM, const char *pszPrefix)605 VMMR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVMCPU pVCpu, const char *pszPrefix) 607 606 { 608 607 char szBuf[256]; 609 608 szBuf[0] = '\0'; 610 int rc = DBGFR3DisasInstrCurrent(pV M, &szBuf[0], sizeof(szBuf));609 int rc = DBGFR3DisasInstrCurrent(pVCpu, &szBuf[0], sizeof(szBuf)); 611 610 if (RT_FAILURE(rc)) 612 611 RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrCurrentLog failed with rc=%Rrc\n", rc); … … 631 630 * @param GCPtr The code address relative to the base of Sel. 632 631 */ 633 VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVM pVM, RTSEL Sel, RTGCPTR GCPtr) 634 { 635 PVMCPU pVCpu = VMMGetCpu(pVM); 636 AssertReturn(pVCpu, VERR_INVALID_CONTEXT); 637 632 VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr) 633 { 638 634 char szBuf[256]; 639 635 szBuf[0] = '\0'; 640 int rc = DBGFR3DisasInstrEx(pV M, pVCpu->idCpu, Sel, GCPtr, 0, &szBuf[0], sizeof(szBuf), NULL);636 int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, 0, &szBuf[0], sizeof(szBuf), NULL); 641 637 if (RT_FAILURE(rc)) 642 638 RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrLog(, %RTsel, %RGv) failed with rc=%Rrc\n", Sel, GCPtr, rc); -
trunk/src/VBox/VMM/EM.cpp
r19613 r19639 1246 1246 { 1247 1247 DBGFR3PrgStep(pVCpu); 1248 DBGFR3DisasInstrCurrentLog(pV M, "RSS: ");1248 DBGFR3DisasInstrCurrentLog(pVCpu, "RSS: "); 1249 1249 rc = emR3RawStep(pVM, pVCpu); 1250 1250 if (rc != VINF_SUCCESS) … … 1268 1268 { 1269 1269 DBGFR3PrgStep(pVCpu); 1270 DBGFR3DisasInstrCurrentLog(pV M, "RSS: ");1270 DBGFR3DisasInstrCurrentLog(pVCpu, "RSS: "); 1271 1271 rc = emR3HwAccStep(pVM, pVCpu); 1272 1272 if ( rc != VINF_SUCCESS … … 1291 1291 { 1292 1292 DBGFR3PrgStep(pVCpu); 1293 DBGFR3DisasInstrCurrentLog(pV M, "RSS: ");1293 DBGFR3DisasInstrCurrentLog(pVCpu, "RSS: "); 1294 1294 emR3RemStep(pVM, pVCpu); 1295 1295 if (emR3Reschedule(pVM, pVCpu, pVCpu->em.s.pCtx) != EMSTATE_REM) … … 1340 1340 { 1341 1341 DBGFR3InfoLog(pVM, "cpumguest", pszPrefix); 1342 DBGFR3DisasInstrCurrentLog(pV M, pszPrefix);1342 DBGFR3DisasInstrCurrentLog(pVCpu, pszPrefix); 1343 1343 } 1344 1344 #endif /* LOG_ENABLED */ … … 1619 1619 #ifdef LOGGING_ENABLED 1620 1620 DBGFR3InfoLog(pVM, "cpumguest", "Guest trap"); 1621 DBGFR3DisasInstrCurrentLog(pV M, "Guest trap");1621 DBGFR3DisasInstrCurrentLog(pVCpu, "Guest trap"); 1622 1622 #endif 1623 1623 return VINF_EM_RESCHEDULE_HWACC; … … 1742 1742 #ifdef LOG_ENABLED 1743 1743 DBGFR3InfoLog(pVM, "cpumguest", "Guest trap"); 1744 DBGFR3DisasInstrCurrentLog(pV M, "Guest trap");1744 DBGFR3DisasInstrCurrentLog(pVCpu, "Guest trap"); 1745 1745 1746 1746 /* Get guest page information. */ … … 1793 1793 if (RT_SUCCESS(rc)) 1794 1794 { 1795 DBGFR3DisasInstrCurrentLog(pV M, "Patched sysenter instruction");1795 DBGFR3DisasInstrCurrentLog(pVCpu, "Patched sysenter instruction"); 1796 1796 return VINF_EM_RESCHEDULE_RAW; 1797 1797 } … … 1877 1877 #ifdef LOG_ENABLED 1878 1878 DBGFR3InfoLog(pVM, "cpumguest", "Trap in patch code"); 1879 DBGFR3DisasInstrCurrentLog(pV M, "Patch code");1879 DBGFR3DisasInstrCurrentLog(pVCpu, "Patch code"); 1880 1880 1881 1881 DISCPUSTATE Cpu; … … 2049 2049 DBGFR3InfoLog(pVM, "cpumguest", "PRIV"); 2050 2050 #endif 2051 DBGFR3DisasInstrCurrentLog(pV M, "Patched privileged instruction");2051 DBGFR3DisasInstrCurrentLog(pVCpu, "Patched privileged instruction"); 2052 2052 return VINF_SUCCESS; 2053 2053 } … … 2059 2059 { 2060 2060 DBGFR3InfoLog(pVM, "cpumguest", "PRIV"); 2061 DBGFR3DisasInstrCurrentLog(pV M, "Privileged instr: ");2061 DBGFR3DisasInstrCurrentLog(pVCpu, "Privileged instr: "); 2062 2062 } 2063 2063 #endif … … 2201 2201 { 2202 2202 DBGFR3InfoLog(pVM, "cpumguest", "PRIV"); 2203 DBGFR3DisasInstrCurrentLog(pV M, "Privileged instr: ");2203 DBGFR3DisasInstrCurrentLog(pVCpu, "Privileged instr: "); 2204 2204 } 2205 2205 #endif -
trunk/src/VBox/VMM/TRPM.cpp
r19286 r19639 1451 1451 # ifdef LOG_ENABLED 1452 1452 DBGFR3InfoLog(pVM, "cpumguest", "TRPMInject"); 1453 DBGFR3DisasInstrCurrentLog(pV M, "TRPMInject");1453 DBGFR3DisasInstrCurrentLog(pVCpu, "TRPMInject"); 1454 1454 # endif 1455 1455
Note:
See TracChangeset
for help on using the changeset viewer.