forked from qt-creator/qt-creator
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:
@@ -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,6 +1945,7 @@ void GdbEngine::notifyAdapterShutdownOk()
|
||||
m_commandsDoneCallback = 0;
|
||||
switch (m_gdbProc->state()) {
|
||||
case QProcess::Running:
|
||||
if (startParameters().closeMode == KillAndExitMonitorAtClose)
|
||||
postCommand("monitor exit");
|
||||
postCommand("-gdb-exit", GdbEngine::ExitRequest, CB(handleGdbExit));
|
||||
break;
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user