This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [09/20] Get rid of current_gdbarch in corelow.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:37 +0100
- Subject: [rfc] [09/20] Get rid of current_gdbarch in corelow.c
Hi,
this patch gets rid of some of the current_gdbarch's in corelow.c
Is this ok to commit?
ChangeLog:
* corelow.c (get_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/corelow.c dev/gdb/corelow.c
--- src/gdb/corelow.c 2007-10-30 05:42:24.000000000 +0100
+++ dev/gdb/corelow.c 2007-10-30 06:25:21.000000000 +0100
@@ -503,7 +503,7 @@ get_core_registers (struct regcache *reg
".reg-ppc-vmx", 3, "ppc Altivec", 0);
/* Supply dummy value for all registers not found in the core. */
- for (i = 0; i < gdbarch_num_regs (current_gdbarch); i++)
+ for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
if (!regcache_valid_p (regcache, i))
regcache_raw_supply (regcache, i, NULL);
}