Maemo: Use dynamic port list.

Check whether the ports we need are actually available on the device.
As a side effect, this makes it possible to debug more than one
application at the same time on Maemo.

Task-number: QTCREATORBUG-2702
This commit is contained in:
Christian Kandeler
2010-11-02 10:24:50 +01:00
parent 8415d0faa0
commit 548df9385b
18 changed files with 162 additions and 116 deletions

View File

@@ -286,10 +286,25 @@ void RemoteGdbServerAdapter::shutdownAdapter()
m_engine->notifyAdapterShutdownOk();
}
void RemoteGdbServerAdapter::handleSetupDone()
void RemoteGdbServerAdapter::handleSetupDone(int gdbServerPort, int qmlPort)
{
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
if (qmlPort != -1)
startParameters().qmlServerPort = qmlPort;
if (gdbServerPort != -1) {
QString &rc = startParameters().remoteChannel;
const int sepIndex = rc.lastIndexOf(QLatin1Char(':'));
if (sepIndex != -1) {
rc.replace(sepIndex + 1, rc.count() - sepIndex - 1,
QString::number(gdbServerPort));
}
}
handleSetupDone();
}
void RemoteGdbServerAdapter::handleSetupDone()
{
if (m_engine->startGdb(QStringList(), startParameters().debuggerCommand))
m_engine->handleAdapterStarted();
}