Debugger: Always set executable from user arguments

It is required also for coredump, attch to remote etc.

Change-Id: I99bdcf860fc7c4ffd7918213a121b56977bec19d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2017-10-01 10:19:44 +03:00
committed by Orgad Shaneh
parent 1f73fb1402
commit 674b4296db

View File

@@ -1180,6 +1180,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
auto runControl = new RunControl(nullptr, ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new DebuggerRunTool(runControl, kit);
debugger->setInferiorExecutable(executable);
if (pid) {
debugger->setStartMode(AttachExternal);
debugger->setCloseMode(DetachAtClose);
@@ -1199,7 +1200,6 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
debugger->setStartMessage(tr("Attaching to core file %1.").arg(coreFile));
} else {
debugger->setStartMode(StartExternal);
debugger->setInferiorExecutable(executable);
debugger->setRunControlName(tr("Executable file \"%1\"").arg(executable));
debugger->setStartMessage(tr("Debugging file %1.").arg(executable));
}