Commit 0ea0977c authored by hjk's avatar hjk

debugger: introduce a new category for commands that are always immediately executed

used for -exec-interrupt right now
parent d8cc842d
......@@ -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.
......
......@@ -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:
......
......@@ -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()
......
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