diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 0d81d8eeba7..ae66cde0853 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -759,7 +759,12 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd) << "LEAVES PENDING BREAKPOINT AT" << m_pendingBreakpointRequests); } - if ((cmd.flags & NeedsStop) || !m_commandsToRunOnTemporaryBreak.isEmpty()) { + // FIXME: clean up logic below + if (cmd.flags & Immediate) { + // This should always be sent. + flushCommand(cmd); + } else if ((cmd.flags & NeedsStop) + || !m_commandsToRunOnTemporaryBreak.isEmpty()) { if (state() == InferiorStopped || state() == InferiorUnrunnable || state() == InferiorStarting || state() == AdapterStarted) { // Can be safely sent now. diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index f145002caf8..9d6760d31f1 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -193,6 +193,8 @@ private: ////////// Gdb Command Management ////////// LosesChild = 64, // Trigger breakpoint model rebuild when no such commands are pending anymore. RebuildBreakpointModel = 128, + // This command needs to be send immediately. + Immediate = 256, }; Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag) private: diff --git a/src/plugins/debugger/gdb/remotegdbadapter.cpp b/src/plugins/debugger/gdb/remotegdbadapter.cpp index 664ed9c5312..a4e24791aa5 100644 --- a/src/plugins/debugger/gdb/remotegdbadapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbadapter.cpp @@ -227,7 +227,7 @@ void RemoteGdbAdapter::startInferiorPhase2() void RemoteGdbAdapter::interruptInferior() { - m_engine->postCommand("-exec-interrupt"); + m_engine->postCommand("-exec-interrupt", GdbEngine::Immediate); } void RemoteGdbAdapter::shutdown()