Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Florian Weimer via Gdb <gdb@sourceware.org>
Cc: Florian Weimer <fweimer@redhat.com>
Subject: Re: Accessing pthread_key_create thread-specific data
Date: Fri, 12 Mar 2021 08:54:52 -0700	[thread overview]
Message-ID: <87wnuc2wqb.fsf@tromey.com> (raw)
In-Reply-To: <874khg5xxn.fsf@oldenburg.str.redhat.com> (Florian Weimer via Gdb's message of "Fri, 12 Mar 2021 14:00:36 +0100")

>>>>> "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

  reply	other threads:[~2021-03-12 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 13:00 Florian Weimer via Gdb
2021-03-12 15:54 ` Tom Tromey [this message]
2021-03-12 16:00   ` Florian Weimer via Gdb
2021-03-12 16:39     ` Andrew Dinn via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnuc2wqb.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=fweimer@redhat.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox