From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3882 invoked by alias); 9 Jan 2002 20:15:55 -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 3761 invoked from network); 9 Jan 2002 20:15:35 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 Jan 2002 20:15:35 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16OP94-0000P4-00; Wed, 09 Jan 2002 15:16:22 -0500 Date: Wed, 09 Jan 2002 12:15:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, msnyder@redhat.com Subject: linux-proc readlink patch Message-ID: <20020109151622.A842@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, msnyder@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00191.txt.bz2 This patch: 2002-01-08 Michael Snyder * linux-proc.c (child_pid_to_exec_file): Use readlink to get the real name of the executable, rather than the /proc name. (which I never saw posted on gdb-patches; was that an artifact of the email breakage yesterday?) seems to have at least one problem. (1) It introduces a memory leak, if I understand the semantics of cleanups correctly. make_cleanup's cleanups will only be called (according to the comment in utils.c) after a failed command. (2) It is not, IIRC, always correct in the case of chroots. Handling for this has changed across Linux versions several times. On 2.2 it seems to be correct (to my surprise, actually), but I believe it is not on 2.0. Do we care? Probably not, as 2.0 is now -very- old. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer