<div dir="ltr">+greg, since you're probably interested in this.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 10:27 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi tfiala,<br>
<br>
This patch takes socket logic out of ConnectionFileDescriptor and moves into a Socket class in the Host layer, updating ConnectionFileDescriptor to use the Socket class instead of hand-coded socket logic.<br>
<br>
Windows provides a wildly different interface to sockets than POSIX, so this change will make it easier to make sockets, and ultimately the ConnectionFileDescriptor class, work correctly on Windows.<br>
<br>
I tested on Windows (as much as I could anyway) and Linux.  On Linux I can create an lldb-platform that listens for connections, and I can successfully connect to it and send remote commands, all going through the new code path.  There is 1 test failure, in TestProcessIO.py.  It seems to have trouble with SBProcess.PutSTDIN.  I'm still trying to figure this out, but everything else seems to work.  Likely I will need some help testing on Mac and getting the Xcode project updated accordingly with the new files.<br>

<br>
<a href="http://reviews.llvm.org/D4641" target="_blank">http://reviews.llvm.org/D4641</a><br>
<br>
Files:<br>
  include/lldb/Core/ConnectionFileDescriptor.h<br>
  include/lldb/Host/Editline.h<br>
  include/lldb/Host/File.h<br>
  include/lldb/Host/IoObject.h<br>
  include/lldb/Host/Socket.h<br>
  source/Core/ConnectionFileDescriptor.cpp<br>
  source/Host/common/CMakeLists.txt<br>
  source/Host/common/File.cpp<br>
  source/Host/common/IoObject.cpp<br>
  source/Host/common/Socket.cpp<br>
  source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp<br>
</blockquote></div><br></div>