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] [18/20] Get rid of current_gdbarch in inf-child.c


Hi,

this patch gets rid of some of the current_gdbarch's in inf-child.c

Is this ok to commit?

ChangeLog:


* inf-child.c (inf_child_fetch_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/inf-child.c dev2/gdb/inf-child.c
--- src/gdb/inf-child.c	2007-08-23 20:08:35.000000000 +0200
+++ dev2/gdb/inf-child.c	2007-10-30 07:55:32.000000000 +0100
@@ -35,7 +35,9 @@ inf_child_fetch_inferior_registers (stru
 {
   if (regnum == -1)
     {
-      for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++)
+      for (regnum = 0;
+	   regnum < gdbarch_num_regs (get_regcache_arch (regcache));
+	   regnum++)
 	regcache_raw_supply (regcache, regnum, NULL);
     }
   else


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