Valgrind: Add target executable suffix to heob command line

The suffix is needed in case the executable name contains a dot,
because then the .exe suffix is not added automatically by
CreateProcess().

Change-Id: Ief2cfeaa8dd8ebbfb71f69575ee9574a4f2156d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Hannes Domani
2018-09-24 17:41:27 +02:00
parent ad8098b372
commit 8768e39d3c

View File

@@ -780,8 +780,9 @@ void MemcheckTool::heobAction()
TaskHub::requestPopup();
return;
}
if (!QFile::exists(executable)
&& !QFile::exists(Utils::HostOsInfo::withExecutableSuffix(executable))) {
if (!QFile::exists(executable))
executable = Utils::HostOsInfo::withExecutableSuffix(executable);
if (!QFile::exists(executable)) {
const QString msg = tr("Heob: Cannot find %1.").arg(executable);
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();