From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id F27823858D39 for ; Tue, 13 Sep 2022 13:34:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F27823858D39 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B22A11E0D5; Tue, 13 Sep 2022 09:34:41 -0400 (EDT) Message-ID: <383112d6-4d64-38e5-9e77-3f46b845e494@simark.ca> Date: Tue, 13 Sep 2022 09:34:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 1/2] cleanup: Add missing feature/ XML files to Makefile Content-Language: en-US To: Keith Seitz , gdb-patches@sourceware.org References: <20220912224733.2962282-1-keiths@redhat.com> From: Simon Marchi In-Reply-To: <20220912224733.2962282-1-keiths@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 13 Sep 2022 13:34:43 -0000 On 2022-09-12 18:47, Keith Seitz via Gdb-patches wrote: > This patch adds some missing .xml files to features/Makefile so that when the > directory's C files are regenerated, all files are appropriately remade. > > This has demonstrated that there have been several "misses" in regenerating > files in this directory. Namely, arm-secext.c and sparc{32,64}-solaris.c. For > the former case, there was what essentially amounts to a typo regarding the > create feature function's name. In the later case, this file has missed at least > one important update in July, 2020, when allocate_target_description was > changed to return a unique pointer. > > Those corrections are included. With your patch applied, I tried re-generating everything: $ cd features $ rm *.c */*.c $ make cfiles GDB="/home/simark/build/binutils-gdb-all-targets/gdb/gdb --data-directory=/home/simark/build/binutils-gdb-all-targets/gdb/data-directory" And then git shows these files as missing: deleted: aarch64-sve.c deleted: cskyv2-linux.c aarch64-sve.c is not generate, so it's actually fine. cskyv2-linux.c is generated, but we are missing the XML for it, I sent a reply to the patch thread that added it to ask the author to upload it. > --- > gdb/features/Makefile | 4 ++++ > gdb/features/arm/arm-secext.c | 2 +- > gdb/features/sparc/sparc32-solaris.c | 16 ++++++++-------- > gdb/features/sparc/sparc64-solaris.c | 22 +++++++++++----------- > 4 files changed, 24 insertions(+), 20 deletions(-) > > diff --git a/gdb/features/Makefile b/gdb/features/Makefile > index 061cb2ed032..bdd032f2c3c 100644 > --- a/gdb/features/Makefile > +++ b/gdb/features/Makefile > @@ -108,6 +108,7 @@ XMLTOC = \ > nds32.xml \ > nios2.xml \ > or1k.xml \ > + or1k-linux.xml \ When typing just "make" in features/, I get this diff: diff --git a/gdb/regformats/or1k-linux.dat b/gdb/regformats/or1k-linux.dat index 7b64646fc65a..9a9f8a640188 100644 --- a/gdb/regformats/or1k-linux.dat +++ b/gdb/regformats/or1k-linux.dat @@ -2,7 +2,7 @@ # Generated from: or1k-linux.xml name:or1k_linux xmltarget:or1k-linux.xml -expedite:r1,npc +expedite: 32:r0 32:r1 32:r2 Probably a separate fix, but I think we need or1k-expedite = r1,npc in features/Makefile > rs6000/powerpc-32.xml \ > rs6000/powerpc-32l.xml \ > rs6000/powerpc-403.xml \ > @@ -164,6 +165,8 @@ XMLTOC = \ > s390x-vx-linux64.xml \ > s390-gs-linux64.xml \ > s390x-gs-linux64.xml \ > + sparc/sparc32-solaris.xml \ > + sparc/sparc64-solaris.xml \ > z80.xml > > TDESC_CFILES = $(patsubst %.xml,%.c,$(XMLTOC)) > @@ -209,6 +212,7 @@ FEATURE_XMLFILES = aarch64-core.xml \ > arm/arm-m-profile-mve.xml \ > arm/arm-m-system.xml \ > arm/arm-m-profile-with-fpa.xml \ > + arm/arm-secext.xml \ > arm/arm-tls.xml \ > arm/arm-vfpv2.xml \ > arm/arm-vfpv3.xml \ > diff --git a/gdb/features/arm/arm-secext.c b/gdb/features/arm/arm-secext.c > index 39ef4afb05f..c71cffd2db6 100644 > --- a/gdb/features/arm/arm-secext.c > +++ b/gdb/features/arm/arm-secext.c > @@ -4,7 +4,7 @@ > #include "gdbsupport/tdesc.h" > > static int > -create_feature_arm_arm_m_system (struct target_desc *result, long regnum) > +create_feature_arm_arm_secext (struct target_desc *result, long regnum) This change looks good, it was obviously wrong before. But I don't see any call to create_feature_arm_arm_secext in the code base, so what is the point of this file? Should the arm tdep code use it? It might be worth asking in the thread that added this file. Simon