* Patches from Jeffrey Law <law@cs.utah.edu>.
authorStu Grossman <grossman@cygnus>
Wed, 5 May 1993 22:35:32 +0000 (22:35 +0000)
committerStu Grossman <grossman@cygnus>
Wed, 5 May 1993 22:35:32 +0000 (22:35 +0000)
* gdb/hppa-tdep.c (find_dummy_frame_regs):  Rework so that
it does not assume %r4 is the frame pointer.

gdb/ChangeLog
gdb/hppa-tdep.c

index ae489effaa34c479fc4d44801819668e9936e5b8..94677c18279277b080c6735010725621162008c5 100644 (file)
@@ -1,6 +1,8 @@
 Wed May  5 15:16:33 1993  Stu Grossman  (grossman@cygnus.com)
 
         * Patches from Jeffrey Law <law@cs.utah.edu>.
+       * gdb/hppa-tdep.c (find_dummy_frame_regs):  Rework so that
+       it does not assume %r4 is the frame pointer.
        * gdb/hppa-pinsn.c (print_insn): Handle 'r' and 'R' for break, rsm,
        and ssm instructions.
        * gdb/hppa-tdep.c (extract_5r_store, extract_5R_store): New
index 49af79ea12959416729d70d47eb398d13533d111..ca2393886f25876fc3cfb70d14c29373775ac214 100644 (file)
@@ -503,26 +503,26 @@ find_dummy_frame_regs (frame, frame_saved_regs)
   frame_saved_regs->regs[RP_REGNUM] = fp - 20 & ~0x3;
   frame_saved_regs->regs[FP_REGNUM] = fp;
   frame_saved_regs->regs[1] = fp + 8;
-  frame_saved_regs->regs[3] = fp + 12;
 
-  for (fp += 16, i = 5; i < 32; fp += 4, i++)
-    frame_saved_regs->regs[i] = fp;
+  for (fp += 12, i = 3; i < 32; i++)
+    {
+      if (i != FP_REGNUM)
+       {
+         frame_saved_regs->regs[i] = fp;
+         fp += 4;
+       }
+    }
 
   fp += 4;
   for (i = FP0_REGNUM; i < NUM_REGS; i++, fp += 8)
     frame_saved_regs->regs[i] = fp;
 
   frame_saved_regs->regs[IPSW_REGNUM] = fp;
-  fp += 4;
-  frame_saved_regs->regs[SAR_REGNUM] = fp;
-  fp += 4;
-  frame_saved_regs->regs[PCOQ_HEAD_REGNUM] = fp;
-  fp +=4;
-  frame_saved_regs->regs[PCSQ_HEAD_REGNUM] = fp;
-  fp +=4;
-  frame_saved_regs->regs[PCOQ_TAIL_REGNUM] = fp;
-  fp +=4;
-  frame_saved_regs->regs[PCSQ_TAIL_REGNUM] = fp;
+  frame_saved_regs->regs[SAR_REGNUM] = fp + 4;
+  frame_saved_regs->regs[PCOQ_HEAD_REGNUM] = fp + 8;
+  frame_saved_regs->regs[PCSQ_HEAD_REGNUM] = fp + 12;
+  frame_saved_regs->regs[PCOQ_TAIL_REGNUM] = fp + 16;
+  frame_saved_regs->regs[PCSQ_TAIL_REGNUM] = fp + 20;
 }
 
 int