From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96964 invoked by alias); 18 Sep 2017 16:24:18 -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 96864 invoked by uid 89); 18 Sep 2017 16:24:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=kitchen X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Sep 2017 16:24:07 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v8IGO1F4009368 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Sep 2017 12:24:05 -0400 Received: by simark.ca (Postfix, from userid 112) id E08891ECF6; Mon, 18 Sep 2017 12:24:00 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 8FA521EA1D; Mon, 18 Sep 2017 12:23:58 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 18 Sep 2017 16:24:00 -0000 From: Simon Marchi To: Pedro Alves Cc: Walfred Tedeschi , qiyaoltc@gmail.com, gdb-patches@sourceware.org Subject: Re: [PATCH] icc: allow code path for newer versions of icc. In-Reply-To: <59e18301-7b12-2e92-6277-0aef4164243e@redhat.com> References: <1504687613-14649-1-git-send-email-walfred.tedeschi@intel.com> <59e18301-7b12-2e92-6277-0aef4164243e@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 18 Sep 2017 16:24:01 +0000 X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00449.txt.bz2 On 2017-09-18 17:34, Pedro Alves wrote: > Hi, > > I read the patch and I found a few nits to pick. > See below. > > On 09/06/2017 09:46 AM, Walfred Tedeschi wrote: >> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c >> index 6678b33..4aa3b3e 100644 >> --- a/gdb/dwarf2read.c >> +++ b/gdb/dwarf2read.c >> @@ -604,7 +604,7 @@ struct dwarf2_cu >> unsigned int checked_producer : 1; > > ... > >> >> +#if defined GDB_SELF_TEST >> +#include "selftest.h" >> + >> +namespace selftests { >> +namespace gdbserver { >> +static void >> +dwarf_producer_test () > > Simon already pointed at the gdbserver namespace. I'd like > to add that it looks odd to me to define the actual > functionality in utils.c and define the corresponding self > tests in dwarf2read.c. Why not put the tests in utils.c as well? > > BTW, I'd support moving all these producer checks to > a separate file (maybe producer.c), instead of putting > it all in the utils.c kitchen sync, though that's a > preexisting issue. I agree about that. I almost wrote that this function didn't really belong in utils.c, until I saw that it's where other similar functions were already. Simon