diff options
author | Kevin Buettner <kevinb@redhat.com> | 2005-03-31 19:58:26 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2005-03-31 19:58:26 +0000 |
commit | 547a33f3c60462c9ca23c169054ad51382ddd627 (patch) | |
tree | 7b6f02e2ea6712d6ee808a70b491fd98e9b6bba5 /gdb/gdbarch.h | |
parent | 5324953b41b57efdd2572f3da188dd8716afa9c4 (diff) | |
download | gdb-547a33f3c60462c9ca23c169054ad51382ddd627.tar.gz |
* gdbarch.sh (fetch_tls_load_module_address): New architecture method.
* gdbarch.c, gdbarch.h: Regenerate.
* dwarf2loc.c (dwarf_expr_tls_address): Fetch TLS load module
address and pass this address, instead of the objfile address, to
target_get_thread_local_address().
* linux-thread-db.c (thread_db_get_thread_local_address): Change
second parameter from type ``struct objfile *'' to CORE_ADDR. Do
not call svr4_fetch_objfile_link_map() to fetch the load module
address.
* target.h (struct target_ops): Change second parameter of
``to_get_thread_local_address'' from ``struct objfile *'' to
``CORE_ADDR''.
* alpha-linux-tdep.c (solib-svr4.h): Include.
(alpha_linux_init_abi): Register TLS load module fetcher.
* amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
* hppa-linux-tdep.c (hppa_linux_init_abi): Likewise.
* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
* ia64-linux-tdep.c (solib-svr4.h): Include.
(ia64_linux_init_abi): Register TLS load module fetcher.
* m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
* m68klinux-tdep.c (m68k_linux_init_abi): Likewise.
* mips-linux-tdep.c (mips_linux_init_abi): Likewise.
* s390-tdep.c (s390_gdbarch_init): Likewise.
* sparc-linux-tdep.c (sparc32_linux_init_abi): Likewise.
* sparc64-linux-tdep.c (solib-svr4.h): Include.
(sparc64_linux_init_abi): Register TLS load module fetcher.
* Makefile.in (alpha-linux-tdep.o, ia64-linux-tdep.o)
(sparc-linux-tdep.o): Update dependencies.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5952ef12dbd..a46c90c3e5e 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -977,6 +977,33 @@ typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdba extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); +/* Fetch the target specific address used to represent a load module. */ + +#if defined (FETCH_TLS_LOAD_MODULE_ADDRESS) +/* Legacy for systems yet to multi-arch FETCH_TLS_LOAD_MODULE_ADDRESS */ +#if !defined (FETCH_TLS_LOAD_MODULE_ADDRESS_P) +#define FETCH_TLS_LOAD_MODULE_ADDRESS_P() (1) +#endif +#endif + +extern int gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch); +#if !defined (GDB_TM_FILE) && defined (FETCH_TLS_LOAD_MODULE_ADDRESS_P) +#error "Non multi-arch definition of FETCH_TLS_LOAD_MODULE_ADDRESS" +#endif +#if !defined (FETCH_TLS_LOAD_MODULE_ADDRESS_P) +#define FETCH_TLS_LOAD_MODULE_ADDRESS_P() (gdbarch_fetch_tls_load_module_address_p (current_gdbarch)) +#endif + +typedef CORE_ADDR (gdbarch_fetch_tls_load_module_address_ftype) (struct objfile *objfile); +extern CORE_ADDR gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile); +extern void set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address); +#if !defined (GDB_TM_FILE) && defined (FETCH_TLS_LOAD_MODULE_ADDRESS) +#error "Non multi-arch definition of FETCH_TLS_LOAD_MODULE_ADDRESS" +#endif +#if !defined (FETCH_TLS_LOAD_MODULE_ADDRESS) +#define FETCH_TLS_LOAD_MODULE_ADDRESS(objfile) (gdbarch_fetch_tls_load_module_address (current_gdbarch, objfile)) +#endif + extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); #if !defined (GDB_TM_FILE) && defined (FRAME_ARGS_SKIP) |