[Lldb-commits] [lldb] r215172 - Disable the command pipe in ConnectionFileDescriptor for Windows.
Zachary Turner
zturner at google.com
Thu Aug 7 16:35:20 PDT 2014
Author: zturner
Date: Thu Aug 7 18:35:20 2014
New Revision: 215172
URL: http://llvm.org/viewvc/llvm-project?rev=215172&view=rev
Log:
Disable the command pipe in ConnectionFileDescriptor for Windows.
The select() API on Windows is not compatible with objects other
than sockets, so passing a descriptor for the command pipe to this
function is guaranteed to fail. ConnectionFileDescriptor is still
broken on Windows after this patch, but slightly less broken than
before.
Modified:
lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=215172&r1=215171&r2=215172&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Thu Aug 7 18:35:20 2014
@@ -591,12 +591,19 @@ ConnectionFileDescriptor::BytesAvailable
if (handle != IOObject::kInvalidHandleValue)
{
+#if defined(_MSC_VER)
+ // select() won't accept pipes on Windows. The entire Windows codepath needs to be
+ // converted over to using WaitForMultipleObjects and event HANDLEs, but for now at least
+ // this will allow ::select() to not return an error.
+ const bool have_pipe_fd = false;
+#else
const bool have_pipe_fd = pipe_fd >= 0;
-#if !defined(__APPLE__) && !defined(_MSC_VER)
+#if !defined(__APPLE__)
assert (handle < FD_SETSIZE);
if (have_pipe_fd)
assert (pipe_fd < FD_SETSIZE);
#endif
+#endif
while (handle == m_read_sp->GetWaitableHandle())
{
const int nfds = std::max<int>(handle, pipe_fd) + 1;
More information about the lldb-commits
mailing list