This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout.
ClosedPublic

Authored by jgorbe on Mar 26 2019, 2:50 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jgorbe created this revision.Mar 26 2019, 2:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2019, 2:50 PM
zturner accepted this revision.Apr 1 2019, 1:32 PM
This revision is now accepted and ready to land.Apr 1 2019, 1:32 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2019, 1:36 PM