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

Task-number: QTCREATORBUG-2850
This commit is contained in:
hjk
2010-11-26 14:23:52 +01:00
parent 1eeb35cfdd
commit 3488b0446c
2 changed files with 16 additions and 3 deletions

View File

@@ -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()