[patch/rfc] Build inf-ptrace.o when ptrace available
Fri Oct 1 21:54:00 GMT 2004
Date: Fri, 01 Oct 2004 16:39:57 -0400
From: Andrew Cagney <email@example.com>
This modifies GDB's configure to build inf-ptrace.o whenever the ptrace
call is available. Thoughts?
I'm not sure. On the one hand, yes, inf-ptrace should compile & link
on any system that has ptrace. On the other hand, actually using this
stuff is still a per-target decision, and there are quite a few
targets that have ptrace, but dont use it (Solaris, OSF/1, HP-UX).
I'm also thinking about the ultimate replacement of the makefile
fragments in config/*/. I think we should move towards a configure
script where we can use wildcards to set some sensible defaults.
There we'd have something like:
I'm not strongly opposed to your patch (but you should look at it
again, see the hunk below). I also think that the logic that adds
inf-ptrace.o / inf-ptrace.c doesn't belong in the "Checks for library
functions" section. I'd leave the AC_CHECK_FUNCS(ptrace) there
(possibly grouping it together with the check for ttrace), and put the
rest of the logic somewhere else.
@@ -532,6 +539,9 @@ if test -n "$"; then
[Define to the type of arg 5 for ptrace.])
+dnl If there is ptrace, add inf-ptrace to the compile list.
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then
More information about the Gdb-patches