public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, Eric Gallager <egall@gwmail.gwu.edu>
Cc: Christophe Lyon <christophe.lyon@linaro.org>,
	binutils@sourceware.org, gdb@sourceware.org, gcc@gcc.gnu.org
Subject: Re: [RFC] add regenerate Makefile target
Date: Sat, 16 Mar 2024 13:30:34 -0400	[thread overview]
Message-ID: <5a38c766-7d51-4e0e-ab02-515f8cddc1c2@simark.ca> (raw)
In-Reply-To: <87edcbk1x3.fsf@tromey.com>



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

  reply	other threads:[~2024-03-30 13:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  8:02 Christophe Lyon
2024-03-14 18:10 ` Simon Marchi
2024-03-15  8:50   ` Christophe Lyon
2024-03-15 14:13     ` Eric Gallager
2024-03-15 14:25       ` Tom Tromey
2024-03-16 17:30         ` Simon Marchi [this message]
2024-03-18 17:28         ` Christophe Lyon
2024-03-20 15:11           ` Simon Marchi
2024-03-18 16:13       ` Christophe Lyon
2024-03-16 17:16     ` Simon Marchi
2024-03-18 17:25       ` Christophe Lyon
2024-03-19 17:11         ` Christophe Lyon
2024-03-19 18:03           ` Tom Tromey
2024-03-20 12:05             ` Eric Gallager
2024-03-20 15:34         ` Simon Marchi
2024-03-21 14:32           ` Christophe Lyon
2024-03-25 14:19             ` Christophe Lyon
2024-03-27 18:22               ` Christophe Lyon
2024-04-08  9:22               ` Christophe Lyon
     [not found]     ` <78f1d113-f8ac-4a76-8dea-9f92519c1a89@linux.ibm.com>
2024-03-27 18:14       ` Christophe Lyon
2024-03-28  8:55         ` Jens Remus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a38c766-7d51-4e0e-ab02-515f8cddc1c2@simark.ca \
    --to=simark@simark.ca \
    --cc=binutils@sourceware.org \
    --cc=christophe.lyon@linaro.org \
    --cc=egall@gwmail.gwu.edu \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).