From c81407f28db0df84906984dd6a4e5d665df6070c Mon Sep 17 00:00:00 2001 From: hjk <hjk@theqtcompany.com> Date: Thu, 16 Jul 2015 08:49:43 +0200 Subject: [PATCH] Debugger: Lift restriction one-shot breakpoints deletion This was/is a workaround to not lose the extra information carefully crafted one-shot-breakpoints might carry (e.g. conditions). However, it gets into the way when simple one-shot breakpoints are used automatically ("Jump to line", or native-mixed debugging), so actually deleting the bp in the ui if it's gone on the debugger side seems the lesser evil nowadays. Change-Id: If00dc4e8f27881236c05b17109b57d7c53d424ab Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> --- src/plugins/debugger/breakhandler.cpp | 1 + src/plugins/debugger/gdb/gdbengine.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 969b011a9c5..baaef60d340 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -802,6 +802,7 @@ bool Breakpoint::isOneShot() const { return parameters().oneShot; } void Breakpoint::removeAlienBreakpoint() { + b->m_state = BreakpointRemoveProceeding; b->deleteThis(); } diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 16a2300247c..99135a09a71 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -598,8 +598,9 @@ void GdbEngine::handleResponse(const QByteArray &buff) // This also triggers when a temporary breakpoint is hit. // We do not really want that, as this loses all information. // FIXME: Use a special marker for this case? - if (!bp.isOneShot()) - bp.removeAlienBreakpoint(); + // if (!bp.isOneShot()) ... is not sufficient. + // It keeps temporary "Jump" breakpoints alive. + bp.removeAlienBreakpoint(); } } else if (asyncClass == "cmd-param-changed") { // New since 2012-08-09 -- GitLab