This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [02/20] Get rid of current_gdbarch in alphabsd-nat.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: Tue, 30 Oct 2007 10:54:02 +0100
- Subject: [rfc] [02/20] Get rid of current_gdbarch in alphabsd-nat.c
Hi,
this patch gets rid of some of the current_gdbarch's in alphabsd-nat.c
Is this ok to commit?
ChangeLog:
* alphabsd-nat.c (alphabsd_fetch_inferior_registers)
(alphabsd_store_inferior_registers): Use get_regcache_arch to get at
the current architecture by regcache.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urpN src/gdb/alphabsd-nat.c dev/gdb/alphabsd-nat.c
--- src/gdb/alphabsd-nat.c 2007-08-23 20:08:26.000000000 +0200
+++ dev/gdb/alphabsd-nat.c 2007-10-30 05:59:28.000000000 +0100
@@ -99,7 +99,7 @@ alphabsd_fetch_inferior_registers (struc
return;
}
- if (regno == -1 || regno >= gdbarch_fp0_regnum (current_gdbarch))
+ if (regno == -1 || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
{
struct fpreg fpregs;
@@ -134,7 +134,7 @@ alphabsd_store_inferior_registers (struc
return;
}
- if (regno == -1 || regno >= gdbarch_fp0_regnum (current_gdbarch))
+ if (regno == -1 || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
{
struct fpreg fpregs;