<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It’s unclear to me why it would be a problem to listen to every thread object? They aren’t terribly chatty or anything, and you can listen to all of them with one listener.</div><div class=""><br class=""></div><div class="">Note, you don’t have to sign up individually for every thread object’s broadcaster. That would be really annoying. In lldb, you can listen to individual broadcasters or “broadcaster event classes”. You want to do the latter.</div><div class=""><div class=""><br class=""></div><div class="">You get the event class name with the GetBroadcasterClassName method on the class you are interested in (SBThread in this case) and then on your listener call </div><div class=""><br class=""></div><div class="">SBListener::StartListeningForEventClass</div><div class=""><br class=""></div><div class="">If you do that, the debugger will sign your listener up for the objects of that broadcaster class as they come and go. That makes listening to events on all the threads in your process quite straightforward.</div><div class=""><br class=""></div><div class="">Hope this helps.</div><div class=""><br class=""></div><div class="">Jim</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 29, 2016, at 2:32 PM, John Lindal via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="font-size:13px" class="">I'm building an X11 UI on top of LLDB, and I'm stuck trying to listen for thread events.</span><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">lldb_private::Thread is a Broadcaster, but lldb::SBThread doesn't expose a GetBroadcaster() event the way SBProcess does.</div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">I wouldn't really want to have to listen to every SBThread object, but when the program stops, I could listen to the selected thread. (Getting the events from SBProcess would also work, if Process relayed them.)</div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">Is this a feature that has not yet been implemented? I couldn't find any related tickets in Bugzilla.</div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">Thanks,</div><div style="font-size:13px" class="">John Lindal</div></div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>