[Lldb-commits] [PATCH] D100418: [lldb] [MainLoop] Support multiple callbacks per signal

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 13 16:00:18 PDT 2021


mgorny created this revision.
mgorny added reviewers: labath, emaste, krytarowski.
mgorny requested review of this revision.

Support registering multiple callbacks for a single signal.  This is
necessary to support multiple co-existing native process instances, with
separate SIGCHLD handlers.

Since std::function does not support equality comparison,
RegisterSignal() now accepts an optional argument to define identifier
for the callback.  If multiple handlers for the same signal are expeted
to be registered, unique identifiers are used to distinguish between
them.

The system signal handler is registered on first request, additional
callback are added on subsequent requests.  The system signal handler
is removed when last callback is unregistered.


https://reviews.llvm.org/D100418

Files:
  lldb/include/lldb/Host/MainLoop.h
  lldb/source/Host/common/MainLoop.cpp
  lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100418.337276.patch
Type: text/x-patch
Size: 5329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210413/cca1b78b/attachment-0001.bin>


More information about the lldb-commits mailing list