This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Host] Move port predicate-related logic to gdb-remote
ClosedPublic

Authored by mgorny on Oct 23 2021, 2:20 AM.

Details

Summary

Remove the port predicate from Socket and ConnectionFileDescriptor,
and move it to gdb-remote. It is specifically relevant to the threading
used inside gdb-remote and with the new port callback API, we can
reliably move it there. While at it, switch from the custom Predicate
to std::promise/std::future.

Diff Detail

Event Timeline

mgorny requested review of this revision.Oct 23 2021, 2:20 AM
mgorny created this revision.
labath accepted this revision.Oct 25 2021, 1:07 AM

This is pure goodness.

This revision is now accepted and ready to land.Oct 25 2021, 1:07 AM
This revision was landed with ongoing or failed builds.Oct 26 2021, 4:53 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2021, 4:53 AM
mib added a subscriber: mib.Oct 26 2021, 11:25 AM

Hi @mgorny, this broke green-dragon (https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/37098/consoleText). You should be able to reproduce by running $ ninja check-lldb-unit

Hi @mgorny, this broke green-dragon (https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/37098/consoleText). You should be able to reproduce by running $ ninja check-lldb-unit

I'm sorry about that. I don't think I can test it since AFAICS debugserver isn't built on non-Apple systems. However, I've pushed a fix and hopefully I haven't made a mistake.

mib added a comment.Oct 26 2021, 12:52 PM

Hi @mgorny, this broke green-dragon (https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/37098/consoleText). You should be able to reproduce by running $ ninja check-lldb-unit

I'm sorry about that. I don't think I can test it since AFAICS debugserver isn't built on non-Apple systems. However, I've pushed a fix and hopefully I haven't made a mistake.

Thanks, that fixed the bot https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/37105