This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Core] Pass error/status from Communication::ReadThread()
ClosedPublic

Authored by mgorny on Aug 24 2022, 11:04 AM.

Details

Summary

Ensure that the ConnectionStatus and Status from
Communication::ReadThread() is correctly passed to ::Read() in order
to fix further discrepancies between ::Read() calls in non-threaded
and threaded modes.

Sponsored by: The FreeBSD Foundation

Diff Detail

Event Timeline

mgorny created this revision.Aug 24 2022, 11:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 11:04 AM
Herald added a subscriber: arichardson. · View Herald Transcript
labath added inline comments.Aug 26 2022, 6:42 AM
lldb/unittests/Core/CommunicationTest.cpp
136

I don't understand what is the purpose of this. Can you elaborate?

mgorny added inline comments.Aug 26 2022, 8:23 AM
lldb/unittests/Core/CommunicationTest.cpp
136

Arrr, I've accidentally moved this test from the MainLoop patch while rebasing. Long story short, StopReadThread() could hang there if we don't trigger the callbacks there.

Hmm, I see you've updated the tests, so I need to update this patch anyway.

mgorny updated this revision to Diff 455950.Aug 26 2022, 10:14 AM

Rebase, move StopReadThread() test to the other patch.

labath accepted this revision.Aug 31 2022, 6:45 AM
labath added inline comments.
lldb/unittests/Core/CommunicationTest.cpp
19–20

I guess these two are not used anymore.

This revision is now accepted and ready to land.Aug 31 2022, 6:45 AM
mgorny marked an inline comment as done.Sep 1 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2022, 5:17 AM