public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB: retrieving pthread local values from a core?
@ 2018-11-15 20:16 Paul Smith
  0 siblings, 0 replies; only message in thread
From: Paul Smith @ 2018-11-15 20:16 UTC (permalink / raw)
  To: gdb

Hi all;

Does anyone have any macros or GDB Python scripting that will allow me
to retrieve the value of a pthread TLS key for the current thread?  I
have the key number returned from pthread_key_create() and I'd like to
do the equivalent of pthread_getspecific(), from a core file.

I've googled around and found a lot of "if you have this or that you
can do it", but I don't really have this or that.  In the code in
question a function failed and stashed a bunch of details about the
failure in a TLS key, then returned up the stack a ways before dumping
core due to a SEGV.  Now I have the core and I'd really like to see
what that error information is, but I can't find a way to get at it...
since all the action around the TLS value was down-stack it's all gone
now (other than the key itself which is in a global variable).

FWIW, I'm using GCC 8.1 on a fairly modern GNU/Linux 64bit system, with
glibc 2.26 and Linux 4.15.

Thanks!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-15 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 20:16 GDB: retrieving pthread local values from a core? Paul Smith

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).