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]

[rfc] [03/17] Get rid of current_gdbarch in user-regs.c


Hi,

this patch gets rid of some of the current_gdbarch's in user-regs.c
Is this ok to commit?

ChangeLog:


* user-regs.c (user_reg_map_name_to_regnum): Replace current_gdbarch by gdbarch.

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




diff -urpN src/gdb/user-regs.c dev/gdb/user-regs.c
--- src/gdb/user-regs.c	2007-08-23 20:08:46.000000000 +0200
+++ dev/gdb/user-regs.c	2007-10-11 08:18:57.000000000 +0200
@@ -154,8 +154,8 @@ user_reg_map_name_to_regnum (struct gdba
 	if ((len < 0 && strcmp (reg->name, name))
 	    || (len == strlen (reg->name)
 		&& strncmp (reg->name, name, len) == 0))
-	  return gdbarch_num_regs (current_gdbarch)
-		 + gdbarch_num_pseudo_regs (current_gdbarch) + nr;
+	  return gdbarch_num_regs (gdbarch)
+		 + gdbarch_num_pseudo_regs (gdbarch) + nr;
       }
   }
 




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