aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commit43b1ab882ff7cd3c56458bf6c35031bdb276921c (patch)
treea37840a12fc5d565eb1d74eba19b7514ff29210c /gdb
parentfc989b7a7c5e104396a0d2541ca6843c89b2ef9d (diff)
downloadgdb-43b1ab882ff7cd3c56458bf6c35031bdb276921c.zip
gdb-43b1ab882ff7cd3c56458bf6c35031bdb276921c.tar.gz
gdb-43b1ab882ff7cd3c56458bf6c35031bdb276921c.tar.bz2
2004-03-18 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (skip_prologue): Record only the first LR save.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/rs6000-tdep.c21
2 files changed, 23 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8fd841b..43ad2f8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2004-03-18 Andrew Cagney <cagney@redhat.com>
+ * rs6000-tdep.c (skip_prologue): Record only the first LR save.
+
+2004-03-18 Andrew Cagney <cagney@redhat.com>
+
* config/mips/tm-nbsd.h: Replace IN_SIGTRAMP with
DEPRECATED_IN_SIGTRAMP.
* config/powerpc/tm-linux.h (DEPRECATED_IN_SIGTRAMP): Ditto.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 7c847ef..934b5d3 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 */