From 8dd42ec2b12de0ee94da670757ba2340e36cd56b Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 1 Mar 2012 12:23:10 +0100 Subject: [PATCH] RemoteLinux: Support upcoming gdbserver syntax. Change-Id: If2e6c066502fe7ab9b46e865bb746000197f6b8a Reviewed-by: Fawzi Mohamed --- src/plugins/remotelinux/remotelinuxdebugsupport.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index 161fffdbbc7..ee8b948e7b7 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -207,11 +207,14 @@ void AbstractRemoteLinuxDebugSupport::startExecution() .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) ? QString::fromLatin1("%1 %2 %3").arg(runner()->commandPrefix()).arg(remoteExe).arg(args) : QString::fromLatin1("%1 gdbserver %5:%2 %3 %4").arg(runner()->commandPrefix()) - .arg(d->gdbServerPort).arg(remoteExe).arg(args) - .arg(runner()->connection()->connectionInfo().peerAddress.toString()); + .arg(d->gdbServerPort).arg(remoteExe).arg(args).arg(peerAddressString); connect(runner(), SIGNAL(remoteProcessFinished(qint64)), SLOT(handleRemoteProcessFinished(qint64))); runner()->startExecution(remoteCommandLine.toUtf8());