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] [4/5] Get rid of current_gdbarch in reggroups.c


Hi,

this patch gets rid of some of the current_gdbarch's in reggroups.c

Is this ok to commit?

ChangeLog:


* reggroups.c (default_register_reggroup_p): Replace current_gdbarch by gdbarch.

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



diff -urpN src/gdb/reggroups.c dev/gdb/reggroups.c
--- src/gdb/reggroups.c	2007-08-23 20:08:36.000000000 +0200
+++ dev/gdb/reggroups.c	2007-10-22 11:36:15.000000000 +0200
@@ -157,8 +157,8 @@ default_register_reggroup_p (struct gdba
   int float_p;
   int raw_p;
 
-  if (gdbarch_register_name (current_gdbarch, regnum) == NULL
-      || *gdbarch_register_name (current_gdbarch, regnum) == '\0')
+  if (gdbarch_register_name (gdbarch, regnum) == NULL
+      || *gdbarch_register_name (gdbarch, regnum) == '\0')
     return 0;
   if (group == all_reggroup)
     return 1;
@@ -166,7 +166,7 @@ default_register_reggroup_p (struct gdba
   float_p = TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT;
   /* FIXME: cagney/2003-04-13: Can't yet use gdbarch_num_regs
      (gdbarch), as not all architectures are multi-arch.  */
-  raw_p = regnum < gdbarch_num_regs (current_gdbarch);
+  raw_p = regnum < gdbarch_num_regs (gdbarch);
   if (group == float_reggroup)
     return float_p;
   if (group == vector_reggroup)



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