Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch]: Remove current_gdbarch from target.c
@ 2008-05-19 15:19 Markus Deuling
  2008-05-20 17:04 ` Ulrich Weigand
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Deuling @ 2008-05-19 15:19 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

Hi,

this patch removes the last occurence of current_gdbarch from target.c Tested on x86_64 without
regression.

Ok to commit?


ChangeLog:

	* target.c (target_translate_tls_address): Replace current_gdbarch by
	objfile arch.

Regards,
Markus

-- 
  Markus Deuling
  GNU Toolchain for Linux on Cell BE
  deuling@de.ibm.com


[-- Attachment #2: diff-target --]
[-- Type: text/plain, Size: 1098 bytes --]

diff -urpN src/gdb/target.c dev/gdb/target.c
--- src/gdb/target.c	2008-05-13 13:42:06.000000000 +0200
+++ dev/gdb/target.c	2008-05-16 08:31:42.000000000 +0200
@@ -825,9 +825,10 @@ CORE_ADDR
 target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
 {
   volatile CORE_ADDR addr = 0;
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
 
   if (target_get_thread_local_address_p ()
-      && gdbarch_fetch_tls_load_module_address_p (current_gdbarch))
+      && gdbarch_fetch_tls_load_module_address_p (gdbarch))
     {
       ptid_t ptid = inferior_ptid;
       volatile struct gdb_exception ex;
@@ -837,8 +838,7 @@ target_translate_tls_address (struct obj
 	  CORE_ADDR lm_addr;
 	  
 	  /* Fetch the load module address for this objfile.  */
-	  lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch,
-	                                                   objfile);
+	  lm_addr = gdbarch_fetch_tls_load_module_address (gdbarch, objfile);
 	  /* If it's 0, throw the appropriate exception.  */
 	  if (lm_addr == 0)
 	    throw_error (TLS_LOAD_MODULE_NOT_FOUND_ERROR,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-20 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-19 15:19 [patch]: Remove current_gdbarch from target.c Markus Deuling
2008-05-20 17:04 ` Ulrich Weigand
2008-05-20 17:53   ` Daniel Jacobowitz
2008-05-20 18:38     ` Ulrich Weigand
2008-05-20 18:39       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox