From 674b4296db3484318f5118cdd4d4e606eae9b8f6 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 1 Oct 2017 10:19:44 +0300 Subject: [PATCH] Debugger: Always set executable from user arguments It is required also for coredump, attch to remote etc. Change-Id: I99bdcf860fc7c4ffd7918213a121b56977bec19d Reviewed-by: hjk --- src/plugins/debugger/debuggerplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 5e378ac20c0..dc3595a8c81 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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)); }