From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7959 invoked by alias); 15 Sep 2015 11:07:36 -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 7940 invoked by uid 89); 15 Sep 2015 11:07:35 -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,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Sep 2015 11:07:33 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-22-5GMNxBrETIetMQftyySRtg-1; Tue, 15 Sep 2015 12:07:29 +0100 Received: from [10.2.206.88] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 15 Sep 2015 12:07:29 +0100 Message-ID: <55F7FBF0.5000803@arm.com> Date: Tue, 15 Sep 2015 11:07:00 -0000 From: Pierre Langlois User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Yao Qi CC: pierre.langlois@arm.com, "gdb-patches@sourceware.org" Subject: Re: [PATCH 1/8] [AArch64] Use debug_printf instead of fprintf_unfiltered References: <1442230282-20751-1-git-send-email-pierre.langlois@arm.com> <1442230282-20751-2-git-send-email-pierre.langlois@arm.com> <86d1xk3skc.fsf@gmail.com> In-Reply-To: <86d1xk3skc.fsf@gmail.com> X-MC-Unique: 5GMNxBrETIetMQftyySRtg-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00314.txt.bz2 On 15/09/15 11:06, Yao Qi wrote: > Pierre Langlois writes: >=20 >> @@ -3363,8 +3337,7 @@ aarch64_record_load_store (insn_decode_record *aar= ch64_insn_r) >> { >> if (record_debug) >> { >> - fprintf_unfiltered (gdb_stdlog, >> - "Process record: load/store exclusive\n"); >> + debug_printf ("Process record: load/store exclusive\n"); >> } >=20 > After your change, it becomes an one-line statement, so "{" and "}" are no > longer needed. We can remove them too. Here, and somewhere else. OK, I'll fix this. Should the other if statements like this one have braces? I can fix those too in this patch. @@ -261,10 +261,8 @@ decode_add_sub_imm (CORE_ADDR addr, uint32_t insn, uns= igned *rd, unsigned *rn, *imm =3D -*imm; if (aarch64_debug) - fprintf_unfiltered (gdb_stdlog, - "decode: 0x%s 0x%x add x%u, x%u, #%d\n", - core_addr_to_string_nz (addr), insn, *rd, *rn, - *imm); + debug_printf ("decode: 0x%s 0x%x add x%u, x%u, #%d\n", + core_addr_to_string_nz (addr), insn, *rd, *rn, *imm); return 1; } return 0; Thanks, Pierre