VirtualBox

Ignore:
Timestamp:
Aug 14, 2013 10:33:22 AM (11 years ago)
Author:
vboxsync
Message:

More single stepping work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r47687 r47718  
    33363336        else
    33373337        {
     3338            pMixedCtx->eflags.u32 |= X86_EFL_TF;
     3339            pVCpu->hm.s.fClearTrapFlag = true;
     3340            pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_RFLAGS;
    33383341            fInterceptDB = true;
    3339             pMixedCtx->eflags.u32 |= X86_EFL_TF;
    3340             pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_RFLAGS;
    33413342        }
    33423343    }
     
    60816082
    60826083/**
     6084 * Take necessary actions before going back to ring-3.
     6085 *
    60836086 * An action requires us to go back to ring-3. This function does the necessary
    60846087 * steps before we can safely return to ring-3. This is not the same as longjmps
     
    61516154    else
    61526155        pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST;
     6156
     6157    /* Make sure we've undo the trap flag if we tried to single step something. */
     6158    if (pVCpu->hm.s.fClearTrapFlag)
     6159    {
     6160        pVCpu->hm.s.fClearTrapFlag = false;
     6161        pMixedCtx->eflags.Bits.u1TF = 0;
     6162    }
    61536163
    61546164    STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchExitToR3);
     
    96539663    AssertRCReturn(rc, rc);
    96549664
    9655     /* If we sat the trap flag above, we have to clear it. */ /** @todo HM should remember what it does and possibly do this elsewhere! */
    9656     if (   (pVCpu->hm.s.fSingleInstruction || DBGFIsStepping(pVCpu))
    9657         && !(pVCpu->CTX_SUFF(pVM)->hm.s.vmx.msr.vmx_proc_ctls.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC_MONITOR_TRAP_FLAG))
     9665    /* If we sat the trap flag above, we have to clear it. */
     9666    if (pVCpu->hm.s.fClearTrapFlag)
     9667    {
     9668        pVCpu->hm.s.fClearTrapFlag = false;
    96589669        pMixedCtx->eflags.Bits.u1TF = 0;
     9670    }
    96599671
    96609672    /* Refer Intel spec. Table 27-1. "Exit Qualifications for debug exceptions" for the format. */
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