Valgrind: Support both IPv4 and IPv6

Change-Id: I3e7a7f0d9264c2fccb161e5d2dcf585db4fcd013
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
Aurindam Jana
2013-04-18 11:00:53 +02:00
parent 686b63ea84
commit 49f1cd5334

View File

@@ -74,13 +74,13 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
sp.workingDirectory = rc1->workingDirectory(); sp.workingDirectory = rc1->workingDirectory();
sp.debuggee = rc1->executable(); sp.debuggee = rc1->executable();
sp.debuggeeArgs = rc1->commandLineArguments(); sp.debuggeeArgs = rc1->commandLineArguments();
sp.connParams.host = QLatin1String("localhost");
const ProjectExplorer::IDevice::ConstPtr device = const ProjectExplorer::IDevice::ConstPtr device =
ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit()); ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp); QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp);
QTcpServer server; QTcpServer server;
if (!server.listen(QHostAddress(sp.connParams.host))) if (!server.listen(QHostAddress::LocalHost) || !server.listen(QHostAddress::LocalHostIPv6))
return sp; return sp;
sp.connParams.host = server.serverAddress().toString();
sp.connParams.port = server.serverPort(); sp.connParams.port = server.serverPort();
sp.startMode = Analyzer::StartLocal; sp.startMode = Analyzer::StartLocal;
} else if (RemoteLinuxRunConfiguration *rc2 = } else if (RemoteLinuxRunConfiguration *rc2 =