Debugger: Remove the InferiorExited state

There are now several possible orders of events between sending a 'kill'
and receiving something that indicated a properly shut down inferior.
Coordinating the InferiorExited state during engine ramp down is not
worthwhile as that state had only a forced transition to InferiorShutdownOk
anyway. For the user (and user code), only the fact that ramp down is
finished is interesting.

Change-Id: Ic22131d5a1066dc62bd069f532c28b773f231088
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-06-16 15:01:46 +02:00
parent 13daaaac67
commit ad6451bbe4
5 changed files with 9 additions and 22 deletions

View File

@@ -135,7 +135,6 @@ static bool stateAcceptsGdbCommands(DebuggerState state)
case InferiorStopFailed:
case InferiorSetupOk:
case EngineRunFailed:
case InferiorExitOk:
case InferiorRunFailed:
case EngineShutdownOk:
case EngineShutdownFailed:
@@ -1876,11 +1875,14 @@ void GdbEngine::shutdownInferior()
void GdbEngine::handleInferiorShutdown(const DebuggerResponse &response)
{
CHECK_STATE(InferiorShutdownRequested);
if (response.resultClass == ResultDone) {
notifyInferiorShutdownOk();
// We'll get async thread-group-exited responses to which we react.
// Nothing to do here.
// notifyInferiorShutdownOk();
return;
}
// "kill" got stuck, or similar.
CHECK_STATE(InferiorShutdownRequested);
QByteArray ba = response.data["msg"].data();
if (ba.contains(": No such file or directory.")) {
// This happens when someone removed the binary behind our back.