This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/15] Remove GDBSERVER use from nat/i386-dregs.c
- From: Gary Benson <gbenson at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 11 Jul 2014 17:12:53 +0100
- Subject: Re: [PATCH 07/15] Remove GDBSERVER use from nat/i386-dregs.c
- Authentication-results: sourceware.org; auth=none
- References: <1404902255-11101-1-git-send-email-gbenson at redhat dot com> <1404902255-11101-8-git-send-email-gbenson at redhat dot com> <87k37ldrz4 dot fsf at fleche dot redhat dot com> <20140711125306 dot GC2695 at blade dot nx> <87k37j7vsw dot fsf at fleche dot redhat dot com>
Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
>
> Gary> -#ifdef GDBSERVER
> Gary> -#include "server.h"
> Gary> -#else
> Gary> -#include "defs.h"
> Gary> -#include "inferior.h"
> Gary> -#endif
> Gary> +#include "common-utils.h"
>
> >> I think this should include config.h first.
>
> Gary> common-utils.h includes it. Or did you mean the gnulib one?
>
> Nope, not the gnulib one. I didn't realize that common-utils.h
> includes config.h. That seems weird to me.
>
> I think it's generally better for "random" headers not to include
> config.h and to either have a "standard" base header (like defs.h or
> server.h) that includes config.h, or to just have explicit includes
> of config.h as the first thing in each .c.
>
> I realize it's not a problem arising from your series. But would
> you mind just having the .c include config.h explicitly? Then at
> some point I'll go through and fix up common-utils.h and its users.
Ok, I'll do that.
Cheers,
Gary
--
http://gbenson.net/