Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] ia64-linux-nat.c: Eliminate references to deprecated_registers[]
@ 2004-10-13 21:46 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2004-10-13 21:46 UTC (permalink / raw)
  To: gdb-patches

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]));
     }
 }
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-13 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-13 21:46 [PATCH] ia64-linux-nat.c: Eliminate references to deprecated_registers[] Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox