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 332A63858D20 for ; Sat, 30 Mar 2024 13:42:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 332A63858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 332A63858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711806122; cv=none; b=fs4ahwIOO3Q1ax3yux5FzOme6UuhoIrOxw20pfMpn6HEjWEVAhvfAYiBPHq8S3+ViqjGrx0BHoYScbNywpprj6wjUTc8TeDi+oUZEepfc4peN/q2dDOzRqbx+LlXMyQxM7+JGHWrhapjYdPlSo2XYyJjZBTrj91Wx1VjdAipPGw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711806122; c=relaxed/simple; bh=KNTBKhOGve3/Td8kIY7bSrdvHRkEYcibKz3tx4sEIlM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Htf25QEEa8mEW0MqqcmT6rCJcOnQs5jQzqpW6krBTqo2mTFpLn78BZ9Vli9CjNhE4TxQK99z6GCDx23pS1OOBYRF3/iTUsGDlevx5EFC71ksOZ7p10+k4V/VuWXo7hyoOK0RtmdCA3PQ2rRK2Cg5fr4Gbd0WCKaB4luhUIZcoko= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1711806119; bh=KNTBKhOGve3/Td8kIY7bSrdvHRkEYcibKz3tx4sEIlM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CdD2YUVzFCUiXuz3M+16wIY6760dUR1gg5c3Zqu63wULYJaU+xPKc5eKAQ/CnxQPn g64C8fv6I2XKFw2USTlij3eV+S0oWKjAl7vVhzw2OV/yKPHkFWBQ6rIJFJ+cRc3ZVZ BGBhf+IKo1SPuSkF24fqeK5saVV24aDSDCSe+REs= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B920A1E030; Sat, 30 Mar 2024 09:41:58 -0400 (EDT) Message-ID: <5a38c766-7d51-4e0e-ab02-515f8cddc1c2@simark.ca> Date: Sat, 16 Mar 2024 13:30:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] add regenerate Makefile target Content-Language: en-US To: Tom Tromey , Eric Gallager Cc: Christophe Lyon , binutils@sourceware.org, gdb@sourceware.org, gcc@gcc.gnu.org References: <20240313080237.1143034-1-christophe.lyon@linaro.org> <1eb529f2-3842-4090-a8e2-f713a28f2394@simark.ca> <87edcbk1x3.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87edcbk1x3.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DATE_IN_PAST_96_XX,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-03-15 10:25, Tom Tromey wrote: > gdb used to use a mish-mash of different approaches, some quite strange, > but over the last few years we standardized on Python scripts that > generate files. They're written to be seamless -- just invoke in the > source dir; the output is then just part of your patch. No special > configure options are needed. On the whole this has been a big > improvement. The two that come in mind for gdb are (there are more but I don't know them): - gdb/gdbarch.py - gdb/make-target-delegates.py gdbarch.py used to be a shell script, but moving it to Python made it much faster, easier to maintain (as in change how gdbarch hooks are generated) and easier to update (as in modifying the gdbarch hook list). Now, a wishlist I have for generated files (I might do that one day): - Make all generated files (regardless of if they are checked in the repo or not) end with the -gen suffix (like gdbarch-gen.h), so it's easier to know that a file is generated. - make all generator tools have the same name pattern (e.g. make-gdbarch.py, make-target-delegates.py, make-init-c.sh, etc). Simon