From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21809 invoked by alias); 2 May 2005 19:20:24 -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 21741 invoked from network); 2 May 2005 19:20:16 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 2 May 2005 19:20:16 -0000 Received: from zaretski (IGLD-80-230-71-109.inter.net.il [80.230.71.109]) by legolas.inter.net.il (MOS 3.5.6-GR) with ESMTP id EGX21469 (AUTH halo1); Mon, 2 May 2005 22:20:10 +0300 (IDT) Date: Mon, 02 May 2005 19:20:00 -0000 From: "Eli Zaretskii" To: gdb-patches@sources.redhat.com, Joel Brobecker Message-ID: <01c54f4b$Blat.v2.4$cb9e0700@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 In-reply-to: <20050501233700.GD4311@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 1 May 2005 19:37:00 -0400) Subject: Re: [RFA] maintenance_print_msymbols: Try harder to match files Reply-to: Eli Zaretskii References: <20050124210931.GE17455@cygbert.vinschen.de> <20050501233700.GD4311@nevyn.them.org> X-SW-Source: 2005-05/txt/msg00057.txt.bz2 > Date: Sun, 1 May 2005 19:37:00 -0400 > From: Daniel Jacobowitz > Cc: Joel Brobecker > > You're comparing solely based on inode number; I think that's an unwise > choice for two reasons: > - The file may have been replaced on disk; we should use the copy > that was there when GDB opened it. > - There are some file systems in which all st_ino values are zero. > > If you've got the full path, why not use that? Indeed. symtab.c:lookup_symbol has an example of what I think you should use (and what AFAIU Daniel had in mind). Note that file-name comparison should use FILENAME_CMP instead of strcmp, to avoid failures on non-Posix systems.