This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't include gdbarch.h from defs.h
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 10 Jul 2019 14:57:23 -0600
- Subject: Re: [PATCH] Don't include gdbarch.h from defs.h
- References: <20190614211035.398-1-tom@tromey.com> <0c11d48f648433f9afb55c48798da3ae@polymtl.ca>
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> On 2019-06-14 17:10, Tom Tromey wrote:
>> I touched symtab.h and was surprised to see how many files were
>> rebuilt. I looked into it a bit, and found that defs.h includes
>> gdbarch.h, which in turn includes many things.
>>
>> gdbarch.h is only needed by a minority ofthe files in gdb, so this
>> patch removes the include from defs.h and updates the fallout.
>>
>> I did "wc -l" on the files in build/gdb/.deps; this patch reduces the
>> line count from 139935 to 137030; so there are definitely future
>> build-time savings here.
>>
>> Note that while I configured with --enable-targets=all, it's possible
>> that some *-nat.c file needs an update. I could not test all of
>> these. The buildbot caught a few problems along these lines.
Simon> Thanks, I think this makes sense.
Thanks.
The results came back looking good. It is possible that there could
still be a build failure in some untested *-nat.c file. However, these
are easily fixed, normally by including gdbarch.h explicitly.
So, I'm checking it in now.
Tom