* rs6000-tdep.c (frame_get_saved_regs): Don't assume that the
authorKevin Buettner <kevinb@redhat.com>
Wed, 9 Apr 2003 22:44:24 +0000 (22:44 +0000)
committerKevin Buettner <kevinb@redhat.com>
Wed, 9 Apr 2003 22:44:24 +0000 (22:44 +0000)
register number for R0 is 0.

gdb/ChangeLog
gdb/rs6000-tdep.c

index 9913691528468c72b34a5e7120e2758c5c95c54a..d65075986bbb613a271f159afa386ba7b5b034a4 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-09  Kevin Buettner  <kevinb@redhat.com>
+
+       * rs6000-tdep.c (frame_get_saved_regs): Don't assume that the
+       register number for R0 is 0.
+
 2003-04-09  J. Brobecker  <brobecker@gnat.com>
 
        * frame.h (struct gdbarch): Add opaque structure definition
index 8cba11c19e7c162adc554a995ce5060a579f6b12..4e7d374e56ece17830b99ea276ff4c81504e652e 100644 (file)
@@ -1646,7 +1646,7 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
       CORE_ADDR gpr_addr = frame_addr + fdatap->gpr_offset;
       for (i = fdatap->saved_gpr; i < 32; i++)
        {
-         get_frame_saved_regs (fi)[i] = gpr_addr;
+         get_frame_saved_regs (fi)[tdep->ppc_gp0_regnum + i] = gpr_addr;
          gpr_addr += wordsize;
        }
     }