VirtualBox

Changeset 58909 in vbox for trunk/src/VBox/VMM/VMMRZ


Ignore:
Timestamp:
Nov 29, 2015 7:23:46 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104409
Message:

DBGF: More groundwork for port I/O, MMIO, interrupt and generic event breakpoints.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRZ/DBGFRZ.cpp

    r58903 r58909  
    5757     * A breakpoint?
    5858     */
    59     if (uDr6 & (X86_DR6_B0 | X86_DR6_B1 | X86_DR6_B2 | X86_DR6_B3))
     59    AssertCompile(X86_DR6_B0 == 1 && X86_DR6_B1 == 2 && X86_DR6_B2 == 4 && X86_DR6_B3 == 8);
     60    if (   (uDr6 & (X86_DR6_B0 | X86_DR6_B1 | X86_DR6_B2 | X86_DR6_B3))
     61        && pVM->dbgf.s.cEnabledHwBreakpoints > 0)
    6062    {
    61         Assert(X86_DR6_B0 == 1 && X86_DR6_B1 == 2 && X86_DR6_B2 == 4 && X86_DR6_B3 == 8);
    6263        for (unsigned iBp = 0; iBp < RT_ELEMENTS(pVM->dbgf.s.aHwBreakpoints); iBp++)
    6364        {
     
    125126     * Don't bother if we don't have any breakpoints.
    126127     */
    127     if (pVM->dbgf.s.cBreakpoints > 0)
     128    unsigned cToSearch = pVM->dbgf.s.Int3.cToSearch;
     129    if (cToSearch > 0)
    128130    {
    129131        RTGCPTR pPc;
     
    137139        AssertRCReturn(rc, rc);
    138140
    139         for (unsigned iBp = 0; iBp < RT_ELEMENTS(pVM->dbgf.s.aBreakpoints); iBp++)
     141        unsigned iBp = pVM->dbgf.s.Int3.iStartSearch;
     142        while (cToSearch-- > 0)
    140143        {
    141             if (    pVM->dbgf.s.aBreakpoints[iBp].u.GCPtr == (RTGCUINTPTR)pPc
    142                 &&  pVM->dbgf.s.aBreakpoints[iBp].enmType == DBGFBPTYPE_INT3)
     144            if (   pVM->dbgf.s.aBreakpoints[iBp].u.GCPtr == (RTGCUINTPTR)pPc
     145                && pVM->dbgf.s.aBreakpoints[iBp].enmType == DBGFBPTYPE_INT3)
    143146            {
    144147                pVM->dbgf.s.aBreakpoints[iBp].cHits++;
     
    152155                     : VINF_EM_DBG_BREAKPOINT;
    153156            }
     157            iBp++;
    154158        }
    155159    }
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