libthread_db thread handles
Roland McGrath
roland@redhat.com
Tue Jan 14 23:47:00 GMT 2003
> 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).
More information about the Gdb
mailing list