public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: yao@codesourcery.com (Yao Qi)
Cc: Richard.Earnshaw@buzzard.freeserve.co.uk (Richard Earnshaw),
	       gdb-patches@sourceware.org, julian@codesourcery.com
Subject: Re: [patch] Fix PR tdep/12352: Handle str pc, [Rd, #imm] in displaced stepping
Date: Mon, 14 Feb 2011 14:39:00 -0000	[thread overview]
Message-ID: <201102141416.p1EEGPxC014774@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <4D538352.8090303@codesourcery.com> from "Yao Qi" at Feb 10, 2011 02:18:58 PM

Yao Qi wrote:

> A new patch is attached in which PUSH/POP is used.  I also noticed that
> Insn4 should be 'add r4, r4, #16' rather than 'add r4, r4, #8',
> explained in the comments.  After that, the offset of my board is 8.

I think this is wrong: the "pipeline offset" of 8 bytes is already
added to the PC value when it is retrieved by displaced_read_reg
(this applies to any use of PC as source operand in any instruction).

The special case relating to STR PC is about an optional *additional*
offset of 4 bytes (such that PC + 12 instead of PC + 8 is stored);
the "offset" value computed by this routine should therefore be
0 or 4 (not 8 or 12).

> Run patched arm-disp-step.exp on native GDB configured as
> armv7l-unknown-linux-gnueabi.  No failures.

Maybe it would be good to add a test that verifies the value
stored under displaced stepping is identical to the value
stored when running the instruction natively?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2011-02-14 14:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 17:24 Yao Qi
2011-01-06 14:03 ` [Ping : patch] " Yao Qi
2011-01-19 16:17   ` [Ping 2: " Yao Qi
2011-01-22 23:44 ` [patch] " Richard Earnshaw
2011-01-24 13:22   ` Yao Qi
2011-01-31  0:31   ` Yao Qi
2011-01-31 15:56     ` Ulrich Weigand
2011-02-09  6:15       ` Yao Qi
2011-02-09 13:51         ` Ulrich Weigand
2011-02-10  6:19           ` Yao Qi
2011-02-14 14:39             ` Ulrich Weigand [this message]
2011-02-15 10:55               ` Yao Qi
2011-02-15 13:36                 ` Ulrich Weigand
2011-02-15 15:57                   ` Yao Qi

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=201102141416.p1EEGPxC014774@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=Richard.Earnshaw@buzzard.freeserve.co.uk \
    --cc=gdb-patches@sourceware.org \
    --cc=julian@codesourcery.com \
    --cc=yao@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).