From: Michael Snyder Date: Thu, 11 Nov 2004 19:21:01 +0000 (+0000) Subject: 2004-11-10 msnyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be723e2244f661aabde71e2ba9ec989c62cd6c8d;p=binutils-gdb.git 2004-11-10 msnyder * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 82ccc9f8e02..31b05675f92 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-11-10 msnyder + + * 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 * remote.c (putpkt_binary) Fix PR gdb/1806. Send an ACK diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 37988a37f64..b5bb1108f90 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) {