RemoteLinux: Support upcoming gdbserver syntax.

Change-Id: If2e6c066502fe7ab9b46e865bb746000197f6b8a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kandeler
2012-03-01 12:23:10 +01:00
parent b67d761462
commit 8dd42ec2b1

View File

@@ -207,11 +207,14 @@ void AbstractRemoteLinuxDebugSupport::startExecution()
.arg(d->qmlPort); .arg(d->qmlPort);
} }
const QHostAddress peerAddress = runner()->connection()->connectionInfo().peerAddress;
QString peerAddressString = peerAddress.toString();
if (peerAddress.protocol() == QAbstractSocket::IPv6Protocol)
peerAddressString.prepend(QLatin1Char('[')).append(QLatin1Char(']'));
const QString remoteCommandLine = (d->qmlDebugging && !d->cppDebugging) const QString remoteCommandLine = (d->qmlDebugging && !d->cppDebugging)
? QString::fromLatin1("%1 %2 %3").arg(runner()->commandPrefix()).arg(remoteExe).arg(args) ? QString::fromLatin1("%1 %2 %3").arg(runner()->commandPrefix()).arg(remoteExe).arg(args)
: QString::fromLatin1("%1 gdbserver %5:%2 %3 %4").arg(runner()->commandPrefix()) : QString::fromLatin1("%1 gdbserver %5:%2 %3 %4").arg(runner()->commandPrefix())
.arg(d->gdbServerPort).arg(remoteExe).arg(args) .arg(d->gdbServerPort).arg(remoteExe).arg(args).arg(peerAddressString);
.arg(runner()->connection()->connectionInfo().peerAddress.toString());
connect(runner(), SIGNAL(remoteProcessFinished(qint64)), connect(runner(), SIGNAL(remoteProcessFinished(qint64)),
SLOT(handleRemoteProcessFinished(qint64))); SLOT(handleRemoteProcessFinished(qint64)));
runner()->startExecution(remoteCommandLine.toUtf8()); runner()->startExecution(remoteCommandLine.toUtf8());