[Lldb-commits] [PATCH] D13881: Add domain socket support to gdb-remote protocol and lldb-server.

Oleksiy Vyalov via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 16:31:23 PDT 2015


ovyalov created this revision.
ovyalov added reviewers: clayborg, labath, tberghammer.
ovyalov added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

This CL provides logic for running lldb-server on domain sockets and required gdb-remote infrastructure changes  (qLaunchGDBServer request in particular).
Main highlights:
 - Make lldb-server to listen either on TCP and domain sockets. If colon is found in socket name (i.e. hostname:port format) lldb-server starts in TCP mode, otherwise uses domain sockets. 
   Further improvement will be to pass a pseudo protocol prefix as part of socket name (tcp://localhost:5555 or unix-domain:///tmp/platform.sock) - this will allow to add new transport types more easily (for example, linux-abstract://socket for Linux abstract sockets).
 - Add socket_name response field to qLaunchGDBServer.
 - Make PlatformRemoteGDBServer to support retry-based connect - both for ConnectRemote and debug server connect. Since in case of domain sockets lldb-server doesn't write port into named pipe we cannot use it as a synchronization point - so it's possible that qLaunchGDBServer will be received by host before debug server is up and listens on socket.
 - In case of Android platform rewrite input platform and gdbserver URLs with TCP URLs - i.e. connect://localhost:$local_port

http://reviews.llvm.org/D13881

Files:
  lldb.xcodeproj/project.pbxproj
  source/Host/posix/ConnectionFileDescriptorPosix.cpp
  source/Plugins/Platform/Android/AdbClient.cpp
  source/Plugins/Platform/Android/AdbClient.h
  source/Plugins/Platform/Android/PlatformAndroid.cpp
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  tools/lldb-server/Acceptor.cpp
  tools/lldb-server/Acceptor.h
  tools/lldb-server/CMakeLists.txt
  tools/lldb-server/lldb-gdbserver.cpp
  tools/lldb-server/lldb-platform.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13881.37813.patch
Type: text/x-patch
Size: 56865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151019/b8396e3d/attachment-0001.bin>


More information about the lldb-commits mailing list