This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] i386-linux-nat.c: Use regcache_collect() in fill_gregset()
- From: Kevin Buettner <kevinb at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 17 Nov 2001 18:21:36 -0700
- Subject: [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 *) ®isters[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 *) ®isters[REGISTER_BYTE (I386_LINUX_ORIG_EAX_REGNUM)];
+ regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + regmap[ORIG_EAX]);
}
#ifdef HAVE_PTRACE_GETREGS