From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44363 invoked by alias); 23 Jun 2017 12:36:43 -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 42727 invoked by uid 89); 23 Jun 2017 12:36:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=lifting, UD:co.uk X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 12:36:39 +0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5NCabDv021915 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2017 12:36:37 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v5NCaaLE008726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2017 12:36:37 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v5NCaa4d001069; Fri, 23 Jun 2017 12:36:36 GMT Received: from [10.175.254.219] (/10.175.254.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Jun 2017 05:36:36 -0700 Subject: Re: File name convention ARCH-OSABI-tdep.c To: gdb-patches@sourceware.org Cc: Yao Qi References: <868tklhct8.fsf@gmail.com> From: Ivo Raisr Message-ID: Date: Fri, 23 Jun 2017 12:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <868tklhct8.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00676.txt.bz2 On 21.6.2017 12:09, Yao Qi wrote: > > Hi, > I want to extend the *-tdep.c file name convention. The current > convention is ARCH-OSABI-tdep.c, and I want to extend it to > ARCH-OSABI-tdep-FUNC.c, in which FUNC is about a certain functionality > or feature about this target. > > The sparc64 adi patch > (https://sourceware.org/ml/gdb-patches/2017-06/msg00472.html) adds a new > file sparc64-adi-tdep.c which should be merged to sparc64-tdep.c > according to the current naming convention. However, I think it is good > to put different things in different files. So with the new convention > proposed here, the new file can be sparc64-tdep-adi.c. > > Secondly, some *-tdep.c files are already quite large, arm-tdep.c is of > 399434 bytes, 13318 lines. It is the 5th largest file. arm-tdep.c > includes many things which are not related to each, like displaced > stepping and process record. I am thinking that we should allow people > moving them out of *-tdep.c to *-tdep-displaced.c and *-tdep-precord.c. > I support this idea as well. There were already discussions about how big a file can get to become largely unmaintainable. See for example https://softwareengineering.stackexchange.com/questions/176999/at-what-point-range-is-a-code-file-too-big http://swreflections.blogspot.co.uk/2012/12/rule-of-30-when-is-method-class-or.html So lifting the current file name convention will allow the files to become manageable again. I.