Set the proper port on the remote channel.

Without this fix, GDB tries to connect to the gdbserver on the SSH port
when using the "Attach to Running Application" action. This fixes that
to use the proper gdbserver port.

Change-Id: I4ada31693879f28acf8046885d1dd15aff5d748c
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Ryan May
2012-11-20 15:04:00 -06:00
committed by Fawzi Mohamed
parent deeef5308f
commit f8146588f9

View File

@@ -209,6 +209,7 @@ void GdbServerStarter::attach(int port)
QTC_ASSERT(fillParameters(&sp, d->kit), return); QTC_ASSERT(fillParameters(&sp, d->kit), return);
sp.masterEngineType = GdbEngineType; sp.masterEngineType = GdbEngineType;
sp.connParams.port = port; sp.connParams.port = port;
sp.remoteChannel = sp.connParams.host + QLatin1Char(':') + QString::number(sp.connParams.port);
sp.displayName = tr("Remote: \"%1:%2\"").arg(sp.connParams.host).arg(port); sp.displayName = tr("Remote: \"%1:%2\"").arg(sp.connParams.host).arg(port);
sp.executable = localExecutable; sp.executable = localExecutable;
sp.startMode = AttachToRemoteServer; sp.startMode = AttachToRemoteServer;