aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-25 13:34:53 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-25 13:34:53 +0000
commit8b69000d632078058da0ac203a220967f9ce77f7 (patch)
treee777f04d045d30a00a4b1a3663884e34ad64541f /gdb/rs6000-tdep.c
parent1ddd7b13ed95fd6adb76cdf785bcacdfb1df5441 (diff)
downloadgdb-8b69000d632078058da0ac203a220967f9ce77f7.zip
gdb-8b69000d632078058da0ac203a220967f9ce77f7.tar.gz
gdb-8b69000d632078058da0ac203a220967f9ce77f7.tar.bz2
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.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 2df49e1..a650f68 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);