Valgrind: Start fully qualified FilePath earlier

Change-Id: Ib768e02033267d07278b7279a8172d237ebaa59d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-05-11 12:58:30 +02:00
parent 5fe7b3ad6a
commit 8737dfd962
2 changed files with 10 additions and 2 deletions

View File

@@ -36,6 +36,8 @@
#include <coreplugin/progressmanager/futureprogress.h> #include <coreplugin/progressmanager/futureprogress.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorericons.h> #include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/runconfigurationaspects.h>
@@ -77,7 +79,12 @@ void ValgrindToolRunner::start()
emit outputReceived(tr("Command line arguments: %1").arg(runnable().debuggeeArgs), LogMessageFormat); emit outputReceived(tr("Command line arguments: %1").arg(runnable().debuggeeArgs), LogMessageFormat);
#endif #endif
CommandLine valgrind{m_settings.valgrindExecutable.filePath()};
FilePath valgrindExecutable = m_settings.valgrindExecutable.filePath();
if (IDevice::ConstPtr dev = DeviceKitAspect::device(runControl()->kit()))
valgrindExecutable = dev->filePath(valgrindExecutable.path());
CommandLine valgrind{valgrindExecutable};
valgrind.addArgs(m_settings.valgrindArguments.value(), CommandLine::Raw); valgrind.addArgs(m_settings.valgrindArguments.value(), CommandLine::Raw);
valgrind.addArgs(genericToolArguments()); valgrind.addArgs(genericToolArguments());
valgrind.addArgs(toolArguments()); valgrind.addArgs(toolArguments());

View File

@@ -79,7 +79,8 @@ public:
bool ValgrindRunner::Private::run() bool ValgrindRunner::Private::run()
{ {
CommandLine cmd{m_device->mapToGlobalPath(m_valgrindCommand.executable())}; CommandLine cmd;
cmd.setExecutable(m_valgrindCommand.executable());
if (!localServerAddress.isNull()) { if (!localServerAddress.isNull()) {
if (!q->startServers()) if (!q->startServers())