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;
|
m_runParameters.skipExecutableValidation = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerRunTool::setUseCtrlCStub(bool on)
|
||||||
|
{
|
||||||
|
m_runParameters.useCtrlCStub = on;
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setCommandsAfterConnect(const QString &commands)
|
void DebuggerRunTool::setCommandsAfterConnect(const QString &commands)
|
||||||
{
|
{
|
||||||
m_runParameters.commandsAfterConnect = commands;
|
m_runParameters.commandsAfterConnect = commands;
|
||||||
|
@@ -108,6 +108,7 @@ public:
|
|||||||
void setUseTargetAsync(bool on);
|
void setUseTargetAsync(bool on);
|
||||||
void setContinueAfterAttach(bool on);
|
void setContinueAfterAttach(bool on);
|
||||||
void setSkipExecutableValidation(bool on);
|
void setSkipExecutableValidation(bool on);
|
||||||
|
void setUseCtrlCStub(bool on);
|
||||||
|
|
||||||
void setCommandsAfterConnect(const QString &commands);
|
void setCommandsAfterConnect(const QString &commands);
|
||||||
void setCommandsForReset(const QString &commands);
|
void setCommandsForReset(const QString &commands);
|
||||||
|
@@ -111,34 +111,26 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl)
|
|||||||
|
|
||||||
void QnxDebugSupport::start()
|
void QnxDebugSupport::start()
|
||||||
{
|
{
|
||||||
Utils::Port pdebugPort = m_portsGatherer->gdbServerPort();
|
|
||||||
|
|
||||||
auto runConfig = qobject_cast<QnxRunConfiguration *>(runControl()->runConfiguration());
|
auto runConfig = qobject_cast<QnxRunConfiguration *>(runControl()->runConfiguration());
|
||||||
QTC_ASSERT(runConfig, return);
|
QTC_ASSERT(runConfig, return);
|
||||||
Target *target = runConfig->target();
|
Target *target = runConfig->target();
|
||||||
Kit *k = target->kit();
|
Kit *k = target->kit();
|
||||||
|
|
||||||
DebuggerStartParameters params;
|
auto inferior = runConfig->runnable().as<StandardRunnable>();
|
||||||
params.startMode = AttachToRemoteServer;
|
inferior.executable = runConfig->remoteExecutableFilePath();
|
||||||
params.useCtrlCStub = true;
|
inferior.commandLineArguments = runConfig->arguments();
|
||||||
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()) {
|
setStartMode(AttachToRemoteServer);
|
||||||
const int qmlServerPort = m_portsGatherer->qmlServerPort().number();
|
setCloseMode(KillAtClose);
|
||||||
params.qmlServer.setHost(device()->sshParameters().host);
|
setUseCtrlCStub(true);
|
||||||
params.qmlServer.setPort(qmlServerPort);
|
setSymbolFile(runConfig->localExecutableFilePath());
|
||||||
params.inferior.commandLineArguments.replace("%qml_port%", QString::number(qmlServerPort));
|
setRemoteChannel(m_portsGatherer->gdbServerChannel());
|
||||||
}
|
setQmlServer(m_portsGatherer->qmlServer());
|
||||||
|
setInferior(inferior);
|
||||||
|
|
||||||
auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
|
auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
|
||||||
if (qtVersion)
|
if (qtVersion)
|
||||||
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
|
setSolibSearchPath(QnxUtils::searchPaths(qtVersion));
|
||||||
|
|
||||||
setRunParameters(params);
|
|
||||||
|
|
||||||
DebuggerRunTool::start();
|
DebuggerRunTool::start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user