This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [2/5] Get rid of current_gdbarch in i387-tdep.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: Mon, 22 Oct 2007 11:58:39 +0200
- Subject: [rfc] [2/5] Get rid of current_gdbarch in i387-tdep.c
Hi,
this patch gets rid of some of the current_gdbarch's in i387-tdep.c
Is this ok to commit?
ChangeLog:
* i387-tdep.c (i387_collect_fsave, i387_collect_fxsave): 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/i387-tdep.c dev/gdb/i387-tdep.c
--- src/gdb/i387-tdep.c 2007-08-23 20:08:34.000000000 +0200
+++ dev/gdb/i387-tdep.c 2007-10-22 10:49:37.000000000 +0200
@@ -435,7 +435,7 @@ i387_supply_fsave (struct regcache *regc
void
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
gdb_byte *regs = fsave;
int i;
@@ -623,7 +623,7 @@ i387_supply_fxsave (struct regcache *reg
void
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
gdb_byte *regs = fxsave;
int i;