aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2004-11-11 19:21:01 +0000
committerMichael Snyder <msnyder@vmware.com>2004-11-11 19:21:01 +0000
commitbe723e2244f661aabde71e2ba9ec989c62cd6c8d (patch)
tree9e243114867f855dff060cc5d1b2062dafd45f8e
parenta67517f48ea8dba9381df004e6aebf9b1d0d39c2 (diff)
downloadgdb-be723e2244f661aabde71e2ba9ec989c62cd6c8d.zip
gdb-be723e2244f661aabde71e2ba9ec989c62cd6c8d.tar.gz
gdb-be723e2244f661aabde71e2ba9ec989c62cd6c8d.tar.bz2
2004-11-10 msnyder <msnyder@redhat.com>
* rs6000-tdep.c (skip_prologue): After saving lr_offset, must invalidate lr_reg (so we don't try to save it again). Ditto for cr_offset and cr_reg.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/rs6000-tdep.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 82ccc9f..31b0567 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-10 msnyder <msnyder@redhat.com>
+
+ * rs6000-tdep.c (skip_prologue): After saving lr_offset,
+ must invalidate lr_reg (so we don't try to save it again).
+ Ditto for cr_offset and cr_reg.
+
2004-11-05 Jon Beniston <jon@beniston.com>
* remote.c (putpkt_binary) Fix PR gdb/1806. Send an ACK
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 37988a3..b5bb110 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -981,7 +981,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
continue;
}
- else if (lr_reg != -1 &&
+ else if (lr_reg >= 0 &&
/* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
(((op & 0xffff0000) == (lr_reg | 0xf8010000)) ||
/* stw Rx, NUM(r1) */
@@ -991,7 +991,9 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
{ /* where Rx == lr */
fdata->lr_offset = offset;
fdata->nosavedpc = 0;
- lr_reg = 0;
+ /* Invalidate lr_reg, but don't set it to -1.
+ That would mean that it had never been set. */
+ lr_reg = -2;
if ((op & 0xfc000003) == 0xf8000000 || /* std */
(op & 0xfc000000) == 0x90000000) /* stw */
{
@@ -1001,7 +1003,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
continue;
}
- else if (cr_reg != -1 &&
+ else if (cr_reg >= 0 &&
/* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
(((op & 0xffff0000) == (cr_reg | 0xf8010000)) ||
/* stw Rx, NUM(r1) */
@@ -1010,7 +1012,9 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
((op & 0xffff0000) == (cr_reg | 0x94010000))))
{ /* where Rx == cr */
fdata->cr_offset = offset;
- cr_reg = 0;
+ /* Invalidate cr_reg, but don't set it to -1.
+ That would mean that it had never been set. */
+ cr_reg = -2;
if ((op & 0xfc000003) == 0xf8000000 ||
(op & 0xfc000000) == 0x90000000)
{