This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libthread_db thread handles


Roland McGrath wrote:
> 
> > If you have the pthread_t value computing the td_thrhandle_t is an
> > operation which can be performed entirely without the looking at the
> > inferior.  At least in the new implementation.  Just call
> > td_ta_map_id2thr().  This shouldn't add any measurable overhead.
> >
> > I would prefer you caching the pthread_t value very much over caching
> > any opaque data structure.  If this means adding a function
> > td_ta_map_thr2id() I'd have no problems with it.  But not even this
> > should be necessary since for both events, TD_CREATE and TD_DEATH, the
> > eventdata is the pthread_t value.  And this should be a documented
> > interface.
> 
> One can already use td_thr_get_info and ti_tid is the pthread_t value (that
> can be given to td_ta_map_id2thr).

That's much better than using thr_unique.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]