From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9493 invoked by alias); 20 Sep 2004 19:37:08 -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 9480 invoked from network); 20 Sep 2004 19:37:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 20 Sep 2004 19:37:07 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8KJb2ST018204 for ; Mon, 20 Sep 2004 15:37:07 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8KJaur13799; Mon, 20 Sep 2004 15:36:57 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0727128D2; Mon, 20 Sep 2004 15:34:42 -0400 (EDT) Message-ID: <414F30D1.7080706@gnu.org> Date: Mon, 20 Sep 2004 19:37:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] Replace call_ptrace and ptrace_wait in inf-ptrace.c References: <200409201913.i8KJDosi035323@elgar.sibelius.xs4all.nl> In-Reply-To: <200409201913.i8KJDosi035323@elgar.sibelius.xs4all.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00321.txt.bz2 > This is another step in the direction of eliminating the need for both > inf-ptrace.c and infptrace.c. It eliminates the calls to call_ptrace > and ptrace_wait. > > Andrew has recently suggested that we'd want debugging support for the > ptrace(2) interface, which could be implemented by using call_ptrace() > unconditionally. Having, again, spent some time debugging GNU/Linux threads, I'm pretty much certain of this. > That, however, is a bad idea, since this makes it > impossible for the compiler to properly typecheck the arguments to > ptrace(). How so? I've noticed that ptrace can sometimes be declared with a variable number of arguments, but that just suggests there should be a gdb_ptrace4() and gdb_ptrace5() with explicitly 4 and 5 arguments. Andrew