[Lldb-commits] [PATCH] Fix bug where an additional O packet is sent after inferior exits.

Chaoren Lin chaorenl at google.com
Mon Apr 6 18:25:01 PDT 2015


Hi clayborg, jingham, vharron,

ConnectionFileDescriptor::Read was returning eConnectionStatusError instead of 0
on m_shutting_down, which caused the caller to think that some number of bytes
were read.

http://reviews.llvm.org/D8850

Files:
  source/Host/posix/ConnectionFileDescriptorPosix.cpp

Index: source/Host/posix/ConnectionFileDescriptorPosix.cpp
===================================================================
--- source/Host/posix/ConnectionFileDescriptorPosix.cpp
+++ source/Host/posix/ConnectionFileDescriptorPosix.cpp
@@ -386,8 +386,12 @@
         status = eConnectionStatusTimedOut;
         return 0;
     }
-    else if (m_shutting_down)
-        return eConnectionStatusError;
+
+    if (m_shutting_down)
+    {
+        status = eConnectionStatusError;
+        return 0;
+    }
 
     status = BytesAvailable(timeout_usec, error_ptr);
     if (status != eConnectionStatusSuccess)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8850.23303.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150407/ede4cf1d/attachment.bin>


More information about the lldb-commits mailing list