public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Weigand <uweigand@de.ibm.com>
To: will schmidt <will_schmidt@vnet.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb-power10-single-step
Date: Wed, 10 Mar 2021 18:50:15 +0100	[thread overview]
Message-ID: <20210310175015.GA4142@oc3748833570.ibm.com> (raw)
In-Reply-To: <983294f95974a6a3572d31b077f0ca66de554655.camel@vnet.ibm.com>

Will Schmidt wrote:

>   This is a patch written by Alan Modra.  With his permission
> I'm submitting this for review and helping get this upstream.
> 
> Powerpc / Power10 ISA 3.1 adds prefixed instructions, which
> are 8 bytes in length.  This is in contrast to powerpc previously
> always having 4 byte instruction length.  This patch implements
> changes to allow GDB to better detect prefixed instructions, and
> handle single stepping across the 8 byte instructions.

There's a few issues I see here:

- The patch now *forces* software single-stepping for all 8-byte
  instructions.  I'm not sure why this is necessary; I thought
  that hardware single-stepping was supported for 8-byte instructions
  as well?  That would certainly be preferable.

- However, the inner loop of ppc_deal_with_atomic_sequence should
  probably be updated to correctly skip 8-byte instructions; e.g.
  to avoid mistakenly recognizing the second word of an 8-byte
  instructions for a branch or store conditional.  (Also, the
  count of up to "16 instructions" is wrong if 8-byte instructions
  are not handled specifically.)

- In ppc_displaced_step_fixup 8-byte instructions are now recognized,
  and this is good as far as it goes.  However, there are some 8-byte
  instruction that have PC-relative semantics, and those will need
  an additional fixup.  (Note that this same fixup is already missing
  for the Power9 addpcis instruction, see bug 27525).

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2021-03-10 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 18:51 will schmidt
2021-03-10 17:50 ` Ulrich Weigand [this message]
2021-03-16 21:48   ` will schmidt
2021-03-25 17:21   ` will schmidt

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=20210310175015.GA4142@oc3748833570.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.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).