From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25917 invoked by alias); 7 Feb 2008 17:57:25 -0000 Received: (qmail 25905 invoked by uid 22791); 7 Feb 2008 17:57:24 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 07 Feb 2008 17:57:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8B4FC2AA951; Thu, 7 Feb 2008 12:57:00 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WaN1awxkqcj3; Thu, 7 Feb 2008 12:57:00 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5457E2A9FBC; Thu, 7 Feb 2008 12:57:00 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 3CF1AE7ACB; Thu, 7 Feb 2008 09:56:58 -0800 (PST) Date: Thu, 07 Feb 2008 17:57:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org, dje@google.com Subject: Re: [rfc] Use substitute-path for filename portion too Message-ID: <20080207175658.GB3907@adacore.com> References: <20080207174645.GA19452@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080207174645.GA19452@caradoc.them.org> User-Agent: Mutt/1.4.2.2i 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-02/txt/msg00131.txt.bz2 > 2008-02-07 Doug Evans > > * source.c (find_and_open_source): Always rewrite absolute filenames. No problem from my end. > + > + if (IS_ABSOLUTE_PATH (filename)) > { > - /* If dirname is NULL, chances are the path is embedded in > - the filename. Try the source path substitution on it. */ > + /* If filename is absolute path, try the source path > + substitution on it. */ Do we want to restrict this to filenames that are absolute paths? Imagine the filename was codesourcery/bar/bar.h and the rewrite was s/codesourcery/adacore/, do we want to attempt the rewrite then? I suppose we should wait to see a real example of such a situation before trying to support it... -- Joel