From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2386 invoked by alias); 29 Sep 2003 02:25:40 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2339 invoked from network); 29 Sep 2003 02:25:40 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 29 Sep 2003 02:25:40 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A3njG-0003qI-Gs for ; Sun, 28 Sep 2003 22:25:38 -0400 Date: Mon, 29 Sep 2003 02:31:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Finding absolute path from relative. Message-ID: <20030929022538.GA9969@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <20030929022128.GB10687@white> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030929022128.GB10687@white> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00359.txt.bz2 On Sun, Sep 28, 2003 at 10:21:28PM -0400, Bob Rossi wrote: > Hi, > > I am thinking about the algorithm required to find the absolute path to > a source file given the relative path and the output from 'show dir'. > > Is it really as easy as this, > > for I in 'show dir' # for each directory in show dir > if $I/relative_path exists > break; # Found absolute path. > > Or does it get more complex and obfuscated? Well, often the input file has a specified directory. That gets tried first. Anyway, there's a good comment or two about this in the source code... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer