From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25849 invoked by alias); 26 Sep 2008 13:02:41 -0000 Received: (qmail 25840 invoked by uid 22791); 26 Sep 2008 13:02:40 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 13:01:57 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2A18610D00; Fri, 26 Sep 2008 13:01:56 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 1426A10CFE; Fri, 26 Sep 2008 13:01:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KjCxH-0005iE-H5; Fri, 26 Sep 2008 09:01:55 -0400 Date: Fri, 26 Sep 2008 13:02:00 -0000 From: Daniel Jacobowitz To: Francois Rigault Cc: gdb-patches@sourceware.org Subject: Re: [Patch] Improve path lookup of absolute source file Message-ID: <20080926130155.GE21287@caradoc.them.org> Mail-Followup-To: Francois Rigault , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00518.txt.bz2 On Thu, Sep 11, 2008 at 02:47:09PM +0200, Francois Rigault wrote: > In order to let gdb find the files without generating IOs, a simple > trick is to check that symbol source file and target source file have > the same basename, as source file used at compilation time and the one > used for debugging are unlikely to have different basenames. See the > patch below against gdb-6.8. I'm nervous about "unlikely". What happens before and after if they do have different basenames? e.g. a symlink foo.c to foo_x86.c; if GDB or GCC resolves the symlink at some point we'll mismatch and now completely fail to locate the file. -- Daniel Jacobowitz CodeSourcery