[Lldb-commits] [lldb] Private process events were being delivered to the secondary listener (PR #98571)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 12 10:50:54 PDT 2024
================
@@ -4248,7 +4248,21 @@ bool Process::ProcessEventData::ShouldStop(Event *event_ptr,
return still_should_stop;
}
+bool Process::ProcessEventData::ForwardEventToPendingListeners(Event *event_ptr) {
+ // STDIO and the other async event notifications should always be forwarded.
+ if (event_ptr->GetType() != Process::eBroadcastBitStateChanged)
+ return true;
+
+ // For state changed events, if the update state is one, we are handling
+ // this on the private state thread. We should wait for the public event.
+ return m_update_state == 1;
----------------
medismailben wrote:
You say:
> // if the update state is one, we are handling this on the private state thread. We should wait for the public event.
Yet:
> return m_update_state == 1;
I'm confused because this would mean we should forward events to pending listeners if the update state is one.
I believe you meant:
```suggestion
// For state changed events, if the update state is zero, we are handling
// this on the private state thread. We should wait for the public event.
return m_update_state == 1;
```
https://github.com/llvm/llvm-project/pull/98571
More information about the lldb-commits
mailing list