jimingham wrote:

Okay, here's my understanding of what's going on here:

So what's going on here is that in order to support background fetching of 
dSYM's, there's a thread that calls dsymForUUID when someone tells it there's a 
binary with an unknown UUID, then when it gets the dSYM it needs to notify the 
system that the symbols for this module have changed.  It was inconvenient to 
call the Target::SymbolsDidLoad for all the targets from the background thread, 
so we instead made an event (eBroadcastSymbolChange, should be 
eBroadcastBitSymbolChange) whose whole reason for being is that its DoOnRemoval 
is the one that calls Target::SymbolsDidLoad, and then we can make a Listener 
that just polls continuously for this event.  It is just pulling and discarding 
the event to cause SymbolsDidLoad, so it is really an internal event, it should 
not be exposed to other clients.
Instead, what will happen is that then the Debugger::eBroadcastBitSymbolChange 
event gets pulled from the event queue, it will run through the targets and 
call their SymbolsDidLoad if they have the UUID that just got loaded.  
Target::SymbolsDidLoad will in turn broadcast a 
Target::eBroadcastBitSymbolsLoaded event, that's the public one, and is 
correctly going to the Target's involved.
I think the only things that need doing here are:

1. Debugger::eBroadcastBitSymbolChange should NOT be public, it's internal to 
lldb and not useful to clients.
2. We should either have a Target::SymbolsDidChange that does the same work as 
Target::SymbolsDidLoad but sends Target::eBroadcastBitSymbolsChanged, or pass a 
bool in for changed vrs. load and dispatch the right event based on that.








https://github.com/llvm/llvm-project/pull/66144
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to