Skip to content
Snippets Groups Projects
Commit 163150e3 authored by hjk's avatar hjk
Browse files

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

parent 93902e5d
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response) ...@@ -135,7 +135,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
m_engine->updateAll(); m_engine->updateAll();
} else if (response.resultClass == GdbResultError) { } else if (response.resultClass == GdbResultError) {
QString msg = __(response.data.findChild("msg").data()); QString msg = __(response.data.findChild("msg").data());
setState(InferiorPreparationFailed); setState(InferiorStartFailed);
emit inferiorStartFailed(msg); emit inferiorStartFailed(msg);
} }
} }
...@@ -167,6 +167,11 @@ void AttachGdbAdapter::shutdown() ...@@ -167,6 +167,11 @@ void AttachGdbAdapter::shutdown()
{ {
switch (state()) { switch (state()) {
case InferiorStartFailed:
m_engine->postCommand(_("-gdb-exit"));
setState(DebuggerNotReady);
return;
case InferiorStopped: case InferiorStopped:
setState(InferiorShuttingDown); setState(InferiorShuttingDown);
m_engine->postCommand(_("detach"), CB(handleDetach)); m_engine->postCommand(_("detach"), CB(handleDetach));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment