RemoteLinux: Improve API for retrieving ports and fifos

Change-Id: I8aa808d5ffe12954a44031ec2f3d1c5ef8185eef
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-04-20 12:03:58 +02:00
parent 4d396052b6
commit f421176f22
4 changed files with 33 additions and 23 deletions

View File

@@ -110,10 +110,20 @@ void LinuxDeviceDebugSupport::startExecution()
{
QTC_ASSERT(state() == GatheringResources, return);
if (d->cppDebugging && !setPort(d->gdbServerPort))
return;
if (d->qmlDebugging && !setPort(d->qmlPort))
if (d->cppDebugging) {
d->gdbServerPort = findPort();
if (!d->gdbServerPort.isValid()) {
handleAdapterSetupFailed(tr("Not enough free ports on device for C++ debugging."));
return;
}
}
if (d->qmlDebugging) {
d->qmlPort = findPort();
if (!d->qmlPort.isValid()) {
handleAdapterSetupFailed(tr("Not enough free ports on device for QML debugging."));
return;
}
}
setState(StartingRunner);
d->gdbserverOutput.clear();