From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6041 invoked by alias); 3 Oct 2002 14:31:56 -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 6029 invoked from network); 3 Oct 2002 14:31:54 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 3 Oct 2002 14:31:54 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17x7wz-0006OO-00; Thu, 03 Oct 2002 10:31:42 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17x71W-0006L7-00; Thu, 03 Oct 2002 10:32:18 -0400 Date: Thu, 03 Oct 2002 07:31:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Cc: Earl Chew Subject: Re: remapping absolute source paths Message-ID: <20021003143218.GA24188@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com, Earl Chew References: <200210030636.g936aOi31950@paper-wolf-solo.tigerfood.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210030636.g936aOi31950@paper-wolf-solo.tigerfood.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00032.txt.bz2 On Wed, Oct 02, 2002 at 11:36:23PM -0700, Felix Lee wrote: > Say I have a program that has some absolute path names in > the debugging info, like > /a/x/foo.c > > but /a doesn't exist here. instead I have the source > in /p. > > There's no easy way of making that work right in gdb, is > there? If I say "dir /p", it's not going to look for > /p/x/foo.c. If I say "dir /p/x" and for every other subdir > in the tree, then gdb will have problems picking /p/x/foo.c > from /p/y/foo.c > > I'm thinking either > > 1. there should be a way to tell gdb that "/a" in a > source path should be remapped to "/p" > > 2. gdb should try every sub-path of the sourcefile name, > so it should try > /p/a/x/foo.c > /p/x/foo.c > etc. > > 1 is less transparent, but it's easier to control > ambiguities, like if for some reason the executable has both > /a/x/foo.c > /b/y/foo.c > which seems unlikely, but I could see it happening when > linking several libraries and packages together. > > I'm leaning towards implementing 1. any thoughts? Actually, I think that Earl implemented #2 in the message: [RFC PATCH] Finding files in source trees in September. Earl, mind resending that for more comments? I think you satisfied my concerns completely. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer