This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 09/15] Mostly remove GDBSERVER from linux-waitpid.c
- From: Gary Benson <gbenson at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 15 Jul 2014 17:11:48 +0100
- Subject: Re: [PATCH 09/15] Mostly remove GDBSERVER from linux-waitpid.c
- Authentication-results: sourceware.org; auth=none
- References: <1404902255-11101-1-git-send-email-gbenson at redhat dot com> <1404902255-11101-10-git-send-email-gbenson at redhat dot com> <21444 dot 10401 dot 389963 dot 415776 at ruffy dot mtv dot corp dot google dot com>
Doug Evans wrote:
> Gary Benson writes:
> > This commit mostly removes the use of GDBSERVER from
> > nat/linux-waitpid.c. A use remains for some debugging
> > code that I will remove when the Linux thread_db code
> > is refactored.
> >
> > gdb/
> > 2014-07-09 Gary Benson <gbenson@redhat.com>
> >
> > * configure.ac [AC_CHECK_HEADERS] <errno.h>: New check.
> > * configure: Regenerate.
> > * config.in: Likewise.
> > * nat/linux-waitpid.c: Don't include server.h or defs.h.
> > (linux_debug) [debug_threads]: New declaration.
>
> gdb includes errno.h unconditionally, so the test is for some
> gdbserver configs (right?).
I think so.
> It's going to be confusing to keep all the unconditional inclusions
> of errno.h and yet seeing it tested for in configure.ac. It would
> be good to document why things are the way they are. E.g., add a
> comment to configure.ac or some such saying the test is needed by
> common code used by gdb and gdbserver.
>
> OTOH, I see there is gnulib/import/errno.in.h.
> Can we solve this with gnulib and thus make errno.h
> unconditionally includable everywhere?
I see gdb/gdbserver/linux-low.c includes errno.h unconditionally.
I'm going to assume from that that linux-waitpid.c can do the same.
I'll remove the conditionals from there and revert the configury
changes.
Thanks,
Gary
--
http://gbenson.net/