Commit 808f192f authored by hjk's avatar hjk

Qnx: Dissolve a QnxDebugSupport setRunParameter() use

Change-Id: I54cacf6dbcb5f68a2f063e41a86fc6d0c33da900
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent e44d16e3
......@@ -250,6 +250,11 @@ void DebuggerRunTool::setSkipExecutableValidation(bool on)
m_runParameters.skipExecutableValidation = on;
}
void DebuggerRunTool::setUseCtrlCStub(bool on)
{
m_runParameters.useCtrlCStub = on;
}
void DebuggerRunTool::setCommandsAfterConnect(const QString &commands)
{
m_runParameters.commandsAfterConnect = commands;
......
......@@ -108,6 +108,7 @@ public:
void setUseTargetAsync(bool on);
void setContinueAfterAttach(bool on);
void setSkipExecutableValidation(bool on);
void setUseCtrlCStub(bool on);
void setCommandsAfterConnect(const QString &commands);
void setCommandsForReset(const QString &commands);
......
......@@ -111,34 +111,26 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl)
void QnxDebugSupport::start()
{
Utils::Port pdebugPort = m_portsGatherer->gdbServerPort();
auto runConfig = qobject_cast<QnxRunConfiguration *>(runControl()->runConfiguration());
QTC_ASSERT(runConfig, return);
Target *target = runConfig->target();
Kit *k = target->kit();
DebuggerStartParameters params;
params.startMode = AttachToRemoteServer;
params.useCtrlCStub = true;
params.inferior.executable = runConfig->remoteExecutableFilePath();
params.symbolFile = runConfig->localExecutableFilePath();
params.remoteChannel = QString("%1:%2").arg(device()->sshParameters().host).arg(pdebugPort.number());
params.closeMode = KillAtClose;
params.inferior.commandLineArguments = runConfig->arguments();
if (isQmlDebugging()) {
const int qmlServerPort = m_portsGatherer->qmlServerPort().number();
params.qmlServer.setHost(device()->sshParameters().host);
params.qmlServer.setPort(qmlServerPort);
params.inferior.commandLineArguments.replace("%qml_port%", QString::number(qmlServerPort));
}
auto inferior = runConfig->runnable().as<StandardRunnable>();
inferior.executable = runConfig->remoteExecutableFilePath();
inferior.commandLineArguments = runConfig->arguments();
setStartMode(AttachToRemoteServer);
setCloseMode(KillAtClose);
setUseCtrlCStub(true);
setSymbolFile(runConfig->localExecutableFilePath());
setRemoteChannel(m_portsGatherer->gdbServerChannel());
setQmlServer(m_portsGatherer->qmlServer());
setInferior(inferior);
auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
setRunParameters(params);
setSolibSearchPath(QnxUtils::searchPaths(qtVersion));
DebuggerRunTool::start();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment