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]

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


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


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