Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16154

Environment variable settings are not applied on remote valgrind call

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.0.0-rc1
    • Fix Version/s: Qt Creator 4.0.0
    • Labels:
      None
    • Environment:
      Qt Creator 4.0.0-rc1 under Ubuntu 16.04 with remote yocto distribution
    • Commits:
      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,

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            volki21 Volker Vogelhuber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes