From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id etP0FCrXyF87DAAAWB0awg (envelope-from ) for ; Thu, 03 Dec 2020 07:16:42 -0500 Received: by simark.ca (Postfix, from userid 112) id 48DBB1F0AB; Thu, 3 Dec 2020 07:16:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AEB6E1E58E for ; Thu, 3 Dec 2020 07:16:40 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C7643858024; Thu, 3 Dec 2020 12:16:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C7643858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1606997800; bh=+zGPHYgJIqDWJsdevuIVqA7Xdtphg53XdGo58s4rv5A=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=g/VR73RKPWTqc4EEuqKqt2CMB4vJOl5d3JaT+brWC0u3F+C3yIRJA02r7APvHJbwq 5KWDHyk6g6l22bf8kvX4UXu9gYaJ4DChkIML6UVhDvNtpp+6hj8qrzJN7AHRZx7yE2 5B/W0RQGduQ03AWHZhfvL8Ywd4Mpl+UjYmt8p4Kw= Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by sourceware.org (Postfix) with ESMTPS id BBDBE3858024 for ; Thu, 3 Dec 2020 12:16:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BBDBE3858024 Received: by mail-qk1-x741.google.com with SMTP id q22so1787747qkq.6 for ; Thu, 03 Dec 2020 04:16:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+zGPHYgJIqDWJsdevuIVqA7Xdtphg53XdGo58s4rv5A=; b=Ri9AZg1TYa1nHmgMjItYTBrIVDw5lKcgMePo1kSkf+8GwiaBf+P+PX+JIp1y221LJ9 xiFfEuNP+UbVWbDOn3jVWBmSlsWhkyBvXd2avGTLJZtj2KV8xj3qOFkSdGx6tYDP/VtL EqPO25InwptEUVFVLi6P7ppFjxSbooQwGj1OL0oLLL0yp9BKC/3Cp6WGK0d4mHr9hi0q eaa4Z925kwztS+euNgJWgcAW7i9hkUyjQMZJdlM/xWyieQfZW0MndxXCgzoOVRYvkFes hB/4OPazjpFUsx1zJQJyPHExwFCmQi18LXFqTTm7kgS+GBtk9QvCFr4BGIC9mlBSJlXh wppA== X-Gm-Message-State: AOAM530UBOMMdFLcKzBVI8unSYlYGw5yXtvngOpkYuhEiD0XUgFlGVlZ qd+W1Xeys+IPhCCKpIgM53Me4ifXEwOMNw== X-Google-Smtp-Source: ABdhPJw4IgvtP77z+FL/0Kr/aI+C2PDdMxJR17y/7MkW5vnOvWjHBT3Lze7JY938drtD5iEqflirLA== X-Received: by 2002:a37:a855:: with SMTP id r82mr2541012qke.132.1606997797172; Thu, 03 Dec 2020 04:16:37 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:370e:a537:5fb4:bbd4:b73? ([2804:7f0:8284:370e:a537:5fb4:bbd4:b73]) by smtp.gmail.com with ESMTPSA id r14sm975312qte.27.2020.12.03.04.16.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2020 04:16:36 -0800 (PST) Subject: Re: [PATCH 2/8] bfd/binutils: support for gdb target descriptions in the core file To: Jim Wilson References: <4e0141d22b4b5bbf56e42d037f03f82485cf5bc4.1606930261.git.andrew.burgess@embecosm.com> <98c2b9bb-10bc-5141-19cf-0705e2e97ec0@linaro.org> Message-ID: <706a8b29-7c5c-a238-a78b-59637b8eb61b@linaro.org> Date: Thu, 3 Dec 2020 09:16:33 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: gdb-patches@sourceware.org, Binutils Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/2/20 7:58 PM, Jim Wilson wrote: > On Wed, Dec 2, 2020 at 10:21 AM Luis Machado via Gdb-patches > > wrote: > > For the constant, I find the magic number amusing, but I don't think it > does any good when you're trying to find out why that particular magic > number was picked, and what the next number should be. > > Should we go with the basic increasing ID instead? I think this > would be > 7, right after NT_AUXV. > > > 7 is NT_FREEBSD_THRMISC which would prevent use of this on FreeBSD.  I > know this is primarily for bare metal core files, but it might be useful > for linux and *bsd systems that have different register sets, because of > different extensions, with vector versus without vector, or because > different hardware has different sets of implemented CSRs.  We don't > appear to have reserved ranges for NT_* values, though we sort of have a > scheme for processor specific values, e.g. 0x1XX for ppc, 0x2XX for x86, > 0x3XX for s390, etc.  OS specific values tend to be low values below > 0x100 but above 6, with only FreeBSD starting at 7 and most others > starting at 10.  So that leaves high values like ascii encodings of the > NT_* name as safe for new uses.  There are 3 of these already, this > would be a fourth one. Sure, we should make this generic for all OS' to use. The processor-specific values are a good example of organized ID structure. They're all pretty obvious to look at and to identify. If the OS-specific values are low ID's, then maybe we should start a new range of high values for the generic NT_* notes. That should make things more organized in the future, and folks will know what the next ID is. I don't particularly think having 3 ascii encoded constants is a good motivation for having more. NT_PRXFPREG is Linux-specific, which is not good. Otherwise, if we're sticking to the ascii encodings, we should document that and group them together in their own section instead of just grouping them with the Linux ones, which is a bit misleading.