This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [10/20] Get rid of current_gdbarch in core-regset.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:42 +0100
- Subject: [rfc] [10/20] Get rid of current_gdbarch in core-regset.c
Hi,
this patch gets rid of some of the current_gdbarch's in core-regset.c
Is this ok to commit?
ChangeLog:
* core-regset.c (fetch_core_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/core-regset.c dev/gdb/core-regset.c
--- src/gdb/core-regset.c 2007-08-23 20:08:27.000000000 +0200
+++ dev/gdb/core-regset.c 2007-10-30 06:27:20.000000000 +0100
@@ -85,7 +85,7 @@ fetch_core_registers (struct regcache *r
else
{
memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
- if (gdbarch_fp0_regnum (current_gdbarch) >= 0)
+ if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) >= 0)
supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset_p);
}
break;