Commit 163150e3 authored by hjk's avatar hjk

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

parent 93902e5d
......@@ -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));
......
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