From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16085 invoked by alias); 22 Jan 2004 17:58:30 -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 16074 invoked from network); 22 Jan 2004 17:58:29 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 22 Jan 2004 17:58:29 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ajj64-0003cC-QF; Thu, 22 Jan 2004 12:58:28 -0500 Date: Thu, 22 Jan 2004 17:58:00 -0000 From: Daniel Jacobowitz To: Gernot Hillier , gdb@sources.redhat.com Subject: Re: handling of absolute source file paths (feature wish/implementation idea) Message-ID: <20040122175828.GA18705@nevyn.them.org> Mail-Followup-To: Gernot Hillier , gdb@sources.redhat.com References: <200401221601.17594.gernot.hillier@siemens.com> <1659-Thu22Jan2004192206+0200-eliz@elta.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1659-Thu22Jan2004192206+0200-eliz@elta.co.il> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00249.txt.bz2 On Thu, Jan 22, 2004 at 07:22:06PM +0200, Eli Zaretskii wrote: > > From: Gernot Hillier > > Date: Thu, 22 Jan 2004 16:01:14 +0100 > > > > 3. Implement a new setting "source-absolute-prefix" (analog to the already > > existing "solib-absolute-prefix") which allows the user to set a prefix for > > given absolute source code paths. > > I like this suggestion the best. It does exactly what you need here: > allow the source directory tree to be moved deeper in the hierarchy. > Your other suggestion, searching the source path for relative file > names, sounds like an ad-hoc hack to me. Thinking about this some more... here are the rearrangements I find myself needing. 1. src/include/elf.h src/bfd/elfarm-nabi.c src/bfd/elf32-arm.h obj/bfd/bfd.h obj/bfd/elfarm-nabi.o: compilation dir /blah/obj/bfd path to source ../../src/bfd/elfarm-nabi.c include flags -I. -I../../src/bfd -I../../src/include I want to be able to issue one command and find elf32-arm.h, elfarm-nabi.c, bfd.h, and elf.h. They all have relative paths, rooted at compilation directory /blah/obj/bfd. It happens to have been moved to /blah-backup/obj/bfd and /blah-backup/src/bfd. 2. Same as above, but /blah/src/configure instead of ../src/configure, so files have paths /blah/src/bfd/elf32-arm.h but also ./bfd.h. Moved to /blah-backup/obj/bfd again. So the absolute paths to headers are wrong and they don't have a simple prefix. This is probably not worth solving. 3. Similar to #2 is the situation Gernot described; the absolute path for the compilation directory has gained a prefix. This is pretty unnatural for me, because I do not mount my _entire_ root filesystem on the target. So I have to create /mnt/opt/src on the target and mount host:/opt/src there, instead of just mounting host:/opt/src on target:/mnt. But this is not hard to do, just surprising. And it avoids the problem in #2. So I would like for the absolute prefix to be applied to both compilation directories used for relative paths and directly to absolute source paths, and I think that will make my life a little easier debugging GDB :) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer