From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8637 invoked by alias); 24 Apr 2014 16:06:13 -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 8624 invoked by uid 89); 24 Apr 2014 16:06:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Apr 2014 16:06:09 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3OG67bN003036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Apr 2014 12:06:07 -0400 Received: from redacted.bos.redhat.com ([10.18.17.143]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3OG65IF018297 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 24 Apr 2014 12:06:06 -0400 Date: Thu, 24 Apr 2014 16:06:00 -0000 From: Kyle McMartin To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv3] aarch64: detect atomic sequences like other ll/sc architectures Message-ID: <20140424160604.GD7588@redacted.bos.redhat.com> References: <20140422165542.GA748@redacted.bos.redhat.com> <20140424125557.GG18355@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140424125557.GG18355@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00500.txt.bz2 On Thu, Apr 24, 2014 at 05:55:57AM -0700, Joel Brobecker wrote: > > 2014-04-22 Kyle McMartin > > > > gdb: > > * aarch64-tdep.c (aarch64_deal_with_atomic_sequence): New function. > > (aarch64_gdbarch_init): Handle single stepping of atomic sequences > > with aarch64_deal_with_atomic_sequence. > > > > gdb/testsuite: > > * gdb.arch/aarch64-atomic-inst.c: New file. > > * gdb.arch/aarch64-atomic-inst.exp: New file. > > This looks good to me. You just forgot to change the name of > the new function in the ChangeLog entry. Also, a couple of > really minor nits that I happen to spot in your patch below, > but they only affect formatting, so the patch is pre-approved. > Thanks! I'll fix the nits below & the changelog and send a v4. Would you be willing to commit? > > + /* Check if the instruction is a conditional branch. */ > > + if (decode_bcond (loc, insn, &cond, &offset)) > > + { > > + > > + if (bc_insn_count >= 1) > > + return 0; > > Did you mean to leave an empty line at the start of the if block? > Not a problem if yoi meant to, but a little unusual, so I thought > I'd ask. > No, my mistake, I had some local variables here that I removed. > > > + > > + /* It is, so we'll try to set a breakpoint at the destination. */ > > + breaks[1] = loc + offset; > > + > > + bc_insn_count++; > > + last_breakpoint++; > > + } > > + > > + /* Look for the Store Exclusive which closes the atomic sequence. */ > > + if (decode_masked_match (insn, 0x3fc00000, 0x08000000)) > > + { > > + closing_insn = loc; > > + break; > > Indentation should be tabs first, and then spaces. I know it's a PITA, > but unfortunately something we try to follow in the GDB project. Can > you fix the "closing_insn" line? > Absolutely, my bad. > Thanks, > -- > Joel regards, Kyle