From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29718 invoked by alias); 9 Aug 2004 15:34:47 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29669 invoked from network); 9 Aug 2004 15:34:45 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sourceware.org with SMTP; 9 Aug 2004 15:34:45 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i79FYeZt000438; Mon, 9 Aug 2004 17:34:40 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i79FYemT000780; Mon, 9 Aug 2004 17:34:40 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i79FYdLr000777; Mon, 9 Aug 2004 17:34:39 +0200 (CEST) Date: Mon, 09 Aug 2004 15:34:00 -0000 Message-Id: <200408091534.i79FYdLr000777@elgar.kettenis.dyndns.org> From: Mark Kettenis To: cagney@gnu.org CC: mec.gnu@mindspring.com, gdb@sources.redhat.com In-reply-to: <4117778B.9020506@gnu.org> (message from Andrew Cagney on Mon, 09 Aug 2004 09:09:31 -0400) Subject: Re: ptrace(2) autoconf tests References: <200408082100.i78L0BdZ005809@elgar.kettenis.dyndns.org> <41169E38.nail4UJ11C6PT@mindspring.com> <200408090046.i790kqgh057267@elgar.kettenis.dyndns.org> <4117778B.9020506@gnu.org> X-SW-Source: 2004-08/txt/msg00138.txt.bz2 Date: Mon, 09 Aug 2004 09:09:31 -0400 From: Andrew Cagney > Anyway, below is a first hack at the autoconf tests. The tests > themselves are inspired by the standard AC_FUNC_CLOSEDIR_VOID and > AC_FUNC_SELECT_ARGTYPES tests. My code defines PTRACE_LONG if the > return type of ptrace(2) is `long', defines PTRACE_TYPE_ARG3 to the > type of the third argument of ptrace(2) and defines PTRACE_TYPE_ARG5 > to the type of the fifth argument of ptrace(2) if it has one. > PTRACE_TYPE_ARG3 will replace PTRACE_ARG3_TYPE. PTRACE_XFER_TYPE will > be set based on PTRACE_LONG and PTRACE_TYPE_ARG5 will replace > FIVE_ARG_PTRACE. How should we use this - I'm getting a bit lost with all the macros. Should autoconf define PTRACE_XFER_TYPE (PTRACE_RETURN_TYPE?) directly. Well, I'm trying to get some consistency. But having autoconf set PTRACE_LONG and then define PTRACE_XFER_TYPE based on that, is a bit silly. I'll adjust the test and have it set PTRACE_TYPE_RETURN such that we can use the last one in our code. Having this will let us wack a chunk of the nm*.h contents so looking good! -- Hmm, I just noticed call_ptrace() - appears to be something from the HP merge (...). Perhaphs I should ari the requirement that all ptrace calls are routed through that. Would let us implement `set debug ptrace!'. Is that a worthwhile thing to have? Well, I guess so. One of things I'm working on, is a portable "gdb_ptrace.h". We could simply add a macro there that takes care of the conversion. Anyway, given the favourable response, I think I'll just go ahead with this. Mark