| 426 | } |
| 427 | |
| 428 | void 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 | |
| 474 | void MIBreakpointController::recalculateState(int row) |
| 475 | { |
no test coverage detected