[Lldb-commits] [lldb] r301534 - TCPSocket: add back support for "*" address

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 27 04:32:25 PDT 2017


Author: labath
Date: Thu Apr 27 06:32:25 2017
New Revision: 301534

URL: http://llvm.org/viewvc/llvm-project?rev=301534&view=rev
Log:
TCPSocket: add back support for "*" address

before r301492, we could specify "*:1234" as an address to lldb-server
and it would interpret that as "any". I am not sure that's a good idea,
but we have usages of that in the test suite, and without this the
remote test suite fails.

I'm adding that back, as it does not seem it was an intended side-effect
of that change, but I am open to removing it in the future, after
discussion and test suite fixup.

Modified:
    lldb/trunk/source/Host/common/TCPSocket.cpp

Modified: lldb/trunk/source/Host/common/TCPSocket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/TCPSocket.cpp?rev=301534&r1=301533&r2=301534&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/TCPSocket.cpp (original)
+++ lldb/trunk/source/Host/common/TCPSocket.cpp Thu Apr 27 06:32:25 2017
@@ -178,6 +178,8 @@ Error TCPSocket::Listen(llvm::StringRef
   if (!DecodeHostAndPort(name, host_str, port_str, port, &error))
     return error;
 
+  if (host_str == "*")
+    host_str = "0.0.0.0";
   auto addresses = lldb_private::SocketAddress::GetAddressInfo(
       host_str.c_str(), NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP);
   for (auto address : addresses) {




More information about the lldb-commits mailing list