Commit cc2829fc authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: update bp target line when editing file while engine running

Task-number: QTCREATORBUG-2314
Change-Id: If79f3aa70f932b82905351828b28fde42824c90e
Reviewed-on: http://codereview.qt.nokia.com/303

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 978883a5
......@@ -1048,15 +1048,17 @@ void BreakHandler::updateLineNumberFromMarker(BreakpointId id, int lineNumber)
Iterator it = m_storage.find(id);
it->response.pending = false;
BREAK_ASSERT(it != m_storage.end(), return);
if (it->response.lineNumber != lineNumber) {
// FIXME: Should we tell gdb about the change?
it->response.lineNumber = lineNumber;
}
// Ignore updates to the "real" line number while the debugger is
// running, as this can be triggered by moving the breakpoint to
// the next line that generated code.
if (!isEngineRunning(id))
if (isEngineRunning(id))
it->data.lineNumber += lineNumber - it->response.lineNumber;
else
it->data.lineNumber = lineNumber;
if (it->response.lineNumber != lineNumber) {
// FIXME: Should we tell gdb about the change?
it->response.lineNumber = lineNumber;
}
updateMarker(id);
emit layoutChanged();
}
......
Supports Markdown
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