diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-09-13 19:10:19 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-09-13 19:10:19 +0000 |
commit | f9323c693b69235720f629a3362839ed03e2c812 (patch) | |
tree | a51232fe9dba7f056da4f3d7899d2a65caeb161f /gdb | |
parent | a4b255aef270c6827d402671b1869e43e77623b7 (diff) | |
download | gdb-f9323c693b69235720f629a3362839ed03e2c812.tar.gz |
[LynxOS] Include sys/ptrace.h instead of ptrace.h.
This is one of the changes needed in order to build gdbserver on
LynxOS 5.x.
Really interesting: On LynxOS 4.x, there is a #warning when sys/ptrace.h
is used (explaining that ptrace.h will be used instead), whereas this
file was removed from LynxOS 5.x. The contents of sys/ptrace.h on 4.x
(or at least the meat of it):
#if defined(__GNUC__) || defined(__GNUG__)
#if !defined(__NO_INCLUDE_WARN__)
#warning Using <ptrace.h> instead of <sys/ptrace.h>
#endif /* defined(__NO_INCLUDE_WARN__) */
#endif /* defined(__GNUC__) || defined(__GNUG__) */
#include <ptrace.h>
The fix I went for, for now, is to just include <sys/ptrace.h>
unconditionally. I could have done some configury, but we already
have to build with -D__NO_INCLUDE_WARN__ to avoid the warnings
anyway, and that's unvoidable, due to system includes themselves
including the "wrong" header file.
Since <sys/ptrace.h> seems to be the choice that was made for LynxOS,
and since it works to include it on LynxOS 4.x, I think that's the simplest
solution.
gdb/gdbserver/ChangeLog:
* lynx-low.c, lynx-ppc-low.c: Include <sys/ptrace.h> instead of
<ptrace.h>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/lynx-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/lynx-ppc-low.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index b8c8bd7111e..0a6a71ca75e 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2010-09-13 Joel Brobecker <brobecker@adacore.com> + + * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of + <ptrace.h> + 2010-09-09 Nathan Sidwell <nathan@codesourcery.com> * configure.ac: Add --enable-inprocess-agent option. diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 7a949c048ad..74d2bcde4b8 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -20,7 +20,7 @@ #include "lynx-low.h" #include <limits.h> -#include <ptrace.h> +#include <sys/ptrace.h> #include <sys/piddef.h> /* Provides PIDGET, TIDGET, BUILDPID, etc. */ #include <unistd.h> #include <sys/ioctl.h> diff --git a/gdb/gdbserver/lynx-ppc-low.c b/gdb/gdbserver/lynx-ppc-low.c index 9caa8aca8ab..97d691a23cf 100644 --- a/gdb/gdbserver/lynx-ppc-low.c +++ b/gdb/gdbserver/lynx-ppc-low.c @@ -21,7 +21,7 @@ #include <stdint.h> #include <stddef.h> #include <limits.h> -#include <ptrace.h> +#include <sys/ptrace.h> /* The following two typedefs are defined in a .h file which is not in the standard include path (/sys/include/family/ppc/ucontext.h), |