Commit 50dc4d86 authored by hjk's avatar hjk
Browse files

debugger: update display on engine exit

parent ef0073f1
...@@ -376,7 +376,8 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const ...@@ -376,7 +376,8 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
switch (mi.column()) { switch (mi.column()) {
case 0: case 0:
if (role == Qt::DisplayRole) { if (role == Qt::DisplayRole) {
return QString("%1 - %2").arg(id).arg(response.bpNumber); return QString::number(id);
//return QString("%1 - %2").arg(id).arg(response.bpNumber);
} }
if (role == Qt::DecorationRole) { if (role == Qt::DecorationRole) {
if (data.isWatchpoint()) if (data.isWatchpoint())
...@@ -543,8 +544,13 @@ void BreakHandler::setState(BreakpointId id, BreakpointState state) ...@@ -543,8 +544,13 @@ void BreakHandler::setState(BreakpointId id, BreakpointState state)
{ {
Iterator it = m_storage.find(id); Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return); QTC_ASSERT(it != m_storage.end(), return);
if (it->state == state) {
qDebug() << "STATE UNCHANGED: " << id << state;
return;
}
it->state = state; it->state = state;
updateMarker(id); updateMarker(id);
layoutChanged();
} }
DebuggerEngine *BreakHandler::engine(BreakpointId id) const DebuggerEngine *BreakHandler::engine(BreakpointId id) const
...@@ -605,15 +611,13 @@ void BreakHandler::removeBreakpoint(BreakpointId id) ...@@ -605,15 +611,13 @@ void BreakHandler::removeBreakpoint(BreakpointId id)
Iterator it = m_storage.find(id); Iterator it = m_storage.find(id);
QTC_ASSERT(it != m_storage.end(), return); QTC_ASSERT(it != m_storage.end(), return);
if (it->state == BreakpointInserted) { if (it->state == BreakpointInserted) {
qDebug() << "MARK AS CHANGED: " << id; setState(id, BreakpointRemoveRequested);
it->state = BreakpointRemoveRequested;
QTC_ASSERT(it->engine, return);
debuggerCore()->synchronizeBreakpoints();
} else if (it->state == BreakpointNew) { } else if (it->state == BreakpointNew) {
it->state = BreakpointDead; it->state = BreakpointDead;
cleanupBreakpoint(id); cleanupBreakpoint(id);
} else { } else {
qDebug() << "CANNOT REMOVE IN STATE " << it->state; qDebug() << "CANNOT REMOVE IN STATE " << it->state;
it->state = BreakpointRemoveRequested;
} }
} }
...@@ -826,6 +830,7 @@ void BreakHandler::notifyBreakpointReleased(BreakpointId id) ...@@ -826,6 +830,7 @@ void BreakHandler::notifyBreakpointReleased(BreakpointId id)
delete it->marker; delete it->marker;
it->marker = 0; it->marker = 0;
updateMarker(id); updateMarker(id);
layoutChanged();
} }
void BreakHandler::cleanupBreakpoint(BreakpointId id) void BreakHandler::cleanupBreakpoint(BreakpointId id)
......
...@@ -2308,7 +2308,7 @@ void GdbEngine::handleBreakEnable(const GdbResponse &response) ...@@ -2308,7 +2308,7 @@ void GdbEngine::handleBreakEnable(const GdbResponse &response)
{ {
QTC_ASSERT(response.resultClass == GdbResultDone, /**/) QTC_ASSERT(response.resultClass == GdbResultDone, /**/)
const BreakpointId id = response.cookie.toInt(); const BreakpointId id = response.cookie.toInt();
// This should only be the "wish" state. // This should only be the requested state.
QTC_ASSERT(breakHandler()->isEnabled(id), /* Prevent later recursion */); QTC_ASSERT(breakHandler()->isEnabled(id), /* Prevent later recursion */);
breakHandler()->ackEnabled(id); breakHandler()->ackEnabled(id);
} }
......
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