debugger: some state change fixes when shutting down in 'attach' mode

This commit is contained in:
hjk
2009-09-30 12:51:54 +02:00
parent 93902e5d0a
commit 163150e3e5

View File

@@ -135,7 +135,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
m_engine->updateAll();
} else if (response.resultClass == GdbResultError) {
QString msg = __(response.data.findChild("msg").data());
setState(InferiorPreparationFailed);
setState(InferiorStartFailed);
emit inferiorStartFailed(msg);
}
}
@@ -167,6 +167,11 @@ void AttachGdbAdapter::shutdown()
{
switch (state()) {
case InferiorStartFailed:
m_engine->postCommand(_("-gdb-exit"));
setState(DebuggerNotReady);
return;
case InferiorStopped:
setState(InferiorShuttingDown);
m_engine->postCommand(_("detach"), CB(handleDetach));