This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Sort #includes in gdb
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 20 Mar 2019 17:42:13 +0000
- Subject: Re: [RFC] Sort #includes in gdb
- References: <87fttfmnpq.fsf@tromey.com> <e132876c-15b3-7c47-f765-5c2db103b38e@redhat.com> <878sygydob.fsf@tromey.com> <87r2b7viht.fsf@tromey.com>
On 03/15/2019 11:13 PM, Tom Tromey wrote:
> Pedro> ISTR that you could point the bot at some branch instead of a patch?
>
> Tom> I don't know but I will ask Sergio when he's back.
>
> I think it can't be done.
Isn't that what "try --branch" is for?
>
> Pedro> No firm opinion on comments vs no comments.
>
> Tom> For now at least, I'm sticking with "no comments" because the lack of
> Tom> comment-handling in the script means that adding comments makes the
> Tom> script non-idempotent. But, idempotency is a good quality to have,
> Tom> because it means the script can be re-run at any time to fix any
> Tom> "regressions" that have crept in.
>
> I thought about this some more and I went back and implemented limited
> comment-scanning, to make this work. I think this is nicer because it
> provides an in-source guide to developers saying where to add a new
> #include.
>
> I've appended the relevant bits from the rewritten objfiles.c.
>
> Let me know what you think.
Seems fine to me.
BTW, I noticed that the ChangeLog said "Sort headers."
twice for every entry.
Thanks,
Pedro Alves