Commit 0ae94ffc authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger[CDB]: Fix breakpoint context menu for CDB.

Immediately report known data back when settings breakpoints
so that line number/enabled is correct in the handler.
parent 46da4066
......@@ -2366,11 +2366,16 @@ void CdbEngine::attemptBreakpointSynchronization()
m_pendingBreakpointMap.insert(id, response);
addedChanged = true;
// Ensure enabled/disabled is correct in handler and line number is there.
handler->setResponse(id, response);
if (debugBreakpoints)
qDebug("Adding %llu %s\n", id, qPrintable(response.toString()));
case BreakpointChangeRequested:
if (debugBreakpoints)
qDebug("Changing %llu:\n %s\nTo %s\n", id, qPrintable(handler->response(id).toString()),
if (parameters.enabled != handler->response(id).enabled) {
// Change enabled/disabled breakpoints without triggering update.
postCommand((parameters.enabled ? "be " : "bd ") + QByteArray::number(id), 0);
......@@ -2385,8 +2390,6 @@ void CdbEngine::attemptBreakpointSynchronization()
m_pendingBreakpointMap.insert(id, response);
if (debugBreakpoints)
qDebug("Changing %llu %s\n", id, qPrintable(response.toString()));
case BreakpointRemoveRequested:
postCommand("bc " + QByteArray::number(id), 0);
......@@ -2639,6 +2642,8 @@ void CdbEngine::handleBreakPoints(const GdbMi &value)
currentResponse.pending = reportedResponse.pending;
currentResponse.enabled = reportedResponse.enabled;
formatCdbBreakPointResponse(id, currentResponse, str);
if (debugBreakpoints)
qDebug(" Setting for %llu: %s\n", id, qPrintable(currentResponse.toString()));
handler->setResponse(id, currentResponse);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment