2002-09-25 Andrew Cagney <ac131313@redhat.com>

* 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.
This commit is contained in:
Andrew Cagney 2002-09-25 13:34:53 +00:00
parent 1ddd7b13ed
commit 8b69000d63
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2002-09-25 Andrew Cagney <ac131313@redhat.com>
* 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 <jimb@redhat.com>
Fix from Paul Breed:

View File

@ -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);