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 <n>" for some port number <n> on
the target. We don't touch this here.

Task-number: QTCREATORBUG-17208
Change-Id: I0f4541968e1d20940617e8ff6d16a8ad86ea22c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
Ulf Hermann
2016-11-03 11:18:35 +01:00
parent 501bf4918f
commit 4317546faf

View File

@@ -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;