diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index d333b09f15c6f687f19391e5d66d2c8ccc59f132..5a04bbf23680065358a2be8ca565b3b869b6e2e8 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2493,106 +2493,6 @@ bool GdbEngine::stateAcceptsBreakpointChanges() const } } -/* -void GdbEngine::attemptBreakpointSynchronization() -{ - QTC_ASSERT(!m_sourcesListUpdating, - qDebug() << "SOURCES LIST CURRENTLY UPDATING"; return); - showMessage(_("ATTEMPT BREAKPOINT SYNC")); - - // We don't have breakpoints in core files. - if (startParameters().startMode == AttachCore) - return; - - switch (state()) { - case InferiorSetupRequested: - case InferiorRunRequested: - case InferiorRunOk: - case InferiorStopRequested: - case InferiorStopOk: - break; - default: - //qDebug() << "attempted breakpoint sync in state" << state(); - showMessage(_("... NOT POSSIBLE IN CURRENT STATE")); - return; - } - - if (m_breakListOutdated) { - reloadBreakListInternal(); - return; - } - - BreakHandler *handler = breakHandler(); - - foreach (BreakpointData *data, handler->takeDisabledBreakpoints()) { - QByteArray bpNumber = data->bpNumber; - if (!bpNumber.trimmed().isEmpty()) { - postCommand("-break-disable " + bpNumber, - NeedsStop | RebuildBreakpointModel); - data->bpEnabled = false; - } - } - - foreach (BreakpointData *data, handler->takeEnabledBreakpoints()) { - QByteArray bpNumber = data->bpNumber; - if (!bpNumber.trimmed().isEmpty()) { - postCommand("-break-enable " + bpNumber, - NeedsStop | RebuildBreakpointModel); - data->bpEnabled = true; - } - } - - for (int index = 0; index != handler->size(); ++index) { - BreakpointData *data = handler->at(index); - if (data->bpNumber.isEmpty()) { // Unset breakpoint? - data->bpNumber = " "; // Sent, but no feedback yet. - sendInsertBreakpoint(index); - } else if (data->bpNumber.toInt()) { - if (data->bpMultiple && data->bpFileName.isEmpty()) { - postCommand("info break " + data->bpNumber, - NeedsStop | RebuildBreakpointModel, - CB(handleBreakInfo), id); - continue; - } - if (data->condition != data->bpCondition && !data->conditionsMatch()) { - // Update conditions if needed. - postCommand("condition " + data->bpNumber + ' ' + data->condition, - NeedsStop | RebuildBreakpointModel, - CB(handleBreakCondition), id); - } - else // Because gdb won't do both changes at a time anyway. - if (data->ignoreCount != data->bpIgnoreCount) { - // Update ignorecount if needed. - QByteArray ic = QByteArray::number(data->ignoreCount); - postCommand("ignore " + data->bpNumber + ' ' + ic, - NeedsStop | RebuildBreakpointModel, - CB(handleBreakIgnore), id); - continue; - } - if (!data->enabled && data->bpEnabled) { - postCommand("-break-disable " + data->bpNumber, - NeedsStop | RebuildBreakpointModel, - CB(handleBreakDisable), id); - data->bpEnabled = false; - continue; - } - if (data->threadSpec != data->bpThreadSpec && !data->bpNumber.isEmpty()) { - // The only way to change this seems to be to re-set the bp completely. - //qDebug() << "FIXME: THREAD: " << data->threadSpec << data->bpThreadSpec; - data->bpThreadSpec.clear(); - postCommand("-break-delete " + data->bpNumber, - NeedsStop | RebuildBreakpointModel); - sendInsertBreakpoint(index); - continue; - } - } - } - - handler->updateMarkers(); -} -*/ - - bool GdbEngine::acceptsBreakpoint(BreakpointId id) const { return DebuggerEngine::isCppBreakpoint(breakHandler()->breakpointData(id));