diff options
author | hjk <[email protected]> | 2021-08-10 09:19:30 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2021-08-13 15:04:30 +0000 |
commit | 52e5023bcce391f7bd47b70e62c3f4ab04d319f7 (patch) | |
tree | 6288d6e7e901b6f2c8e3ef29e1cd1fe1f85be4f2 /src/plugins/valgrind/valgrindrunner.cpp | |
parent | 33108795d6b2dd1e91942efb3c1c27ad23342295 (diff) |
ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/valgrind/valgrindrunner.cpp')
-rw-r--r-- | src/plugins/valgrind/valgrindrunner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp index 2bf5fefde46..cfd3fd81ea8 100644 --- a/src/plugins/valgrind/valgrindrunner.cpp +++ b/src/plugins/valgrind/valgrindrunner.cpp @@ -138,13 +138,13 @@ bool ValgrindRunner::Private::run() if (HostOsInfo::isMacHost()) // May be slower to start but without it we get no filenames for symbols. cmd.addArg("--dsymutil=yes"); - cmd.addArg(m_debuggee.executable.toString()); - cmd.addArgs(m_debuggee.commandLineArguments, CommandLine::Raw); + cmd.addArg(m_debuggee.command.executable().toString()); + cmd.addArgs(m_debuggee.command.arguments(), CommandLine::Raw); emit q->valgrindExecuted(cmd.toUserOutput()); Runnable valgrind; - valgrind.setCommandLine(cmd); + valgrind.command = cmd; valgrind.workingDirectory = m_debuggee.workingDirectory; valgrind.environment = m_debuggee.environment; valgrind.device = m_device; @@ -190,17 +190,17 @@ void ValgrindRunner::Private::remoteProcessStarted() const QString proc = m_valgrindCommand.executable().toString().split(' ').last(); Runnable findPid; - findPid.executable = FilePath::fromString("/bin/sh"); // sleep required since otherwise we might only match "bash -c..." // and not the actual valgrind run - findPid.commandLineArguments = QString("-c \"" + findPid.command.setExecutable(FilePath::fromString("/bin/sh")); + findPid.command.setArguments(QString("-c \"" "sleep 1; ps ax" // list all processes with aliased name " | grep '\\b%1.*%2'" // find valgrind process " | tail -n 1" // limit to single process // we pick the last one, first would be "bash -c ..." " | awk '{print $1;}'" // get pid "\"" - ).arg(proc, m_debuggee.executable.fileName()); + ).arg(proc, m_debuggee.command.executable().fileName())); // m_remote.m_findPID = m_remote.m_connection->createRemoteProcess(cmd.toUtf8()); connect(&m_findPID, &ApplicationLauncher::remoteStderr, |