This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [03/17] Get rid of current_gdbarch in user-regs.c
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Thu, 11 Oct 2007 10:53:45 +0200
- Subject: [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;
}
}