From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13013 invoked by alias); 10 Jan 2004 05:53:06 -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 13006 invoked from network); 10 Jan 2004 05:53:05 -0000 Received: from unknown (HELO mwinf0601.wanadoo.fr) (193.252.22.25) by sources.redhat.com with SMTP; 10 Jan 2004 05:53:05 -0000 Received: from takamaka.act-europe.fr (AStDenis-103-1-1-207.w81-249.abo.wanadoo.fr [81.249.111.207]) by mwinf0601.wanadoo.fr (SMTP Server) with ESMTP id 74BF6340010D for ; Sat, 10 Jan 2004 06:53:04 +0100 (CET) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 7738847D62; Sat, 10 Jan 2004 09:53:00 +0400 (RET) Date: Sat, 10 Jan 2004 05:53:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: question about GDB, ptrace, and /proc... Message-ID: <20040110055300.GV4978@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-01/txt/msg00260.txt.bz2 Hello, while reading some linux-specific code such as linux-nat.c for instance, I was a bit surprised to see some calls to functions which seem to use /proc. For instance, there is a call to child_pid_to_exec_file() inside linux_handle_extended_wait() in linux-nat.c which causes GDB to read into the /proc filesystem. I was surprised, because I thought the linux ports were using ptrace, meaning using ptrace exclusively. Does GDB also need /proc, or is /proc only optional? Or does GDB support both interfaces on Linux? -- Joel