This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: fix off-by-one error in ppc_collect_gregset
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 07 May 2004 17:49:22 -0500
- Subject: PATCH: fix off-by-one error in ppc_collect_gregset
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);