[RFC] Move TLS load module addr fetching to dwarf2loc.c

Kevin Buettner kevinb@redhat.com
Thu Mar 24 22:51:00 GMT 2005


On Thu, 24 Mar 2005 23:27:50 +0100 (CET)
Ulrich Weigand <uweigand@de.ibm.com> wrote:

> > 	* 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.
> > 	* 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.
> 
> What about s390?  I guess we need the same change ...

I apologize for missing the s390.  (I did my search on *linux-tdep.c.)
How does the patch below look to you?  I've added this to my sandbox
and, if it looks okay to you, I'll check it in when the rest of the
changes go in.

	* s390-tdep.c (s390_gdbarch_init): Register TLS load module fetcher.

Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.142
diff -u -p -r1.142 s390-tdep.c
--- s390-tdep.c	17 Mar 2005 17:44:14 -0000	1.142
+++ s390-tdep.c	24 Mar 2005 22:45:57 -0000
@@ -3007,6 +3007,10 @@ s390_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_print_insn (gdbarch, print_insn_s390);
 
+  /* Enable TLS support.  */
+  set_gdbarch_fetch_tls_load_module_address (gdbarch,
+                                             svr4_fetch_objfile_link_map);
+
   return gdbarch;
 }
 



More information about the Gdb-patches mailing list