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] [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;
 



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