From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12638 invoked by alias); 7 May 2014 13:52:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12625 invoked by uid 89); 7 May 2014 13:52:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 07 May 2014 13:52:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 06FDF1161A7; Wed, 7 May 2014 09:52:19 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hzX2+w2JFVRZ; Wed, 7 May 2014 09:52:18 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D2E281161A5; Wed, 7 May 2014 09:52:18 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D4EE4E0497; Wed, 7 May 2014 06:52:17 -0700 (PDT) Date: Wed, 07 May 2014 13:52:00 -0000 From: Joel Brobecker To: Kyle McMartin Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv5] aarch64: detect atomic sequences like other ll/sc architectures Message-ID: <20140507135217.GC4063@adacore.com> References: <20140424183510.GI7588@redacted.bos.redhat.com> <20140430160450.GE2148@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140430160450.GE2148@redacted.bos.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-05/txt/msg00065.txt.bz2 Hi Kyle, > 2014-04-30 Kyle McMartin > > 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) > } > > > +/* 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