diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index f4d0188f26c..624c50cce23 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -579,6 +579,23 @@ QVariant BreakpointItem::data(int column, int role) const break; }; + if (role == Qt::ForegroundRole) { + static const QVariant gray(QColor(140, 140, 140)); + switch (m_state) { + case BreakpointInsertRequested: + case BreakpointInsertProceeding: + case BreakpointChangeRequested: + case BreakpointChangeProceeding: + case BreakpointRemoveRequested: + case BreakpointRemoveProceeding: + return gray; + case BreakpointInserted: + case BreakpointNew: + case BreakpointDead: + break; + }; + } + switch (column) { case 0: if (role == Qt::DisplayRole) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 019ebaad858..1f553a02308 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2617,6 +2617,15 @@ void GdbEngine::handleBreakInsert2(const GdbResponse &response) } } +void GdbEngine::handleBreakDelete(const GdbResponse &response) +{ + Breakpoint bp = response.cookie.value(); + if (response.resultClass == GdbResultDone) + bp.notifyBreakpointRemoveOk(); + else + bp.notifyBreakpointRemoveFailed(); +} + void GdbEngine::handleBreakDisable(const GdbResponse &response) { QTC_CHECK(response.resultClass == GdbResultDone); @@ -2900,14 +2909,13 @@ void GdbEngine::removeBreakpoint(Breakpoint bp) } if (br.id.isValid()) { + QVariant vid = QVariant::fromValue(bp); // We already have a fully inserted breakpoint. bp.notifyBreakpointRemoveProceeding(); showMessage(_("DELETING BP %1 IN %2").arg(br.id.toString()).arg(bp.fileName())); postCommand("-break-delete " + br.id.toByteArray(), - NeedsStop | RebuildBreakpointModel); - // Pretend it succeeds without waiting for response. Feels better. - // FIXME: Really? - bp.notifyBreakpointRemoveOk(); + NeedsStop | RebuildBreakpointModel, + CB(handleBreakDelete), vid); } else { // Breakpoint was scheduled to be inserted, but we haven't had // an answer so far. Postpone activity by doing nothing. diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index e029fd259c2..f18da951c76 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -311,6 +311,7 @@ private: ////////// View & Data Stuff ////////// void handleBreakEnable(const GdbResponse &response); void handleBreakInsert1(const GdbResponse &response); void handleBreakInsert2(const GdbResponse &response); + void handleBreakDelete(const GdbResponse &response); void handleTraceInsert2(const GdbResponse &response); void handleBreakCondition(const GdbResponse &response); void handleBreakThreadSpec(const GdbResponse &response);