This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [libc patch] __tls_get_addr with link_map * instead of modid
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, libc-alpha at sourceware dot org, gdb-patches at sourceware dot org
- Date: Sat, 25 Oct 2014 08:14:00 +0200
- Subject: Re: [libc patch] __tls_get_addr with link_map * instead of modid
- Authentication-results: sourceware.org; auth=none
- References: <20141018201540 dot GA26252 at host2 dot jankratochvil dot net> <5449B78E dot 1060407 at redhat dot com> <20141024093834 dot GA24090 at host2 dot jankratochvil dot net> <544A60A5 dot 4020701 at redhat dot com> <20141024144014 dot GA2193 at host2 dot jankratochvil dot net> <20141025055516 dot GJ22465 at brightrain dot aerifal dot cx>
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.
Thanks,
Jan