From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4210 invoked by alias); 24 Aug 2005 06:55:14 -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 4194 invoked by uid 22791); 24 Aug 2005 06:55:10 -0000 Received: from chfw.preston.net (HELO universe.preston.net) (202.14.89.130) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 24 Aug 2005 06:55:10 +0000 Received: from norman (norman.preston.net [202.14.10.82]) by universe.preston.net (8.11.6/8.11.6) with ESMTP id j7O6rws01478; Wed, 24 Aug 2005 16:54:18 +1000 Subject: Re: trouble locating source files through relative paths From: Craig Jeffree To: Bob Rossi Cc: gdb@sources.redhat.com In-Reply-To: <20050823114028.GB27899@white> References: <1124436292.3582.64.camel@norman> <20050819124329.GA18911@white> <1124773410.3749.38.camel@norman> <20050823113138.GA27899@white> <20050823114028.GB27899@white> Content-Type: text/plain Date: Wed, 24 Aug 2005 06:55:00 -0000 Message-Id: <1124866437.3749.75.camel@norman> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-08/txt/msg00091.txt.bz2 On Tue, 2005-08-23 at 07:40 -0400, Bob Rossi wrote: > I'll look into this. It looks like find_and_open_source() could be modified to check if dirname is relative and if so call openp with dirname prepended to filename instead of modifying the search path. I think this is what Dave Korn suggested earlier, except he proposes identifying the relative link before the call to find_and_open_source and avoiding the split at that point. However, this might result in checks occuring in multiple places - I haven't looked for this. I'm not familiar with the gdb source so I'm not sure which solution will be more appropriate. Putting the fix in find_and_open_source() would be more self contained, however this might affect other clients of find_and_open_source() in ways I haven't considered. Cheers, Craig.