From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10958 invoked by alias); 24 Apr 2014 12:56:00 -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 10944 invoked by uid 89); 24 Apr 2014 12:56:00 -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; Thu, 24 Apr 2014 12:55:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DBF90116185; Thu, 24 Apr 2014 08:55:56 -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 hT55QXB+1YfJ; Thu, 24 Apr 2014 08:55:56 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B4064116179; Thu, 24 Apr 2014 08:55:56 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C9B94E064D; Thu, 24 Apr 2014 05:55:57 -0700 (PDT) Date: Thu, 24 Apr 2014 12:56:00 -0000 From: Joel Brobecker To: Kyle McMartin Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv3] aarch64: detect atomic sequences like other ll/sc architectures Message-ID: <20140424125557.GG18355@adacore.com> References: <20140422165542.GA748@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140422165542.GA748@redacted.bos.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-04/txt/msg00496.txt.bz2 > 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. > + /* 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. > + > + /* 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? Thanks, -- Joel