aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-05-05 22:35:32 +0000
committerStu Grossman <grossman@cygnus>1993-05-05 22:35:32 +0000
commitb227992a7642750bb84d3908db66b89422e14518 (patch)
treef44d4de588c0a9acece521149273ec157899f448 /gdb/hppa-tdep.c
parent68c8d698d4e7df0ca1197ef8546a37d2738957ee (diff)
downloadgdb-b227992a7642750bb84d3908db66b89422e14518.zip
gdb-b227992a7642750bb84d3908db66b89422e14518.tar.gz
gdb-b227992a7642750bb84d3908db66b89422e14518.tar.bz2
* 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.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 49af79e..ca23938 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -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