Add a new gdbarch method to resolve the address of TLS variables.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 12 Mar 2019 20:39:02 +0000 (13:39 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 12 Mar 2019 20:45:47 +0000 (13:45 -0700)
commit6e056c817845f3d736a1be6b68c69b439c6c6d25
treec5757ebd000ccd8a2d63440d6ef19db9e8c89d8d
parentcd250a1898bb6fdb41f4a1063dbcfac04affcd11
Add a new gdbarch method to resolve the address of TLS variables.

Permit TLS variable addresses to be resolved purely by an ABI rather
than requiring a target method.  This doesn't try the target method if
the ABI function is present (even if the ABI function fails) to
simplify error handling.

gdb/ChangeLog:

* gdbarch.sh (get_thread_local_address): New method.
* gdbarch.h, gdbarch.c: Regenerate.
* target.c (target_translate_tls_address): Use
gdbarch_get_thread_local_address if present instead of
target::get_thread_local_address.
gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/target.c