[Lldb-commits] [PATCH] D64698: Handle EOF from `lldb-vscode`

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 15 23:37:57 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL366187: [lldb] Handle EOF from `lldb-vscode` (authored by jankratochvil, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64698?vs=209707&id=210026#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64698/new/

https://reviews.llvm.org/D64698

Files:
  lldb/trunk/tools/lldb-vscode/IOStream.cpp


Index: lldb/trunk/tools/lldb-vscode/IOStream.cpp
===================================================================
--- lldb/trunk/tools/lldb-vscode/IOStream.cpp
+++ lldb/trunk/tools/lldb-vscode/IOStream.cpp
@@ -101,6 +101,11 @@
     else
       bytes_read = ::read(descriptor.m_fd, ptr, length);
 
+    if (bytes_read == 0) {
+      if (log)
+        *log << "End of file (EOF) reading from input file.\n";
+      return false;
+    }
     if (bytes_read < 0) {
       int reason = 0;
 #if defined(_WIN32)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64698.210026.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190716/ccf49469/attachment.bin>


More information about the lldb-commits mailing list