forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user