Debugger: Don't issue monitor commands for local debugging

Change-Id: I8a81ae78a279b6f5cc354dde3ba0814b3a650d06
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
hjk
2014-10-09 00:13:33 +02:00
parent eb3584d2d8
commit 1bb2f04d4d
3 changed files with 5 additions and 1 deletions

View File

@@ -1899,6 +1899,7 @@ void GdbEngine::shutdownInferior()
m_commandsToRunOnTemporaryBreak.clear();
switch (startParameters().closeMode) {
case KillAtClose:
case KillAndExitMonitorAtClose:
postCommand("kill", NeedsStop | LosesChild, CB(handleInferiorShutdown));
return;
case DetachAtClose:
@@ -1944,7 +1945,8 @@ void GdbEngine::notifyAdapterShutdownOk()
m_commandsDoneCallback = 0;
switch (m_gdbProc->state()) {
case QProcess::Running:
postCommand("monitor exit");
if (startParameters().closeMode == KillAndExitMonitorAtClose)
postCommand("monitor exit");
postCommand("-gdb-exit", GdbEngine::ExitRequest, CB(handleGdbExit));
break;
case QProcess::NotRunning: