GDB support for thread-local storage

Daniel Jacobowitz
Fri Jun 21 23:00:00 GMT 2002

On Fri, Jun 21, 2002 at 05:37:27PM -0500, Jim Blandy wrote:
> Daniel Jacobowitz <> writes:
> > On Fri, Jun 21, 2002 at 03:08:03PM -0500, Jim Blandy wrote:
> > > Why aren't we using thread_db, though?  Why can't we run thread_db and
> > > simply serve its memory and register requests from the core file?  I
> > > don't see which part of the interface makes this impossible.  And
> > > we'll need to do it if Linux switches to an NxM thread model, no?
> > 
> > I should add to my previous comment that the use of libthread_db to
> > access TLS data means that such will never be possible in a core file,
> > either, without significant redesign of libthread_db - possibly as some
> > sort of data file which can be loaded separately from the coredump and
> > describe thread structures.
> Well, if the core file support is willing to reach into the notes and
> construct a thread list, what's wrong with having it override the
> `thread_local_storage_get_address' target method, too?

Nothing, you're right.  Whether the corefile will have the details to
do this, however, without incorporating a large chunk of knowledge from
various target libthread_db systems, though - that's dubious at best. 
At least there is an ABI to guide us.

Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

More information about the Gdb mailing list