VirtualBox

Changeset 47671 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Aug 12, 2013 11:16:55 AM (11 years ago)
Author:
vboxsync
Message:

VMM: More debugging related stuff.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/DBGFAll.cpp

    r47328 r47671  
    115115
    116116/**
     117 * Checks if any of the hardware breakpoints are armed.
     118 *
     119 * @returns true if armed, false if not.
     120 * @param   pVM         The cross context VM structure.
     121 */
     122VMM_INT_DECL(bool) DBGFBpIsHwArmed(PVM pVM)
     123{
     124    Assert(RT_ELEMENTS(pVM->dbgf.s.aHwBreakpoints) == 4);
     125    return (pVM->dbgf.s.aHwBreakpoints[0].fEnabled && pVM->dbgf.s.aHwBreakpoints[0].enmType == DBGFBPTYPE_REG)
     126        || (pVM->dbgf.s.aHwBreakpoints[1].fEnabled && pVM->dbgf.s.aHwBreakpoints[1].enmType == DBGFBPTYPE_REG)
     127        || (pVM->dbgf.s.aHwBreakpoints[2].fEnabled && pVM->dbgf.s.aHwBreakpoints[2].enmType == DBGFBPTYPE_REG)
     128        || (pVM->dbgf.s.aHwBreakpoints[3].fEnabled && pVM->dbgf.s.aHwBreakpoints[3].enmType == DBGFBPTYPE_REG);
     129}
     130
     131
     132/**
    117133 * Returns the single stepping state for a virtual CPU.
    118134 *
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r47568 r47671  
    89268926     */
    89278927    PVM pVM = IEMCPU_TO_VM(pIemCpu);
    8928     EMRemLock(pVM);
    8929     int rc = REMR3EmulateInstruction(pVM, IEMCPU_TO_VMCPU(pIemCpu));
    8930     AssertRC(rc);
    8931     EMRemUnlock(pVM);
     8928    VBOXSTRICTRC rc = VERR_EM_CANNOT_EXEC_GUEST;
     8929#if 1
     8930    if (   HMIsEnabled(pVM)
     8931        && pIemCpu->cIOReads == 0
     8932        && pIemCpu->cIOWrites == 0)
     8933        do
     8934            rc = EMR3HmSingleInstruction(pVM, IEMCPU_TO_VMCPU(pIemCpu), EM_ONE_INS_FLAGS_RIP_CHANGE);
     8935        while (rc == VINF_SUCCESS);
     8936#endif
     8937    if (   rc == VERR_EM_CANNOT_EXEC_GUEST
     8938        || rc == VINF_IOM_R3_IOPORT_READ
     8939        || rc == VINF_IOM_R3_IOPORT_WRITE
     8940        || rc == VINF_IOM_R3_MMIO_READ
     8941        || rc == VINF_IOM_R3_MMIO_READ_WRITE
     8942        || rc == VINF_IOM_R3_MMIO_WRITE
     8943        )
     8944    {
     8945        EMRemLock(pVM);
     8946        rc = REMR3EmulateInstruction(pVM, IEMCPU_TO_VMCPU(pIemCpu));
     8947        AssertRC(rc);
     8948        EMRemUnlock(pVM);
     8949    }
    89328950
    89338951    /*
     
    95509568     * See if there is an interrupt pending in TRPM and inject it if we can.
    95519569     */
    9552 #ifdef IEM_VERIFICATION_MODE_FULL
     9570#if !defined(IEM_VERIFICATION_MODE_FULL) || !defined(IN_RING3)
     9571# ifdef IEM_VERIFICATION_MODE_FULL
    95539572    pIemCpu->uInjectCpl = UINT8_MAX;
    9554 #endif
     9573# endif
    95559574    if (   pCtx->eflags.Bits.u1IF
    95569575        && TRPMHasTrap(pVCpu)
     
    95669585            TRPMResetTrap(pVCpu);
    95679586    }
     9587#else
     9588    iemExecVerificationModeSetup(pIemCpu);
     9589#endif
    95689590
    95699591    /*
     
    96099631    if (rcStrict == VINF_SUCCESS)
    96109632        rcStrict = iemExecOneInner(pVCpu, pIemCpu, true);
     9633
     9634#if defined(IEM_VERIFICATION_MODE_FULL) && defined(IN_RING3)
     9635    /*
     9636     * Assert some sanity.
     9637     */
     9638    iemExecVerificationModeCheck(pIemCpu);
     9639#endif
    96119640
    96129641    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette