diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index fc80d806b1de84337f2d6a358c14d0b07fa96abc..2d3a22a4c90545e977abcb7cd000540f043e1d87 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -186,6 +186,7 @@
 //                         +       +
 //                         +       ` +-+-> InferiorSetupFailed +-+-+-+-+-+->.
 //                         +                                                +
+//                  InferiorSetupOk                                         +
 //                         +                                                +
 //                  EngineRunRequested                                      +
 //                         +                                                +
@@ -198,6 +199,8 @@
 //      Inferior-     Inferior-   Inferior-  EngineRun-                     +
 //     Unrunnable}     StopOk}     RunOk}     Failed}                       +
 //           +           +            +           +                         +
+//     EngineRunOk  EngineRunOk  EngineRunOk      +                         +
+//           +           +            +           +                         +
 //   InferiorUnrunnable  +     InferiorRunOk      +                         +
 //                       +                        +                         +
 //                InferiorStopOk            EngineRunFailed                 +
@@ -238,7 +241,7 @@
 //   {notifyInferior-      +        +                                       +
 //      Exited}            +        +                                       +
 //           +             +        +                                       +
-//            +            +        +                                       +
+//     InferiorExitOk      +        +                                       +
 //             +           +        +                                       +
 //            InferiorShutdownOk InferiorShutdownFailed                     +
 //                      *          *                                        +
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index c21874b5c4d889baef87055d25e279598da9b33f..1b29301395aedb44980d8586228377b055eda5fc 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -145,6 +145,7 @@ static bool stateAcceptsGdbCommands(DebuggerState state)
     case InferiorSetupOk:
     case EngineRunFailed:
     case EngineRunOk:
+    case InferiorExitOk:
     case InferiorRunFailed:
     case EngineShutdownOk:
     case EngineShutdownFailed: