[Lldb-commits] [PATCH] D131160: [WIP][lldb] Add "event" capability to the MainLoop class
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 15 09:44:10 PDT 2022
mgorny added inline comments.
================
Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:74-82
+ in_events.reserve(loop.m_read_fds.size() + 1);
}
Status MainLoopPosix::RunImpl::Poll() {
- in_events.resize(loop.m_read_fds.size());
+ in_events.resize(loop.m_read_fds.size() + 1);
unsigned i = 0;
for (auto &fd : loop.m_read_fds)
----------------
I'm wondering whether I should be repeating this all over the place or perhaps just adding `m_event_pipe` to `m_read_fds`.
================
Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:108-112
+ char c;
+ ssize_t bytes_read =
+ llvm::sys::RetryAfterSignal(-1, ::read, event_pipe_fd, &c, 1);
+ assert(bytes_read == 1);
+ UNUSED_IF_ASSERT_DISABLED(bytes_read);
----------------
Also I'm wondering about adding a `ProcessEvents()` wrapper that would take care of this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131160/new/
https://reviews.llvm.org/D131160
More information about the lldb-commits
mailing list