From: Andrew Cagney Date: Wed, 25 Sep 2002 13:34:53 +0000 (+0000) Subject: 2002-09-25 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b69000d632078058da0ac203a220967f9ce77f7;p=binutils-gdb.git 2002-09-25 Andrew Cagney * rs6000-tdep.c (rs6000_frame_saved_pc): If the link register wasn't saved, and the next innermost frame is a dummy, return the dummy frame's link register. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7e9bf6f2822..4d02daace3b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-09-25 Andrew Cagney + + * rs6000-tdep.c (rs6000_frame_saved_pc): If the link register + wasn't saved, and the next innermost frame is a dummy, return the + dummy frame's link register. + 2002-09-24 Jim Blandy Fix from Paul Breed: diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2df49e136fa..a650f68ac92 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1527,6 +1527,16 @@ rs6000_frame_saved_pc (struct frame_info *fi) if (fi->next->signal_handler_caller) return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET, wordsize); + else if (PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0)) + /* The link register wasn't saved by this frame and the next + (inner, newer) frame is a dummy. Get the link register + value by unwinding it from that [dummy] frame. */ + { + ULONGEST lr; + frame_unwind_unsigned_register (get_next_frame (fi), + tdep->ppc_lr_regnum, &lr); + return lr; + } else return read_memory_addr (FRAME_CHAIN (fi) + tdep->lr_frame_offset, wordsize);