MCPcopy Create free account
hub / github.com/beefytech/Beef / UpdateBreakpoints

Method UpdateBreakpoints

IDEHelper/Compiler/CeDebugger.cpp:1336–1442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334}
1335
1336void CeDebugger::UpdateBreakpoints(CeFunction* ceFunction)
1337{
1338 AutoCrit autoCrit(mCeMachine->mCritSect);
1339
1340 UpdateBreakpointCache();
1341
1342 ceFunction->UnbindBreakpoints();
1343
1344 String path;
1345 int scope = -1;
1346 CeFileInfo* ceFileInfo = NULL;
1347
1348 BitSet usedBreakpointSet(mBreakpoints.mSize);
1349
1350 for (auto& emitEntry : ceFunction->mEmitTable)
1351 {
1352 if (emitEntry.mScope != scope)
1353 {
1354 if (emitEntry.mScope != -1)
1355 {
1356 path = FixPathAndCase(ceFunction->mDbgScopes[emitEntry.mScope].mFilePath);
1357 if (!mFileInfo.TryGetValue(path, &ceFileInfo))
1358 ceFileInfo = NULL;
1359 }
1360 else
1361 ceFileInfo = NULL;
1362 scope = emitEntry.mScope;
1363 }
1364
1365 if (ceFileInfo != NULL)
1366 {
1367 int idx = ceFileInfo->mOrderedBreakpoints.BinarySearchAlt<int>(emitEntry.mLine, CompareBreakpoint);
1368 if (idx < 0)
1369 idx = ~idx - 1;
1370
1371 while (idx > 0)
1372 {
1373 auto breakpoint = ceFileInfo->mOrderedBreakpoints[idx - 1];
1374 if (breakpoint->mLineNum < emitEntry.mLine)
1375 break;
1376 idx--;
1377 }
1378
1379 int tryBindCount = 0;
1380 int bestRequestedBindLine = 0;
1381
1382 while ((idx >= 0) && (idx < ceFileInfo->mOrderedBreakpoints.mSize))
1383 {
1384 auto breakpoint = ceFileInfo->mOrderedBreakpoints[idx];
1385 if (usedBreakpointSet.IsSet(breakpoint->mIdx))
1386 {
1387 idx++;
1388 continue;
1389 }
1390 CeBreakpointBind* breakpointBind = NULL;
1391
1392 if (tryBindCount > 0)
1393 {

Callers 1

ExecuteMethod · 0.80

Calls 6

UnbindBreakpointsMethod · 0.80
TryGetValueMethod · 0.80
GetInstSizeMethod · 0.80
IsSetMethod · 0.45
TryAddMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected