This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [19/20] Get rid of current_gdbarch in iq2000-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:55:17 +0100
- Subject: [rfc] [19/20] Get rid of current_gdbarch in iq2000-tdep.c
Hi,
this patch gets rid of some of the current_gdbarch's in iq2000-tdep.c
Is this ok to commit?
ChangeLog:
* iq2000-tdep.c (iq2000_frame_prev_register): Use get_frame_arch to get
at the current architecture by frame_info.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urpN src/gdb/iq2000-tdep.c dev2/gdb/iq2000-tdep.c
--- src/gdb/iq2000-tdep.c 2007-08-23 20:08:35.000000000 +0200
+++ dev2/gdb/iq2000-tdep.c 2007-10-30 07:57:53.000000000 +0100
@@ -417,7 +417,8 @@ iq2000_frame_prev_register (struct frame
*addrp = cache->saved_regs[regnum];
*realnump = -1;
if (valuep)
- read_memory (*addrp, valuep, register_size (current_gdbarch, regnum));
+ read_memory (*addrp, valuep,
+ register_size (get_frame_arch (next_frame), regnum));
return;
}