This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libc patch] __tls_get_addr with link_map * instead of modid


On Sat, Oct 25, 2014 at 08:14:00AM +0200, Jan Kratochvil wrote:
> On Sat, 25 Oct 2014 07:55:16 +0200, Rich Felker wrote:
> > On Fri, Oct 24, 2014 at 04:40:14PM +0200, Jan Kratochvil wrote:
> > > I forgot about this possibility - that libthread_db would provide just the
> > > module ID (and not some per-thread address).
> > 
> > Why not just use dl_iterate_phdr to get the module id?
> 
> I do not see where to find l_tls_modid in the returned data structures.
> 
> dl_iterate_phdr is in libc.so.6 (and not libdl.so.2) so that would be OK.

Oh, it looks like it's only available in the BSD version of on the
dl_phdr_info structure. Could we get it added to glibc? See:

http://www.freebsd.org/cgi/man.cgi?query=dl_iterate_phdr&sektion=3&apropos=0&manpath=FreeBSD%2B10.0-RELEASE

This is the version of the structure I accepted for inclusion in musl,
and I don't think I was even aware that glibc lacked these fields.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]