This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Remove spurious exceptions.h inclusions
- From: Doug Evans <dje at google dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 8 Oct 2014 13:24:16 -0400
- Subject: Re: [PATCH 1/3] Remove spurious exceptions.h inclusions
- Authentication-results: sourceware.org; auth=none
- References: <1409586154-16196-1-git-send-email-gbenson at redhat dot com> <1409586154-16196-2-git-send-email-gbenson at redhat dot com> <CADPb22RcwUGPEwGGc7hG=4R0KvRV9axKDbQ6Nu1PHys5Nk=t8A at mail dot gmail dot com> <CADPb22QC=J=tpyMo_y3mMi22eQh5ub2E6LjGVDrrEOCTXgVPBw at mail dot gmail dot com>
On Wed, Oct 8, 2014 at 1:12 PM, Doug Evans <dje@google.com> wrote:
> On Wed, Oct 8, 2014 at 1:03 PM, Doug Evans <dje@google.com> wrote:
>> On Mon, Sep 1, 2014 at 11:42 AM, Gary Benson <gbenson@redhat.com> wrote:
>>> defs.h includes utils.h, and utils.h includes exceptions.h. All GDB
>>> .c files include defs.h as their first line, so no file other than
>>> utils.h needs to include exceptions.h. This commit removes all such
>>> inclusions.
>>>
>>> Doug, I Cc'd you on this one as you asked me to avoid giant mechanical
>>> ChangeLog entries but I couldn't figure out how I'd rewrite this one.
>>
>> For reference sake,
>> I said that for two reasons:
>> 1) to save you some typing
>> 2) to keep the S/N ratio of the ChangeLog file from dropping, and in
>> this case from dropping significantly. Yikes!
>>
>>> gdb/ChangeLog:
>>>
>>> * ada-lang.c: Do not include exceptions.h.
>>> * ada-valprint.c: Likewise.
>>> * amd64-tdep.c: Likewise.
>>> [...]
>>
>> I realize one of the guidelines for changelogs is to document every
>> file that's changed, but if we can agree that "All callers updated."
>> can apply to all callers in all files, then I don't see why we
>> couldn't be ok with something like the following for this case:
>>
>> * All .c files: Do not include exceptions.h.
>>
>> Yeah, it's not pedantically correct, not all .c files were touched.
>> But I can live with that given the alternative.
>
> Actually, exceptions.c still includes exceptions.h.
>
> I'd be ok with changing the above entry to "* Most .c files: Do not
> include exceptions.h."
>
> Plus, was not removing exceptions.h from exceptions.c an oversight?
> [I can't remember if this was discussed in the thread.]
Ah. https://sourceware.org/ml/gdb-patches/2014-07/msg00745.html
Sorry for the barrage of email.
These things often seem to occur to me after I send the previous one.
Can you also update the Include files section of the coding standards?
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
This section needs to list exceptions.h and others that .c and .h
files are no longer supposed to directly include.