forked from qt-creator/qt-creator
Debugger[CDB]: Move breakpoint back from corrected location.
Make it fully work. Task-number: QTCREATORBUG-4842
This commit is contained in:
@@ -781,6 +781,15 @@ static bool isAllowedTransition(BreakpointState from, BreakpointState to)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BreakHandler::isEngineRunning(BreakpointId id) const
|
||||||
|
{
|
||||||
|
if (const DebuggerEngine *e = engine(id)) {
|
||||||
|
const DebuggerState state = e->state();
|
||||||
|
return state != DebuggerFinished && state != DebuggerNotReady;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void BreakHandler::setState(BreakpointId id, BreakpointState state)
|
void BreakHandler::setState(BreakpointId id, BreakpointState state)
|
||||||
{
|
{
|
||||||
Iterator it = m_storage.find(id);
|
Iterator it = m_storage.find(id);
|
||||||
@@ -1028,10 +1037,8 @@ void BreakHandler::updateLineNumberFromMarker(BreakpointId id, int lineNumber)
|
|||||||
// Ignore updates to the "real" line number while the debugger is
|
// Ignore updates to the "real" line number while the debugger is
|
||||||
// running, as this can be triggered by moving the breakpoint to
|
// running, as this can be triggered by moving the breakpoint to
|
||||||
// the next line that generated code.
|
// the next line that generated code.
|
||||||
if (it->response.number == 0) {
|
if (!isEngineRunning(id))
|
||||||
// FIXME: Do we need yet another data member?
|
|
||||||
it->data.lineNumber = lineNumber;
|
it->data.lineNumber = lineNumber;
|
||||||
}
|
|
||||||
updateMarker(id);
|
updateMarker(id);
|
||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
}
|
}
|
||||||
|
@@ -168,6 +168,7 @@ private:
|
|||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
|
|
||||||
|
bool isEngineRunning(BreakpointId id) const;
|
||||||
void setState(BreakpointId id, BreakpointState state);
|
void setState(BreakpointId id, BreakpointState state);
|
||||||
void loadBreakpoints();
|
void loadBreakpoints();
|
||||||
void saveBreakpoints();
|
void saveBreakpoints();
|
||||||
|
Reference in New Issue
Block a user