From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83001 invoked by alias); 30 Nov 2016 11:15:26 -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 82902 invoked by uid 89); 30 Nov 2016 11:15:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1572 X-HELO: mail-wj0-f194.google.com Received: from mail-wj0-f194.google.com (HELO mail-wj0-f194.google.com) (209.85.210.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Nov 2016 11:15:17 +0000 Received: by mail-wj0-f194.google.com with SMTP id he10so7483987wjc.2 for ; Wed, 30 Nov 2016 03:15:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=iVgQV5NQhlmnaBPOss++bxFUjz3YssjmB/aJrEb1KX0=; b=S5r4QScmRakLn3wP/0N0yyCVWOPdjOEq/4+yZkruG/OtcSjHIoTwqjZ8CHmBu1u/mT Lny9jpnabILk/CPGyX3UYH3OL+NlzRjEQuL0Rd4M5w+Rt9O2WJdESwZKXhgsOcdS+zJu JLTpjYhm1ZPwUmPrMPSJdqS+aIMla7rdcvboLD0QPM/PzJ8yv3eLIomfAAbTahrdjkq6 eKjEJHJ1bfvIh1tyPAtnDPvhlO2u2tOIZF/pmlfDK0I6XluCJ3+P7ruOrcUokbZaTUYi hdvIPt/B4nPfI3+Y6TPvPtC+uFO1fFqrWRYhVTYgVcU5kZkXgFVfN0PT7odx9k0SEgml 3ivA== X-Gm-Message-State: AKaTC03TEzdu33Hj739k+L5nVnCKHXBRPn//klBCB1r5WgIkNVgFEMBn8wQNPblczJkX2g== X-Received: by 10.194.90.231 with SMTP id bz7mr26550972wjb.35.1480504509964; Wed, 30 Nov 2016 03:15:09 -0800 (PST) Received: from E107787-LIN (power8-aix.osuosl.org. [140.211.9.96]) by smtp.gmail.com with ESMTPSA id 197sm7441383wmy.16.2016.11.30.03.15.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 30 Nov 2016 03:15:09 -0800 (PST) Date: Wed, 30 Nov 2016 11:15:00 -0000 From: Yao Qi To: Antoine Tremblay Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] Add unit test to aarch64 prologue analyzer Message-ID: <20161130111459.GG22209@E107787-LIN> References: <1480428758-2481-1-git-send-email-yao.qi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00969.txt.bz2 On Tue, Nov 29, 2016 at 09:57:46AM -0500, Antoine Tremblay wrote: > > Yao Qi writes: > > > @@ -436,6 +461,89 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, > > return start; > > } > > > > +static CORE_ADDR > > +aarch64_analyze_prologue (struct gdbarch *gdbarch, > > + CORE_ADDR start, CORE_ADDR limit, > > + struct aarch64_prologue_cache *cache) > > +{ > > + instruction_reader reader { }; > > + > > Could we use the default constructor here? If it's kept. > It uses the default constructor. instruction_reader has the default constructor. + public: + instruction_reader () = default; Do you mean I need to remove it? > > + return aarch64_analyze_prologue (gdbarch, start, limit, cache, > > + reader); > > +} > > + > > +#if GDB_SELF_TEST > > + > > +namespace selftests { > > + > > + /* Instruction reader from manually cooked instruction sequences. */ > > + class instruction_reader_test : public abstract_instruction_reader > > + { > > + public: > > + instruction_reader_test() = default ; > > Very nit, but there's a space before ';' > Oh, yes, it should be "instruction_reader_test () = default;" > Also I wonder if we need to specify the default constructor explicitly ? > Is there a rationale for it? > > It's never used too, unless you apply my previous comment. The instruction_reader_test default constructor is never used. How about using "= delete"? instruction_reader_test () = delete; instruction_reader_test (std::initializer_list init) : insns{init} {} -- Yao (齐尧)