This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 09/15] Mostly remove GDBSERVER from linux-waitpid.c


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]