[Lldb-commits] [PATCH] D58883: [lldb] [Process/gdb-remote] Use '127.0.0.1' in ConnectLocally()
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 2 23:39:24 PST 2019
mgorny created this revision.
mgorny added reviewers: krytarowski, labath, JDevlieghere.
Herald added a subscriber: abidh.
Herald added a project: LLDB.
Use '127.0.0.1' instead of 'localhost' in ConnectLocally() function
as this is the specific address the server is bound to. Using
'localhost' may involve trying IPv6 first which may accidentally be used
by another service.
While technically it might be interesting to support IPv6 here, it would
need to be supported properly, with the connection copying family
and address from the listening socket, and possibly without relying
on existence of 'localhost' at all.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D58883
Files:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -1283,7 +1283,7 @@
llvm::SmallString<32> remote_addr;
llvm::raw_svector_ostream(remote_addr)
- << "connect://localhost:" << listen_socket.GetLocalPortNumber();
+ << "connect://127.0.0.1:" << listen_socket.GetLocalPortNumber();
std::unique_ptr<ConnectionFileDescriptor> conn_up(
new ConnectionFileDescriptor());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58883.189071.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190303/d0aea3bf/attachment.bin>
More information about the lldb-commits
mailing list