forked from OSchip/llvm-project
3da8e5f920
Summary: This is a general fix for the ConnectionFileDescriptor class but my main motivation was to make lldb-server working with IPv6. The connect URI can use square brackets ([]) to wrap the interface part of the URI (e.g.: <scheme>://[<interface>]:<port>). For IPv6 addresses this is a must since its ip can include colons and it will overlap with the port colon otherwise. The URIParser class parses the square brackets correctly but the ConnectionFileDescriptor doesn't generate them for IPv6 addresses making it impossible to connect to the gdb server when using this protocol. How to reproduce the issue: ``` $ lldb-server p --server --listen [::1]:8080 ... $ lldb (lldb) platform select remote-macosx (lldb) platform connect connect://[::1]:8080 (lldb) platform process -p <pid> error: unable to launch a GDB server on 'computer' ``` The server was actually launched we were just not able to connect to it. With this fix lldb will correctly connect. I fixed this by wrapping the ip portion with []. Reviewers: labath Reviewed By: labath Subscribers: xiaobai, mgorny, jfb, lldb-commits, labath Tags: #lldb Differential Revision: https://reviews.llvm.org/D61833 llvm-svn: 361898 |
||
---|---|---|
.. | ||
linux | ||
CMakeLists.txt | ||
ConnectionFileDescriptorTest.cpp | ||
FileActionTest.cpp | ||
FileSystemTest.cpp | ||
HostInfoTest.cpp | ||
HostTest.cpp | ||
MainLoopTest.cpp | ||
NativeProcessProtocolTest.cpp | ||
ProcessLaunchInfoTest.cpp | ||
SocketAddressTest.cpp | ||
SocketTest.cpp | ||
SocketTestUtilities.cpp | ||
SocketTestUtilities.h | ||
TaskPoolTest.cpp |