From: "Michael Snyder" <michsnyd@cisco.com>
To: <gdb-patches@sources.redhat.com>
Cc: <kevinb@redhat.com>
Subject: [RFA] Tweak in skip_prologue for rs6000
Date: Thu, 11 Nov 2004 01:11:00 -0000 [thread overview]
Message-ID: <00c901c4c78b$5e1591f0$5ca56b80@msnyder8600> (raw)
Kevin,
If I'm right, this will prevent saving lr_offset twice. It looks like the
existing code intends to invalidate lr_reg, but setting it to zero is not
an invalid value.
Probably the same is true for cr_reg and cr_offset...
Michael
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).
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.230
diff -p -r1.230 rs6000-tdep.c
*** rs6000-tdep.c 13 Oct 2004 16:38:22 -0000 1.230
--- rs6000-tdep.c 11 Nov 2004 01:04:40 -0000
*************** skip_prologue (CORE_ADDR pc, CORE_ADDR l
*** 981,987 ****
continue;
}
! else if (lr_reg != -1 &&
/* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
(((op & 0xffff0000) == (lr_reg | 0xf8010000)) ||
/* stw Rx, NUM(r1) */
--- 981,987 ----
continue;
}
! else if (lr_reg >= 0 &&
/* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
(((op & 0xffff0000) == (lr_reg | 0xf8010000)) ||
/* stw Rx, NUM(r1) */
*************** skip_prologue (CORE_ADDR pc, CORE_ADDR l
*** 991,997 ****
{ /* where Rx == lr */
fdata->lr_offset = offset;
fdata->nosavedpc = 0;
! lr_reg = 0;
if ((op & 0xfc000003) == 0xf8000000 || /* std */
(op & 0xfc000000) == 0x90000000) /* stw */
{
--- 991,999 ----
{ /* where Rx == lr */
fdata->lr_offset = offset;
fdata->nosavedpc = 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 */
{
next reply other threads:[~2004-11-11 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 1:11 Michael Snyder [this message]
2004-11-11 17:04 ` Kevin Buettner
2004-11-11 19:18 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00c901c4c78b$5e1591f0$5ca56b80@msnyder8600' \
--to=michsnyd@cisco.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox