This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [03/20] Get rid of current_gdbarch in arm-linux-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: Tue, 30 Oct 2007 10:54:06 +0100
- Subject: [rfc] [03/20] Get rid of current_gdbarch in arm-linux-tdep.c
Hi,
this patch gets rid of some of the current_gdbarch's in arm-linux-tdep.c
Is this ok to commit?
ChangeLog:
* arm-linux-tdep.c (arm_linux_supply_gregset): 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/arm-linux-tdep.c dev/gdb/arm-linux-tdep.c
--- src/gdb/arm-linux-tdep.c 2007-09-27 20:48:32.000000000 +0200
+++ dev/gdb/arm-linux-tdep.c 2007-10-30 06:02:49.000000000 +0100
@@ -392,7 +392,7 @@ arm_linux_supply_gregset (const struct r
reg_pc = extract_unsigned_integer (gregs
+ INT_REGISTER_SIZE * ARM_PC_REGNUM,
INT_REGISTER_SIZE);
- reg_pc = gdbarch_addr_bits_remove (current_gdbarch, reg_pc);
+ reg_pc = gdbarch_addr_bits_remove (get_regcache_arch (regcache), reg_pc);
store_unsigned_integer (pc_buf, INT_REGISTER_SIZE, reg_pc);
regcache_raw_supply (regcache, ARM_PC_REGNUM, pc_buf);
}