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]

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);


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