[Lldb-commits] [PATCH] D59849: [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout.

Jorge Gorbe Moya via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 26 14:53:13 PDT 2019


jgorbe created this revision.
jgorbe added reviewers: clayborg, zturner.
Herald added a project: LLDB.

This change prevents the lldb-vscode test harness from hanging up waiting for
new messages when the lldb-vscode subprocess crashes.

Now, when an EOF from the subprocess pipe is detected we enqueue a `None` packet
in the received packets list. Then, during the message processing loop, we can
use this `None` packet to tell apart the case where lldb-vscode has terminated
unexpectedly from the normal situation where no pending messages means blocking
and waiting for more data.

I believe this should be enough to fix the issues with these tests hanging on
multiple platforms. Once this lands, I'll prepare and test a separate change
removing the @skipIfLinux annotations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D59849

Files:
  lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59849.192368.patch
Type: text/x-patch
Size: 5136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190326/68876de5/attachment.bin>


More information about the lldb-commits mailing list