Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: fix off-by-one error in ppc_collect_gregset
@ 2004-05-07 22:53 Jim Blandy
  2004-05-08  0:42 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2004-05-07 22:53 UTC (permalink / raw)
  To: gdb-patches


Committed as obvious.

This also ought to be using tdep->ppc_gp0_regnum, but that's a
separate patch, on its way.

2004-05-07  Jim Blandy  <jimb@redhat.com>

	* rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in
	loop collecting gprs.

*** gdb/rs6000-tdep.c	2004-05-07 15:54:04.000000000 -0500
--- gdb/rs6000-tdep.c	2004-05-07 17:40:48.000000000 -0500
*************** ppc_collect_gregset (const struct regset
*** 259,265 ****
    int i;
  
    offset = offsets->r0_offset;
!   for (i = 0; i <= 32; i++, offset += 4)
      {
        if (regnum == -1 || regnum == i)
  	ppc_collect_reg (regcache, regnum, gregs, offset);
--- 259,265 ----
    int i;
  
    offset = offsets->r0_offset;
!   for (i = 0; i < 32; i++, offset += 4)
      {
        if (regnum == -1 || regnum == i)
  	ppc_collect_reg (regcache, regnum, gregs, offset);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: fix off-by-one error in ppc_collect_gregset
  2004-05-07 22:53 PATCH: fix off-by-one error in ppc_collect_gregset Jim Blandy
@ 2004-05-08  0:42 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2004-05-08  0:42 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

On 07 May 2004 17:49:22 -0500
Jim Blandy <jimb@redhat.com> wrote:

> Committed as obvious.
> 
> This also ought to be using tdep->ppc_gp0_regnum, but that's a
> separate patch, on its way.
> 
> 2004-05-07  Jim Blandy  <jimb@redhat.com>
> 
> 	* rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in
> 	loop collecting gprs.

Yep, looks good.  Thanks for fixing this.

Kevin


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-08  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 22:53 PATCH: fix off-by-one error in ppc_collect_gregset Jim Blandy
2004-05-08  0:42 ` Kevin Buettner

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