From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8084 invoked by alias); 1 Oct 2004 21:54:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8064 invoked from network); 1 Oct 2004 21:54:10 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 1 Oct 2004 21:54:10 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id i91Ls7jf030678; Fri, 1 Oct 2004 23:54:07 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id i91Ls7KV001362; Fri, 1 Oct 2004 23:54:07 +0200 (CEST) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id i91Ls6lE001359; Fri, 1 Oct 2004 23:54:06 +0200 (CEST) Date: Fri, 01 Oct 2004 21:54:00 -0000 Message-Id: <200410012154.i91Ls6lE001359@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com In-reply-to: <415DC09D.2070407@gnu.org> (message from Andrew Cagney on Fri, 01 Oct 2004 16:39:57 -0400) Subject: Re: [patch/rfc] Build inf-ptrace.o when ptrace available References: <415DC09D.2070407@gnu.org> X-SW-Source: 2004-10/txt/msg00026.txt.bz2 Date: Fri, 01 Oct 2004 16:39:57 -0400 From: Andrew Cagney Hello, 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: *-*-*bsd*) native_sources="inf-ptrace.c bsd-nat.c" ;; *-*-linux*) native_sources="inf-ptrace.c linux-nat.c" ;; *-*-solaris*) native_sources="inf-procfs.c" ;; 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. Mark @@ -532,6 +539,9 @@ if test -n "$[5]"; then [Define to the type of arg 5 for ptrace.]) fi +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