From 4317546fafdba11d39bdeb819570bc395eca5ac7 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 3 Nov 2016 11:18:35 +0100 Subject: [PATCH] Fix QnxDebugSupport::startExecution() Under the assumption that the QNX debug support should work similar to the RemoteLinux debug support we have to: a, use the Runnable provided with the run control b, not recycle the arguments from the run control start parameters c, prepend a new set of QML debugger arguments when QML debugging There seems to be some mechanism that allows us to do C++ debugging by simply starting a process "pdebug " for some port number on the target. We don't touch this here. Task-number: QTCREATORBUG-17208 Change-Id: I0f4541968e1d20940617e8ff6d16a8ad86ea22c9 Reviewed-by: Eike Ziller Reviewed-by: Rafael Roquetto --- src/plugins/qnx/qnxdebugsupport.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index b6af5bcbf19..bb8cd71bc38 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -99,17 +99,18 @@ void QnxDebugSupport::startExecution() setState(StartingRemoteProcess); - if (m_useQmlDebugger) - m_runControl->startParameters().inferior.commandLineArguments += - QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices, m_qmlPort); - + StandardRunnable r = m_runnable; QStringList arguments; if (m_useCppDebugger) arguments << QString::number(m_pdebugPort.number()); - else if (m_useQmlDebugger && !m_useCppDebugger) - arguments = Utils::QtcProcess::splitArgs( - m_runControl->startParameters().inferior.commandLineArguments); - StandardRunnable r; + else { + if (m_useQmlDebugger) { + arguments.append(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices, + m_qmlPort)); + } + arguments.append(Utils::QtcProcess::splitArgs(r.commandLineArguments)); + } + r.executable = processExecutable(); r.commandLineArguments = Utils::QtcProcess::joinArgs(arguments); r.environment = m_runnable.environment;