Returns true if a register breakpoint is triggered ===========================================================================
| 1481 | // Returns true if a register breakpoint is triggered |
| 1482 | //=========================================================================== |
| 1483 | int CheckBreakpointsReg () |
| 1484 | { |
| 1485 | int iAnyBreakpointHit = 0; |
| 1486 | |
| 1487 | for (int iBreakpoint = 0; iBreakpoint < MAX_BREAKPOINTS; iBreakpoint++) |
| 1488 | { |
| 1489 | Breakpoint_t *pBP = &g_aBreakpoints[iBreakpoint]; |
| 1490 | |
| 1491 | if (! _BreakpointValid( pBP )) |
| 1492 | continue; |
| 1493 | |
| 1494 | bool bBreakpointHit = false; |
| 1495 | |
| 1496 | switch (pBP->eSource) |
| 1497 | { |
| 1498 | case BP_SRC_REG_PC: |
| 1499 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.pc ); |
| 1500 | break; |
| 1501 | case BP_SRC_REG_A: |
| 1502 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.a ); |
| 1503 | break; |
| 1504 | case BP_SRC_REG_X: |
| 1505 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.x ); |
| 1506 | break; |
| 1507 | case BP_SRC_REG_Y: |
| 1508 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.y ); |
| 1509 | break; |
| 1510 | case BP_SRC_REG_P: |
| 1511 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.ps ); |
| 1512 | break; |
| 1513 | case BP_SRC_REG_S: |
| 1514 | bBreakpointHit = _CheckBreakpointValue( pBP, regs.sp ); |
| 1515 | break; |
| 1516 | default: |
| 1517 | break; |
| 1518 | } |
| 1519 | |
| 1520 | if (bBreakpointHit) |
| 1521 | { |
| 1522 | iAnyBreakpointHit = HitBreakpoint(pBP, BP_HIT_REG, iBreakpoint); |
| 1523 | // Don't break - instead process all BPs so that all pBP->nHitCount's are correct |
| 1524 | } |
| 1525 | } |
| 1526 | |
| 1527 | return iAnyBreakpointHit; |
| 1528 | } |
| 1529 | |
| 1530 | // Returns true if a video breakpoint is triggered |
| 1531 | //=========================================================================== |
no test coverage detected