From b227992a7642750bb84d3908db66b89422e14518 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Wed, 5 May 1993 22:35:32 +0000 Subject: [PATCH] * Patches from Jeffrey Law . * gdb/hppa-tdep.c (find_dummy_frame_regs): Rework so that it does not assume %r4 is the frame pointer. --- gdb/ChangeLog | 2 ++ gdb/hppa-tdep.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ae489effaa3..94677c18279 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,8 @@ Wed May 5 15:16:33 1993 Stu Grossman (grossman@cygnus.com) * Patches from Jeffrey Law . + * 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 diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 49af79ea129..ca2393886f2 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 -- 2.30.2