forked from qt-creator/qt-creator
Qnx: Dissolve a QnxDebugSupport setRunParameter() use
Change-Id: I54cacf6dbcb5f68a2f063e41a86fc6d0c33da900 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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();
|
||||
auto inferior = runConfig->runnable().as<StandardRunnable>();
|
||||
inferior.executable = runConfig->remoteExecutableFilePath();
|
||||
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));
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user