This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [18/20] Get rid of current_gdbarch in inf-child.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:55:13 +0100
- Subject: [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