llvm-project/lldb/tools
Greg Clayton c6c420fca1 Switch over to using socketpair for local debugserver connections as they are twice as fast as TCP sockets (on macOS at least).
This change opens a socket pair and passes the second socket pair file descriptor down to the debugserver binary using a new option: "--fd=N" where N is the file descriptor. This file descriptor gets passed via posix_spawn() so that there is no need to do any bind/listen or bind/accept calls and eliminates the hanshake unix socket that is used to pass the result of the actual port that ends up being used so it can save time on launch as well as being faster.

This is currently only enabled on __APPLE__ builds. Other OSs should try modifying the #define from ProcessGDBRemote.cpp but the first person will need to port the --fd option over to lldb-server. Any OSs that enable USE_SOCKETPAIR_FOR_LOCAL_CONNECTION in their native builds can use the socket pair stuff. The #define is Apple only right now, but looks like:

#if defined (__APPLE__)
#define USE_SOCKETPAIR_FOR_LOCAL_CONNECTION 1
#endif

<rdar://problem/27814880> 

llvm-svn: 278524
2016-08-12 16:46:18 +00:00
..
argdumper Rename argdumper to lldb-argdumper 2015-10-29 05:07:12 +00:00
compact-unwind Add support for using armv7 compact unwind information 2016-06-07 02:19:54 +00:00
darwin-debug Fix darwin-debug installation in cmake (OS X) 2015-02-06 18:13:10 +00:00
darwin-threads Add support for one API used to detect if a process 2015-11-05 23:04:57 +00:00
debugserver Switch over to using socketpair for local debugserver connections as they are twice as fast as TCP sockets (on macOS at least). 2016-08-12 16:46:18 +00:00
driver Don't disable stdin buffering on Windows 2016-04-14 23:31:17 +00:00
install-headers add back an Xcode-specific Makefile for header installation 2016-01-28 22:34:36 +00:00
lldb-mi Fix -break-insert not working when using absolute paths (MI) 2016-07-29 06:01:20 +00:00
lldb-perf Cleanup how we listen for process events by using the broadcaster class name instead of having to catch each process instance as it comes alive. 2014-08-18 21:09:50 +00:00
lldb-server Remove Android.h 2016-08-08 12:54:36 +00:00
CMakeLists.txt [cmake] Build lldb-server on Darwin, set dep on FreeBSD. 2015-09-17 18:35:33 +00:00