[Lldb-commits] [PATCH] D148397: [lldb/Utility] Add opt-in passthrough mode to event listeners
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 17 12:48:39 PDT 2023
bulbazord added inline comments.
================
Comment at: lldb/include/lldb/Utility/Broadcaster.h:520-522
+ /// A optional listener that all private events get also broadcasted to,
+ /// on top the hijacked / default listeners.
+ lldb::ListenerSP m_passthrough_listener = nullptr;
----------------
It looks like Broadcaster can have multiple listeners. Do we want multiple passthrough listeners as well? If not, why only one?
================
Comment at: lldb/source/API/SBAttachInfo.cpp:260
+
+ return SBListener(m_opaque_sp->GetPassthroughListener());
+}
----------------
`GetPassthroughListener` can return `nullptr`. I think you want to take advantage of the protected `SBListener(const ListenerSP &)` constructor here but I think that if `GetPassthroughListener` returns `nullptr` you'll end up calling the constructor `SBListener(const char *)`. I don't think this is what you want.
================
Comment at: lldb/source/API/SBLaunchInfo.cpp:395
+
+ return SBListener(m_opaque_sp->GetPassthroughListener());
+}
----------------
Same issue as `SBAttachInfo::GetPassthroughListener`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148397/new/
https://reviews.llvm.org/D148397
More information about the lldb-commits
mailing list