This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] i386-linux-nat.c: Use regcache_collect() in fill_gregset()


I've just committed the following change...

	* i386-linux-nat.c (fill_gregset): Use regcache_collect() instead
	of accessing registers[] directly.

Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.30
diff -u -p -r1.30 i386-linux-nat.c
--- i386-linux-nat.c	2001/11/17 23:53:16	1.30
+++ i386-linux-nat.c	2001/11/18 01:15:56
@@ -322,11 +322,10 @@ fill_gregset (elf_gregset_t *gregsetp, i
 
   for (i = 0; i < NUM_GREGS; i++)
     if ((regno == -1 || regno == i))
-      *(regp + regmap[i]) = *(elf_greg_t *) &registers[REGISTER_BYTE (i)];
+      regcache_collect (i, regp + regmap[i]);
 
   if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
-    *(regp + regmap[ORIG_EAX]) =
-      *(elf_greg_t *) &registers[REGISTER_BYTE (I386_LINUX_ORIG_EAX_REGNUM)];
+    regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + regmap[ORIG_EAX]);
 }
 
 #ifdef HAVE_PTRACE_GETREGS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]