From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116487 invoked by alias); 30 Jan 2019 15:02:13 -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 116477 invoked by uid 89); 30 Jan 2019 15:02:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Jan 2019 15:02:12 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0UF0YCJ062746 for ; Wed, 30 Jan 2019 10:02:11 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qbdhfa9r6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jan 2019 10:02:10 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Jan 2019 15:02:08 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 30 Jan 2019 15:02:04 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0UF22bE47317160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 30 Jan 2019 15:02:03 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7226EA4053; Wed, 30 Jan 2019 15:02:02 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A419A4055; Wed, 30 Jan 2019 15:02:02 +0000 (GMT) Received: from oc0404454431.ibm.com (unknown [9.152.222.29]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 30 Jan 2019 15:02:02 +0000 (GMT) From: Andreas Arnez To: John Baldwin Cc: Omair Javaid , gdb-patches@sourceware.org, palves@redhat.com, prudo@linux.ibm.com, arnez@linux.vnet.ibm.com, peter.griffin@linaro.org, Ulrich.Weigand@de.ibm.com, kieran@linuxembedded.co.uk Subject: Re: [RFC PATCH 0/6] Support for Linux kernel thread aware debug References: <1548738199-9403-1-git-send-email-omair.javaid@linaro.org> <6c29e316-f1cb-ee65-bc0b-844cba5d74ad@FreeBSD.org> Date: Wed, 30 Jan 2019 15:02:00 -0000 In-Reply-To: <6c29e316-f1cb-ee65-bc0b-844cba5d74ad@FreeBSD.org> (John Baldwin's message of "Tue, 29 Jan 2019 09:30:14 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain x-cbid: 19013015-0028-0000-0000-00000340DA64 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19013015-0029-0000-0000-000023FDE267 Message-Id: X-SW-Source: 2019-01/txt/msg00615.txt.bz2 On Tue, Jan 29 2019, John Baldwin wrote: > I just have one minor suggestion / comment about file names. I maintain > FreeBSD kernel patches for gdb out-of-tree (for various reasons), and those > patches use some similar things (e.g. a different OSABI). My comment has > to do with the filenames. Other osabi-specific files tend to use more > verbose names such as 'linux-arm-nat.c'. I wonder if it makes sense to > spell out linux here as well. I have been using 'arm-fbsd-kern.c' as a > complement to 'arm-fbsd-tdep.c' for the kernel gdbarch. The architecture > independent files follow the patter 'fbsd-k*.c' (e.g. fbsd-kld.c for modules > and fbsd-kthr.c for thread enumeration), but I would be happy to move those > to something like 'fbsd-kern-ld.c' and 'fbsd-kern-thr.c'. For your current > patchset that might mean something like 'linux-kern-tdep.c' instead of > 'lk-tdep.c'. I would also be fine with 'arm-linux-kern-tdep.c' instead of > 'arm-linux-kern.c' perhaps if other folks feel like that is more consistent. I believe it was me who originated the "lk" notation, so maybe I should provide my few cents on its rationale here: 1. The string "linux" in GDB source file names specifically means "GNU/Linux user-space runtime". For instance, "aarch64-linux-tdep.c" implements target-dependent code for GNU/Linux user-space programs on AArch64 hardware. Thus "linux" is reserved for this particular purpose, and collisions should better be avoided. 2. In principle, the Linux kernel runtime is just another runtime environment, like the GNU/Linux user-space runtime or the QNX Neutrino runtime (say). And since all runtimes are named by a single short word so far ("linux", "nbsd", "nto", etc.), it seems consistent to use the same scheme for the Linux kernel runtime as well. In particular this means not to use any dashes or underscores. 3. The runtime name becomes part of many identifiers. Any additional characters make these identifiers more bulky. Thus, in my opinion, the name should be as short as possible. If "lk" is not considered clear enough, alternatives could be something like "lxk", "lkr" (for "Linux kernel runtime"), "linuxk", or "linuxkr". For the FreeBSD kernel I suggest "fbsdk" or "fbsdkr". -- Andreas