MCPcopy Create free account
hub / github.com/KDE/kdevelop / sendUpdates

Method sendUpdates

plugins/debuggercommon/mibreakpointcontroller.cpp:428–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void MIBreakpointController::sendUpdates(int row)
429{
430 if (debugSession()->debuggerStateIsOn(s_dbgNotStarted))
431 return;
432
433 BreakpointDataPtr breakpoint = m_breakpoints.at(row);
434 Breakpoint* modelBreakpoint = breakpointModel()->breakpoint(row);
435
436 Q_ASSERT(breakpoint->debuggerId >= 0 && breakpoint->sent == 0);
437
438 if (breakpoint->dirty & BreakpointModel::LocationColumnFlag) {
439 // Gdb considers locations as fixed, so delete and re-create the breakpoint
440 debugSession()->addCommand(BreakDelete,
441 QString::number(breakpoint->debuggerId), CmdImmediately);
442 breakpoint->debuggerId = -1;
443 createBreakpoint(row);
444 return;
445 }
446
447 if (breakpoint->dirty & BreakpointModel::EnableColumnFlag) {
448 debugSession()->addCommand(modelBreakpoint->enabled() ? BreakEnable : BreakDisable,
449 QString::number(breakpoint->debuggerId),
450 new UpdateHandler(this, breakpoint,
451 BreakpointModel::EnableColumnFlag),
452 CmdImmediately);
453 }
454 if (breakpoint->dirty & BreakpointModel::IgnoreHitsColumnFlag) {
455 debugSession()->addCommand(BreakAfter,
456 QStringLiteral("%0 %1").arg(breakpoint->debuggerId)
457 .arg(modelBreakpoint->ignoreHits()),
458 new UpdateHandler(this, breakpoint,
459 BreakpointModel::IgnoreHitsColumnFlag),
460 CmdImmediately);
461 }
462 if (breakpoint->dirty & BreakpointModel::ConditionColumnFlag) {
463 debugSession()->addCommand(BreakCondition,
464 QStringLiteral("%0 %1").arg(breakpoint->debuggerId)
465 .arg(modelBreakpoint->condition()),
466 new UpdateHandler(this, breakpoint,
467 BreakpointModel::ConditionColumnFlag),
468 CmdImmediately);
469 }
470
471 recalculateState(row);
472}
473
474void MIBreakpointController::recalculateState(int row)
475{

Callers 2

handleMethod · 0.80
handleMethod · 0.80

Calls 8

breakpointModelFunction · 0.85
debuggerStateIsOnMethod · 0.80
breakpointMethod · 0.80
enabledMethod · 0.80
ignoreHitsMethod · 0.80
conditionMethod · 0.80
addCommandMethod · 0.60
atMethod · 0.45

Tested by

no test coverage detected