Re: [lldb-dev] Listening for thread events

2016-01-30 Thread Jeffrey Tan via lldb-dev
What event_mask should be used for the thread event class? I did not find
any. (Sorry for hijacking the thread)

On Fri, Jan 29, 2016 at 4:02 PM, Jim Ingham via lldb-dev <
lldb-dev@lists.llvm.org> wrote:

> 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.
>
> 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.
>
> 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
>
> SBListener::StartListeningForEventClass
>
> 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.
>
> Hope this helps.
>
> Jim
>
>
> On Jan 29, 2016, at 2:32 PM, John Lindal via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
>
> I'm building an X11 UI on top of LLDB, and I'm stuck trying to listen for
> thread events.
>
> lldb_private::Thread is a Broadcaster, but lldb::SBThread doesn't expose a
> GetBroadcaster() event the way SBProcess does.
>
> 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.)
>
> Is this a feature that has not yet been implemented?  I couldn't find any
> related tickets in Bugzilla.
>
> Thanks,
> John Lindal
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Listening for thread events

2016-01-30 Thread Jeffrey Tan via lldb-dev
Never mind, found the thread event_mask in threads.h. They are just not in
the python API reference page.

On Sat, Jan 30, 2016 at 10:28 PM, Jeffrey Tan 
wrote:

> What event_mask should be used for the thread event class? I did not find
> any. (Sorry for hijacking the thread)
>
> On Fri, Jan 29, 2016 at 4:02 PM, Jim Ingham via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
>
>> 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.
>>
>> 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.
>>
>> 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
>>
>> SBListener::StartListeningForEventClass
>>
>> 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.
>>
>> Hope this helps.
>>
>> Jim
>>
>>
>> On Jan 29, 2016, at 2:32 PM, John Lindal via lldb-dev <
>> lldb-dev@lists.llvm.org> wrote:
>>
>> I'm building an X11 UI on top of LLDB, and I'm stuck trying to listen for
>> thread events.
>>
>> lldb_private::Thread is a Broadcaster, but lldb::SBThread doesn't expose
>> a GetBroadcaster() event the way SBProcess does.
>>
>> 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.)
>>
>> Is this a feature that has not yet been implemented?  I couldn't find any
>> related tickets in Bugzilla.
>>
>> Thanks,
>> John Lindal
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>>
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev