This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [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: Sun, 18 Nov 2001 14:40:27 -0700
- Subject: Re: [PATCH] i386-linux-nat.c: Use regcache_collect() in fill_gregset()
- References: <1011118012136.ZM7100@ocotillo.lan>
On Nov 17, 6:21pm, Kevin Buettner wrote:
> I've just committed the following change...
>
> * i386-linux-nat.c (fill_gregset): Use regcache_collect() instead
> of accessing registers[] directly.
But I screwed it up. I've just committed the following patch which fixes
it...
* i386-linux-nat.c (fill_gregset): Fix botched regcache_collect()
conversion for I386_LINUX_ORIG_EAX_REGNUM.
Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.31
diff -u -p -r1.31 i386-linux-nat.c
--- i386-linux-nat.c 2001/11/18 01:19:47 1.31
+++ i386-linux-nat.c 2001/11/18 21:35:37
@@ -325,7 +325,7 @@ fill_gregset (elf_gregset_t *gregsetp, i
regcache_collect (i, regp + regmap[i]);
if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
- regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + regmap[ORIG_EAX]);
+ regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
}
#ifdef HAVE_PTRACE_GETREGS