From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52293 invoked by alias); 27 Dec 2018 04:29:34 -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 52277 invoked by uid 89); 27 Dec 2018 04:29:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=Hx-languages-length:1427, overall, eventually, bad X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Dec 2018 04:29:22 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3B9271E4B1; Wed, 26 Dec 2018 23:29:21 -0500 (EST) Subject: Re: [PATCH 3/3] Build gdb "nat" files in subdirectory To: Tom Tromey , gdb-patches@sourceware.org References: <20181224210927.16741-1-tom@tromey.com> <20181224210927.16741-4-tom@tromey.com> From: Simon Marchi Message-ID: Date: Thu, 27 Dec 2018 04:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181224210927.16741-4-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-12/txt/msg00355.txt.bz2 On 2018-12-24 4:09 p.m., Tom Tromey wrote: > This moves the various "nat" object files into the nat/ subdirectory. > This allows for the removal of a pattern rule from the gdb Makefile, > which is a small cleanup. > > I made the configure.nat change in a (semi-) automated way, hopefully > meaning that it is more likely to be correct than had I done it by > hand. > > Eventually I would like for the various configure scripts to only > mention source files, and let the Makefile compute the object file > names. I wrote a small script scraping all .o file names from configure.nat, to see if there is a corresponding .c file (see below if you need it). The only bad one it found is "nat/aarch64-sve-nat/linux-ptrace.o", which should just be nat/linux-ptrace.o, I think. Other than that, it did fine the _U/_S files for Hurd (e.g. notify_S.o). There is no corresponding .c file for that, I don't know if they are generated or what, but I don't think your patch changes anything about that. If you run the script, you'll see it also reports gnu.c... it's a false positive because it matches "gnu.o" in http://www.gnu.org/licenses :). Overall this series LGTM, thanks! Simon import os import re with open('configure.nat') as f: text = f.read() m = re.findall(r'[a-zA-Z0-9/_-]+\.o', text) for o in m: c = o[:-1] + 'c' if not os.path.isfile(c): print('Missing ' + c)