This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [04/20] Get rid of current_gdbarch in arm-linux-nat.c
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 31 Oct 2007 05:45:51 +0100
- Subject: Re: [rfc] [04/20] Get rid of current_gdbarch in arm-linux-nat.c
- References: <200710302136.l9ULamF4013605@d12av02.megacenter.de.ibm.com>
Ulrich Weigand schrieb:
Markus Deuling wrote:
this patch gets rid of some of the current_gdbarch's in arm-linux-nat.c
No patch attached ;-)
Oh, really :-) I attached the ChangeLog. Sorry, here is the patch. Ok to commit?
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urpN src/gdb/arm-linux-nat.c dev/gdb/arm-linux-nat.c
--- src/gdb/arm-linux-nat.c 2007-10-15 21:19:17.000000000 +0200
+++ dev/gdb/arm-linux-nat.c 2007-10-30 06:05:38.000000000 +0100
@@ -255,7 +255,8 @@ fetch_register (struct regcache *regcach
if (ARM_PC_REGNUM == regno)
{
regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
- (current_gdbarch, regs[ARM_PC_REGNUM]);
+ (get_regcache_arch (regcache),
+ regs[ARM_PC_REGNUM]);
regcache_raw_supply (regcache, ARM_PC_REGNUM,
(char *) ®s[ARM_PC_REGNUM]);
}
@@ -291,7 +292,7 @@ fetch_regs (struct regcache *regcache)
(char *) ®s[ARM_PC_REGNUM]);
regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
- (current_gdbarch, regs[ARM_PC_REGNUM]);
+ (get_regcache_arch (regcache), regs[ARM_PC_REGNUM]);
regcache_raw_supply (regcache, ARM_PC_REGNUM,
(char *) ®s[ARM_PC_REGNUM]);
}