Commit 1bb2f04d authored by hjk's avatar hjk

Debugger: Don't issue monitor commands for local debugging

Change-Id: I8a81ae78a279b6f5cc354dde3ba0814b3a650d06
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent eb3584d2
......@@ -129,6 +129,7 @@ enum DebuggerStartMode
enum DebuggerCloseMode
{
KillAtClose,
KillAndExitMonitorAtClose,
DetachAtClose
};
......
......@@ -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:
......
......@@ -86,6 +86,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR
const IDevice::ConstPtr device = DeviceKitInformation::device(k);
QTC_ASSERT(device, return params);
params.closeMode = KillAndExitMonitorAtClose;
params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
......
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