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 10/18/2014 04:15 PM, Jan Kratochvil wrote:
> Other option suggested by Tom Tromey is implemented by this patch:
> 
> * A new glibc function like __tls_get_addr that takes a link_map address
>   rather than a module id.

I do not think this is a good solution.

If you use this function in jit'd code, you've now deviated from what normal
TLS-accessing sequences look like. Now your code deviates from the published
tls.pdf in the call sequence, and is undocumented, though simple. On top of
that it's a stop-gap measure until we fix things correctly. Because of these
things I object to adding this function to ld's API.

I don't like libthread_db either, but it avoids us having to put a stop-gap
API in ld. I say stop-gap because the real solution is going to be to use
python/DWARF, not any API in ld.

I'm in favour of exactly 3 things:

* New function in libthread_db.

* Heuristics in gdb if libthread_db is not new enough.

* A python or DWARF based parser to replace libthread_db.

Cheers,
Carlos.


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