This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3 v4] Introduce common/errors.h
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>, Doug Evans <dje at google dot com>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 25 Jul 2014 11:19:14 +0100
- Subject: Re: [PATCH 1/3 v4] Introduce common/errors.h
- Authentication-results: sourceware.org; auth=none
- References: <1406206287-6817-1-git-send-email-gbenson at redhat dot com> <1406206287-6817-2-git-send-email-gbenson at redhat dot com> <53D1053E dot 6030902 at redhat dot com> <21457 dot 18385 dot 59886 dot 323894 at ruffy dot mtv dot corp dot google dot com> <20140725083642 dot GA4812 at blade dot nx>
On 07/25/2014 09:36 AM, Gary Benson wrote:
> I'm working on this now. My plan is to have gdb/common/common-defs.h
> (which includes config.h and the correct gnulib config.h) and have
> defs.h and server.h include common-defs.h as the first line. By the
> end of that series most every file will include defs.h or server.h
> and no file will include config.h.
I think you meant, that files in gdb will include defs.h, files in
gdbserver will include server.h, and files in the shared directories
will include common-defs.h as the first line.
> At the first instance common-defs.h will include most files included
> by both defs.h and server.h. There are various workarounds for
> various things in both, and it would be good to have these workarounds
> the same for all of GDB/gdbserver/etc. I plan to omit alloca.h and
> errno.h initially, as these have pretty heavy hacking around them and
> they're not needed yet. I'll probably do both at some point, but as
> individual patches/serieses.
>
> I'm also going to do some #include cleanups as part of the same
> series. For example lots of things include common-utils.h, but
> that's currently included by defs.h and server.h (so I'll move it
> to common-defs.h) and if every file includes common-defs.h somehow
> then nothing needs common-utils.h.
>
> Once the common-defs.h series is finished and pushed I'll rebase
> this common-cleanups series on top of it. It'll be much cleaner
> and by then the number of "#ifdef GDBSERVER"s in the codebase
> will be precisely one (to select the appropriate gnulib config.h
> in common-defs.h).
>
> Does all this sound ok?
It does to me.
--
Thanks,
Pedro Alves