Debugger: set the inferior executable when attaching to a run control

The inferior is used to verify that the bitness of the selected debugger
matches the inferior bitness on windows.

Change-Id: Ide7703a1ecc63a7d69101df779ce7f2660fecdbc
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2022-06-14 10:47:05 +02:00
parent 2bf46d9e7f
commit 601cb16893

View File

@@ -1753,6 +1753,7 @@ void DebuggerPlugin::attachExternalApplication(RunControl *rc)
runControl->setTarget(rc->target()); runControl->setTarget(rc->target());
runControl->setDisplayName(tr("Process %1").arg(pid.pid())); runControl->setDisplayName(tr("Process %1").arg(pid.pid()));
auto debugger = new DebuggerRunTool(runControl); auto debugger = new DebuggerRunTool(runControl);
debugger->setInferiorExecutable(rc->targetFilePath());
debugger->setAttachPid(pid); debugger->setAttachPid(pid);
debugger->setStartMode(AttachToLocalProcess); debugger->setStartMode(AttachToLocalProcess);
debugger->setCloseMode(DetachAtClose); debugger->setCloseMode(DetachAtClose);