[Lldb-commits] [PATCH] Refactor Socket into a first class Host-object
Zachary Turner
zturner at google.com
Wed Jul 23 10:27:01 PDT 2014
Hi tfiala,
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.
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.
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.
http://reviews.llvm.org/D4641
Files:
include/lldb/Core/ConnectionFileDescriptor.h
include/lldb/Host/Editline.h
include/lldb/Host/File.h
include/lldb/Host/IoObject.h
include/lldb/Host/Socket.h
source/Core/ConnectionFileDescriptor.cpp
source/Host/common/CMakeLists.txt
source/Host/common/File.cpp
source/Host/common/IoObject.cpp
source/Host/common/Socket.cpp
source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4641.11813.patch
Type: text/x-patch
Size: 91611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140723/390de3f8/attachment.bin>
More information about the lldb-commits
mailing list