Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.0.0-rc1
-
None
-
Qt Creator 4.0.0-rc1 under Ubuntu 16.04 with remote yocto distribution
-
c4f9c6f265c28ed5602646c0fd147f4066d83205
Description
The environment adjustments in the project settings do not seem to be applied on remote valgrind calls. In valgrindprocess.cpp there is a differentiation between localmode and remote call. But only in localmode the environment settings of the runnable m_debuggee is assigned. In remote call there's no processing of the environment settings.
One solution would be to change the ssh connection handling from SshRemoteProcess to SshDeviceProcess which already handles adjustment of environment settings in handleConnected. If that's not feasible because of too many things depending on SshRemoteProcess, one could add the following patch:
diff --git a/src/plugins/valgrind/valgrindprocess.cpp b/src/plugins/valgrind/valgrindprocess.cpp
index 83184c5..14be96f 100644
— a/src/plugins/valgrind/valgrindprocess.cpp
+++ b/src/plugins/valgrind/valgrindprocess.cpp
@@ -214,6 +214,9 @@ void ValgrindProcess::connected()
cmd += m_valgrindExecutable + QLatin1Char(' ') + argumentString(Utils::OsTypeLinux);m_remote.m_process = m_remote.m_connection->createRemoteProcess(cmd.toUtf8());
+ for (auto it = m_debuggee.environment.constBegin(); it != m_debuggee.environment.constEnd(); ++it)
+ m_remote.m_process->addToEnvironment(it.key().toUtf8(), it.value().toUtf8());
+
connect(m_remote.m_process.data(), &QSsh::SshRemoteProcess::readyReadStandardError,
this, &ValgrindProcess::handleRemoteStderr);
connect(m_remote.m_process.data(), &QSsh::SshRemoteProcess::readyReadStandardOutput,