This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] ia64-linux-nat.c: Eliminate references todeprecated_registers[]
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 13 Oct 2004 14:46:20 -0700
- Subject: [PATCH] ia64-linux-nat.c: Eliminate references todeprecated_registers[]
- Organization: Red Hat
I've just committed the change below. Tested on native
ia64-unknown-linux-gnu.
* ia64-linux-nat.c (fill_gregset, fill_fpregset): Replace
references to deprecated_registers[] with equivalent code.
Index: ia64-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v
retrieving revision 1.25
diff -u -p -r1.25 ia64-linux-nat.c
--- ia64-linux-nat.c 8 Oct 2004 17:30:47 -0000 1.25
+++ ia64-linux-nat.c 13 Oct 2004 21:36:53 -0000
@@ -418,8 +418,7 @@ fill_gregset (gregset_t *gregsetp, int r
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (regp + _idx_, &deprecated_registers[DEPRECATED_REGISTER_BYTE (_regi_)], \
- register_size (current_gdbarch, _regi_))
+ regcache_raw_collect (current_regcache, _regi_, regp + _idx_)
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -476,17 +475,12 @@ void
fill_fpregset (fpregset_t *fpregsetp, int regno)
{
int regi;
- char *to;
- char *from;
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
if ((regno == -1) || (regno == regi))
- {
- from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
- to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
- memcpy (to, from, register_size (current_gdbarch, regi));
- }
+ regcache_raw_collect (current_regcache, regi,
+ &((*fpregsetp)[regi - IA64_FR0_REGNUM]));
}
}