summaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-03-18 20:30:08 +0000
committerAndrew Cagney <cagney@redhat.com>2004-03-18 20:30:08 +0000
commit61d4abcd94f18c2946f2da381a4aebb7fea42dd4 (patch)
tree1cb10fc08c27b37f5dd2c2108251f4c3eb186373 /gdb/rs6000-tdep.c
parent554fa359c6e0bba3999d15383167519f3ce0783a (diff)
downloadgdb-61d4abcd94f18c2946f2da381a4aebb7fea42dd4.tar.gz
2004-03-18 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (skip_prologue): Record only the first LR save.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 7c847ef1830..934b5d303b3 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -551,9 +551,26 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */
- lr_reg = (op & 0x03e00000);
+ /* Since shared library / PIC code, which needs to get its
+ address at runtime, can appear to save more than one link
+ register vis:
+
+ *INDENT-OFF*
+ stwu r1,-304(r1)
+ mflr r3
+ bl 0xff570d0 (blrl)
+ stw r30,296(r1)
+ mflr r30
+ stw r31,300(r1)
+ stw r3,308(r1);
+ ...
+ *INDENT-ON*
+
+ remember just the first one, but skip over additional
+ ones. */
+ if (lr_reg < 0)
+ lr_reg = (op & 0x03e00000);
continue;
-
}
else if ((op & 0xfc1fffff) == 0x7c000026)
{ /* mfcr Rx */