aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-01-23 01:49:43 +0000
committerDaniel Jacobowitz <drow@false.org>2006-01-23 01:49:43 +0000
commit721d14ba74f11a737711195f28de345a34073de2 (patch)
treed6751a21edeae7cb9a7ecc72052caf500e7c3bcb
parent5625b94380f19d8dae04211a590cae809790e98f (diff)
downloadgdb-721d14ba74f11a737711195f28de345a34073de2.zip
gdb-721d14ba74f11a737711195f28de345a34073de2.tar.gz
gdb-721d14ba74f11a737711195f28de345a34073de2.tar.bz2
PR tdep/2029
Suggested by Till Straumann <strauman@slac.stanford.edu>: * rs6000-tdep.c (skip_prologue): Update check for later mtlr instructions. Handle PIC bcl.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/rs6000-tdep.c13
2 files changed, 17 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ba5ea4c..b8c504f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2006-01-22 Daniel Jacobowitz <dan@codesourcery.com>
+ PR tdep/2029
+ Suggested by Till Straumann <strauman@slac.stanford.edu>:
+ * rs6000-tdep.c (skip_prologue): Update check for later mtlr
+ instructions. Handle PIC bcl.
+
+2006-01-22 Daniel Jacobowitz <dan@codesourcery.com>
+
* config/djgpp/README: Typo fix.
* config/djgpp/fnchange.lst: Update.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 54b33b3..1d4a437 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1,8 +1,8 @@
/* Target-dependent code for GDB, the GNU debugger.
Copyright (C) 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
- Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -1013,7 +1013,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
remember just the first one, but skip over additional
ones. */
- if (lr_reg < 0)
+ if (lr_reg == -1)
lr_reg = (op & 0x03e00000);
if (lr_reg == 0)
r0_contains_arg = 0;
@@ -1126,6 +1126,13 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
continue;
}
+ else if ((op & 0xfe80ffff) == 0x42800005 && lr_reg != -1)
+ {
+ /* bcl 20,xx,.+4 is used to get the current PC, with or without
+ prediction bits. If the LR has already been saved, we can
+ skip it. */
+ continue;
+ }
else if (op == 0x48000005)
{ /* bl .+4 used in
-mrelocatable */