MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / _CheckBreakpointRange

Function _CheckBreakpointRange

source/Debugger/Debug.cpp:1346–1377  ·  view source on GitHub ↗

=========================================================================== Only called by DebuggerCheckMemBreakpoints()

Source from the content-addressed store, hash-verified

1344//===========================================================================
1345// Only called by DebuggerCheckMemBreakpoints()
1346bool _CheckBreakpointRange (Breakpoint_t* pBP, int nVal, int nSize)
1347{
1348 bool bStatus = false;
1349
1350 int iCmp = pBP->eOperator;
1351 switch (iCmp)
1352 {
1353 case BP_OP_EQUAL: // Range is like C++ STL: [,) (inclusive,not-inclusive)
1354 if ( ((nVal >= pBP->nAddress) && ((UINT)nVal < (pBP->nAddress + pBP->nLength))) ||
1355 ((pBP->nAddress >= nVal) && (pBP->nAddress < ((UINT)nVal + nSize))) )
1356 bStatus = true;
1357 break;
1358 default:
1359 _ASSERT(0);
1360 break;
1361 }
1362
1363 if (!bStatus)
1364 return false;
1365
1366 // Now check the range (at 256 byte intervals) with full addr prefix
1367 WORD checkAddr = nVal;
1368 while (checkAddr < (nVal + nSize))
1369 {
1370 bStatus = _CheckBreakpointValueWithPrefix(pBP, checkAddr);
1371 if (bStatus)
1372 break;
1373 checkAddr += _6502_PAGE_SIZE;
1374 }
1375
1376 return bStatus;
1377}
1378
1379//===========================================================================
1380

Callers 1

Calls 1

Tested by

no test coverage detected