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)
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)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits