* Accessing pthread_key_create thread-specific data
@ 2021-03-12 13:00 Florian Weimer
2021-03-12 15:54 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2021-03-12 13:00 UTC (permalink / raw)
To: gdb
We have some functionality in libthread_db in glibc that provides access
to pthread_key_create thread-specific data (aka pthread_setspecific and
pthread_getspecific). I would like to write a GDB test for this
functionality, but I can't find how GDB exposes this data in the UI. Is
this just dead code?
The symbols we provide are td_ta_tsd_iter and td_thr_tsd.
Thanks,
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Accessing pthread_key_create thread-specific data
2021-03-12 13:00 Accessing pthread_key_create thread-specific data Florian Weimer
@ 2021-03-12 15:54 ` Tom Tromey
2021-03-12 16:00 ` Florian Weimer
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2021-03-12 15:54 UTC (permalink / raw)
To: Florian Weimer via Gdb; +Cc: Florian Weimer
>>>>> "Florian" == Florian Weimer via Gdb <gdb@sourceware.org> writes:
Florian> We have some functionality in libthread_db in glibc that provides access
Florian> to pthread_key_create thread-specific data (aka pthread_setspecific and
Florian> pthread_getspecific). I would like to write a GDB test for this
Florian> functionality, but I can't find how GDB exposes this data in the UI. Is
Florian> this just dead code?
As far as I know, these aren't used and I think have never been used.
I'm not sure how I would go about exposing this to users. The most
natural way might be to intercept calls to pthread_*specific. Maybe a
couple of new convenience functions would be good though, and less
magical.
I guess this would primarily be useful for core file debugging?
Assuming inferior calls to pthread_*specific already work -- I haven't
tried.
thanks,
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Accessing pthread_key_create thread-specific data
2021-03-12 15:54 ` Tom Tromey
@ 2021-03-12 16:00 ` Florian Weimer
2021-03-12 16:39 ` Andrew Dinn
0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2021-03-12 16:00 UTC (permalink / raw)
To: Tom Tromey; +Cc: Florian Weimer via Gdb
* Tom Tromey:
>>>>>> "Florian" == Florian Weimer via Gdb <gdb@sourceware.org> writes:
>
> Florian> We have some functionality in libthread_db in glibc that provides access
> Florian> to pthread_key_create thread-specific data (aka pthread_setspecific and
> Florian> pthread_getspecific). I would like to write a GDB test for this
> Florian> functionality, but I can't find how GDB exposes this data in the UI. Is
> Florian> this just dead code?
>
> As far as I know, these aren't used and I think have never been used.
Thanks for conforming.
> I'm not sure how I would go about exposing this to users. The most
> natural way might be to intercept calls to pthread_*specific. Maybe a
> couple of new convenience functions would be good though, and less
> magical.
>
> I guess this would primarily be useful for core file debugging?
That's a good point. The data structures are not completely trivial to
decode even if you have debuginfo symbols.
I do not plan to work on that. I just had to make some changes on the
glibc side, but I guess I just won't be able to test them.
Thanks,
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Accessing pthread_key_create thread-specific data
2021-03-12 16:00 ` Florian Weimer
@ 2021-03-12 16:39 ` Andrew Dinn
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Dinn @ 2021-03-12 16:39 UTC (permalink / raw)
To: Florian Weimer, Tom Tromey; +Cc: Florian Weimer via Gdb
On 12/03/2021 16:00, Florian Weimer via Gdb wrote:
> * Tom Tromey:
>> As far as I know, these aren't used and I think have never been used.
>
> Thanks for conforming.
I have never heard Tom accused of that before ;-)
regards,
Andrew Dinn
-----------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-12 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 13:00 Accessing pthread_key_create thread-specific data Florian Weimer
2021-03-12 15:54 ` Tom Tromey
2021-03-12 16:00 ` Florian Weimer
2021-03-12 16:39 ` Andrew Dinn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).