diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index c36c84982261623cf3684201d6f40d08a36fa3ef..ea41564d0f67bec659fc860a9ce4bbf6a676d06d 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2213,6 +2213,14 @@ void GdbEngine::handleBreakList(const GdbMi &table) m_breakListOutdated = false; } +void GdbEngine::handleBreakDisable(const GdbResponse &response) +{ + BreakHandler *handler = manager()->breakHandler(); + if (response.resultClass == GdbResultDone) { + handler->updateMarkers(); + } +} + void GdbEngine::handleBreakIgnore(const GdbResponse &response) { int index = response.cookie.toInt(); @@ -2421,24 +2429,30 @@ void GdbEngine::attemptBreakpointSynchronization() } else if (data->bpNumber.toInt()) { if (data->bpMultiple && data->bpFileName.isEmpty()) { postCommand("info break " + data->bpNumber, - RebuildBreakpointModel, + NeedsStop | RebuildBreakpointModel, CB(handleBreakInfo), data->bpNumber.toInt()); continue; } - // update conditions if needed - if (data->condition != data->bpCondition && !data->conditionsMatch()) + if (data->condition != data->bpCondition && !data->conditionsMatch()) { + // Update conditions if needed. postCommand("condition " + data->bpNumber + ' ' + data->condition, - RebuildBreakpointModel, + NeedsStop | RebuildBreakpointModel, CB(handleBreakCondition), index); - // update ignorecount if needed - if (data->ignoreCount != data->bpIgnoreCount) + } + else // Because gdb won't do both changes at a time anyway. + if (data->ignoreCount != data->bpIgnoreCount) { + // Update ignorecount if needed. postCommand("ignore " + data->bpNumber + ' ' + data->ignoreCount, - RebuildBreakpointModel, + NeedsStop | RebuildBreakpointModel, CB(handleBreakIgnore), index); + continue; + } if (!data->enabled && data->bpEnabled) { postCommand("-break-disable " + data->bpNumber, - NeedsStop | RebuildBreakpointModel); + NeedsStop | RebuildBreakpointModel, + CB(handleBreakInfo)); data->bpEnabled = false; + continue; } } } diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 0c2de9a7b4b62444343fe0733500cb28441cfdff..8cc9d3af4f74a0db67b5128774b0f915117dbf68 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -337,6 +337,7 @@ private: ////////// View & Data Stuff ////////// void handleBreakList(const GdbResponse &response); void handleBreakList(const GdbMi &table); void handleBreakIgnore(const GdbResponse &response); + void handleBreakDisable(const GdbResponse &response); void handleBreakInsert1(const GdbResponse &response); void handleBreakInsert2(const GdbResponse &response); void handleBreakCondition(const GdbResponse &response);