Debugger: Fix "Attach to running process"

Change-Id: I3cef08621c40c87f52e20a229ab5e16f0bfa8bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-04-09 08:20:38 +02:00
parent abb9fb68e2
commit 384ca4bdb8
2 changed files with 3 additions and 0 deletions

View File

@@ -1740,6 +1740,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
} }
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE); auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(kit);
auto debugger = new DebuggerRunTool(runControl); auto debugger = new DebuggerRunTool(runControl);
debugger->setAttachPid(ProcessHandle(process.pid)); debugger->setAttachPid(ProcessHandle(process.pid));
debugger->setRunControlName(tr("Process %1").arg(process.pid)); debugger->setRunControlName(tr("Process %1").arg(process.pid));

View File

@@ -4257,6 +4257,8 @@ void GdbEngine::handleAttach(const DebuggerResponse &response)
notifyEngineRunAndInferiorStopOk(); notifyEngineRunAndInferiorStopOk();
if (runParameters().continueAfterAttach) if (runParameters().continueAfterAttach)
continueInferiorInternal(); continueInferiorInternal();
else
updateAll();
} }
break; break;
case ResultError: case ResultError: