26 : m_opaque_sp(
Listener::MakeListener(name)) {
45 : m_opaque_sp(listener_sp) {}
51 return this->
operator bool();
53SBListener::operator bool()
const {
56 return m_opaque_sp !=
nullptr;
62 EventSP &event_sp =
event.GetSP();
75 const char *broadcaster_class,
76 uint32_t event_mask) {
91 const char *broadcaster_class,
92 uint32_t event_mask) {
107 uint32_t event_mask) {
110 uint32_t acquired_event_mask = 0;
112 acquired_event_mask =
113 m_opaque_sp->StartListeningForEvents(broadcaster.
get(), event_mask);
116 return acquired_event_mask;
120 uint32_t event_mask) {
124 return m_opaque_sp->StopListeningForEvents(broadcaster.
get(), event_mask);
132 bool success =
false;
137 assert(timeout_secs != 0);
139 timeout = std::chrono::seconds(timeout_secs);
143 event.reset(event_sp);
149 event.reset(
nullptr);
161 timeout = std::chrono::seconds(num_seconds);
163 if (
m_opaque_sp->GetEventForBroadcaster(broadcaster.
get(), event_sp,
165 event.reset(event_sp);
169 event.reset(
nullptr);
175 uint32_t event_type_mask,
SBEvent &event) {
181 timeout = std::chrono::seconds(num_seconds);
184 broadcaster.
get(), event_type_mask, event_sp, timeout)) {
185 event.reset(event_sp);
189 event.reset(
nullptr);
198 return event.IsValid();
200 event.reset(
nullptr);
209 event.reset(
m_opaque_sp->PeekAtNextEventForBroadcaster(broadcaster.
get()));
210 return event.IsValid();
212 event.reset(
nullptr);
222 event.reset(
m_opaque_sp->PeekAtNextEventForBroadcasterWithType(
223 broadcaster.
get(), event_type_mask));
224 return event.IsValid();
226 event.reset(
nullptr);
235 if (
m_opaque_sp->GetEvent(event_sp, std::chrono::seconds(0))) {
236 event.reset(event_sp);
240 event.reset(
nullptr);
250 if (
m_opaque_sp->GetEventForBroadcaster(broadcaster.
get(), event_sp,
251 std::chrono::seconds(0))) {
252 event.reset(event_sp);
256 event.reset(
nullptr);
267 if (
m_opaque_sp->GetEventForBroadcasterWithType(broadcaster.
get(),
268 event_type_mask, event_sp,
269 std::chrono::seconds(0))) {
270 event.reset(event_sp);
274 event.reset(
nullptr);
#define LLDB_INSTRUMENT_VA(...)
lldb_private::Broadcaster * get() const
lldb_private::Debugger * get() const
lldb::EventSP & GetSP() const
lldb_private::Listener * operator->() const
bool GetNextEvent(lldb::SBEvent &sb_event)
bool PeekAtNextEventForBroadcaster(const lldb::SBBroadcaster &broadcaster, lldb::SBEvent &sb_event)
void reset(lldb::ListenerSP listener_sp)
bool StopListeningForEvents(const lldb::SBBroadcaster &broadcaster, uint32_t event_mask)
uint32_t StartListeningForEvents(const lldb::SBBroadcaster &broadcaster, uint32_t event_mask)
void AddEvent(const lldb::SBEvent &event)
lldb_private::Listener * m_unused_ptr
lldb::ListenerSP m_opaque_sp
bool PeekAtNextEvent(lldb::SBEvent &sb_event)
bool WaitForEvent(uint32_t num_seconds, lldb::SBEvent &event)
bool HandleBroadcastEvent(const lldb::SBEvent &event)
const lldb::SBListener & operator=(const lldb::SBListener &rhs)
bool GetNextEventForBroadcasterWithType(const lldb::SBBroadcaster &broadcaster, uint32_t event_type_mask, lldb::SBEvent &sb_event)
bool PeekAtNextEventForBroadcasterWithType(const lldb::SBBroadcaster &broadcaster, uint32_t event_type_mask, lldb::SBEvent &sb_event)
bool WaitForEventForBroadcaster(uint32_t num_seconds, const lldb::SBBroadcaster &broadcaster, lldb::SBEvent &sb_event)
lldb_private::Listener * get() const
bool GetNextEventForBroadcaster(const lldb::SBBroadcaster &broadcaster, lldb::SBEvent &sb_event)
bool StopListeningForEventClass(SBDebugger &debugger, const char *broadcaster_class, uint32_t event_mask)
uint32_t StartListeningForEventClass(SBDebugger &debugger, const char *broadcaster_class, uint32_t event_mask)
bool WaitForEventForBroadcasterWithType(uint32_t num_seconds, const lldb::SBBroadcaster &broadcaster, uint32_t event_type_mask, lldb::SBEvent &sb_event)
A uniqued constant string class.
A class to manage flag bits.
lldb::BroadcasterManagerSP GetBroadcasterManager()
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Event > EventSP
std::shared_ptr< lldb_private::Listener > ListenerSP