Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Kyle McMartin <kmcmarti@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHv5] aarch64: detect atomic sequences like other ll/sc architectures
Date: Wed, 07 May 2014 13:52:00 -0000	[thread overview]
Message-ID: <20140507135217.GC4063@adacore.com> (raw)
In-Reply-To: <20140430160450.GE2148@redacted.bos.redhat.com>

Hi Kyle,

> 2014-04-30  Kyle McMartin  <kyle@redhat.com>
> 
> gdb:
>         * aarch64-tdep.c (aarch64_software_single_step): New function.
>         (aarch64_gdbarch_init): Handle single stepping of atomic sequences
>         with aarch64_software_single_step.
> 
> gdb/testsuite:
>         * gdb.arch/aarch64-atomic-inst.c: New file.
>         * gdb.arch/aarch64-atomic-inst.exp: New file.

Sorry for the delay. One question, see below.

>  gdb/aarch64-tdep.c                             | 79 ++++++++++++++++++++++++++
>  gdb/testsuite/gdb.arch/aarch64-atomic-inst.c   | 48 ++++++++++++++++
>  gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp | 48 ++++++++++++++++
>  3 files changed, 175 insertions(+)
>  create mode 100644 gdb/testsuite/gdb.arch/aarch64-atomic-inst.c
>  create mode 100644 gdb/testsuite/gdb.arch/aarch64-atomic-inst.exp
> 
> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
> index bba10d8..4abe36e 100644
> --- a/gdb/aarch64-tdep.c
> +++ b/gdb/aarch64-tdep.c
> @@ -2509,6 +2509,84 @@ value_of_aarch64_user_reg (struct frame_info *frame, const void *baton)
>  }
>  \f
>  
> +/* Implement the "software_single_step" gdbarch method, needed to
> +   single step through atomic sequences on AArch64.  */
> +
> +static int
> +aarch64_software_single_step (struct frame_info *frame)
> +{
> +  struct gdbarch *gdbarch = get_frame_arch (frame);
> +  struct address_space *aspace = get_frame_address_space (frame);
> +  enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);

AndrewP said that the code is always LE, so why not just use
BFD_ENDIAN_LITTLE in this case, rather than go through
byte_order_for_code?

-- 
Joel


  reply	other threads:[~2014-05-07 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 18:35 [PATCHv4] " Kyle McMartin
2014-04-24 18:39 ` Andrew Pinski
2014-04-24 18:51   ` Kyle McMartin
2014-04-30 16:04 ` [PATCHv5] " Kyle McMartin
2014-05-07 13:52   ` Joel Brobecker [this message]
2014-05-07 15:10     ` Kyle McMartin
2014-05-07 16:41       ` Andrew Pinski
2014-05-07 16:46       ` Joel Brobecker
2014-05-07 18:12         ` Kyle McMartin

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=20140507135217.GC4063@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kmcmarti@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