From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11838 invoked by alias); 15 Mar 2019 23:13:40 -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 11819 invoked by uid 89); 15 Mar 2019 23:13:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=UD:observable.h, observableh, observable.h, HX-Languages-Length:1690 X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Mar 2019 23:13:37 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway32.websitewelcome.com (Postfix) with ESMTP id A9D2EE21BC for ; Fri, 15 Mar 2019 18:13:35 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 4w19hywQndnCe4w19hs8PY; Fri, 15 Mar 2019 18:13:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DqpjVaUNZM/kWRyu15ZIRVN3RmEBY3n2V3JDxI/gNiQ=; b=jQwoW3wuR/zwqCuB7A//VsCuE6 s89IfC15JJzr7Bw3YHunESzZfPClnJxiw9k2etPRoRCGiJ6a3njfPneuJUt1pk7rnuVYAQMFLHxsw Ess/UQWW1PAuCp7fdErVobgr1; Received: from 174-29-37-56.hlrn.qwest.net ([174.29.37.56]:40784 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h4w19-002jr3-Ck; Fri, 15 Mar 2019 18:13:35 -0500 From: Tom Tromey To: Tom Tromey Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [RFC] Sort #includes in gdb References: <87fttfmnpq.fsf@tromey.com> <878sygydob.fsf@tromey.com> Date: Fri, 15 Mar 2019 23:13:00 -0000 In-Reply-To: <878sygydob.fsf@tromey.com> (Tom Tromey's message of "Fri, 15 Feb 2019 13:55:32 -0700") Message-ID: <87r2b7viht.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-03/txt/msg00325.txt.bz2 Pedro> ISTR that you could point the bot at some branch instead of a patch? Tom> I don't know but I will ask Sergio when he's back. I think it can't be done. Pedro> No firm opinion on comments vs no comments. Tom> For now at least, I'm sticking with "no comments" because the lack of Tom> comment-handling in the script means that adding comments makes the Tom> script non-idempotent. But, idempotency is a good quality to have, Tom> because it means the script can be re-run at any time to fix any Tom> "regressions" that have crept in. I thought about this some more and I went back and implemented limited comment-scanning, to make this work. I think this is nicer because it provides an in-source guide to developers saying where to add a new #include. I've appended the relevant bits from the rewritten objfiles.c. Let me know what you think. Tom #include "defs.h" #include "objfiles.h" /* Standard C includes. */ #include #include #include /* Standard C++ includes. */ #include /* Local non-gdb includes. */ #include "bfd.h" #include "hashtab.h" /* Local subdirectory includes. */ #include "common/pathstuff.h" /* Local includes. */ #include "addrmap.h" #include "arch-utils.h" #include "bcache.h" #include "block.h" #include "breakpoint.h" #include "btrace.h" #include "complaints.h" #include "dictionary.h" #include "exec.h" #include "expression.h" #include "gdb-stabs.h" #include "gdb_bfd.h" #include "gdb_obstack.h" #include "observable.h" #include "parser-defs.h" #include "psymtab.h" #include "solist.h" #include "source.h" #include "symfile.h" #include "symtab.h" #include "target.h"