Commit 3488b044 authored by hjk's avatar hjk
Browse files

debugger: fix state after error output to -exec-interrupt

Task-number: QTCREATORBUG-2850
parent 1eeb35cf
......@@ -273,9 +273,21 @@ void RemoteGdbServerAdapter::runEngine()
void RemoteGdbServerAdapter::interruptInferior()
{
// FIXME: On some gdb versions like git 170ffa5d7dd this produces
// >810^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
m_engine->postCommand("-exec-interrupt", GdbEngine::Immediate);
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state());
m_engine->postCommand("-exec-interrupt", GdbEngine::Immediate,
CB(handleInterruptInferior));
}
void RemoteGdbServerAdapter::handleInterruptInferior(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
// The gdb server will trigger extra output that we will pick up
// to do a proper state transition.
} else {
// FIXME: On some gdb versions like git 170ffa5d7dd this produces
// >810^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
m_engine->notifyInferiorStopOk();
}
}
void RemoteGdbServerAdapter::shutdownInferior()
......
......@@ -86,6 +86,7 @@ private:
void handleFileExecAndSymbols(const GdbResponse &response);
void callTargetRemote();
void handleTargetRemote(const GdbResponse &response);
void handleInterruptInferior(const GdbResponse &response);
const int m_toolChainType;
......
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