From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17762 invoked by alias); 25 Aug 2005 13:14:26 -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 16777 invoked by uid 22791); 25 Aug 2005 13:14:12 -0000 Received: from eastrmmtao01.cox.net (HELO eastrmmtao01.cox.net) (68.230.240.38) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 25 Aug 2005 13:14:12 +0000 Received: from white ([68.9.64.121]) by eastrmmtao05.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050825111159.OPDY15295.eastrmmtao05.cox.net@white>; Thu, 25 Aug 2005 07:11:59 -0400 Received: from bob by white with local (Exim 3.36 #1 (Debian)) id 1E8FeI-0008Nk-00; Thu, 25 Aug 2005 07:11:58 -0400 Date: Thu, 25 Aug 2005 13:14:00 -0000 From: Bob Rossi To: Craig Jeffree Cc: gdb@sources.redhat.com Subject: Re: trouble locating source files through relative paths Message-ID: <20050825111158.GA32174@white> Mail-Followup-To: Craig Jeffree , gdb@sources.redhat.com References: <1124436292.3582.64.camel@norman> <20050819124329.GA18911@white> <1124773410.3749.38.camel@norman> <20050823113138.GA27899@white> <20050823114028.GB27899@white> <1124866437.3749.75.camel@norman> <20050824112417.GA30211@white> <1124928432.10500.12.camel@norman> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1124928432.10500.12.camel@norman> User-Agent: Mutt/1.5.9i X-SW-Source: 2005-08/txt/msg00097.txt.bz2 On Thu, Aug 25, 2005 at 10:07:12AM +1000, Craig Jeffree wrote: > On Wed, 2005-08-24 at 07:24 -0400, Bob Rossi wrote: > > Well, I haven't had enough time to investigate this more, however, I did > > find some odd results with the example I came up with. For example, if > > I do 'info sources' before the dir command is applied, GDB spits out the > > relative path. However, if I do the dir command, and then do 'info > > sources', then GDB spits out the absolute path. > > Both before and after I do the 'dir' command 'info sources' spits out > the filename with no path at all. > > > > > Once GDB has the absolute path, if I then do 'list uut.h:1', GDB can > > still not find the file. If I do 'list ../include/uut.h:1', > > then I get an Internal GDB error. Do you get these same results? > > When I do 'list GeAttribute.H:1' in my application GDB fails to find the > file after trying 'GeAttribute.H' in the directory I specified with > 'dir' and my cwd. It also tries > '../../../include/General/GeAttribute.H'. I can't say I know where it > figures out this relative path from because 'info sources' doesn't > mention it, however that path is correct when taken from the location of > the binary (the path I gave to 'dir'). > > If I try 'list ../../../include/General/GeAttribute.H:1' it says: > 'No source file named ../../../include/General/GeAttribute.H.' Hi Craig, Thanks for all the explaining. I have yet another question. Does GeAttribute.H also have a counterpart GeAttribute.cpp? If so, is that file found by GDB before or after the dir command? I appreciate the response's because the examples I reproduce are slightly different then what you are seeing, although it might be enough to prove the point. Thanks, Bob Rossi