From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7695 invoked by alias); 3 Oct 2002 08:07:28 -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 7688 invoked from network); 3 Oct 2002 08:07:27 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.250) by sources.redhat.com with SMTP; 3 Oct 2002 08:07:27 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (Postfix) with ESMTP id 9B73B633; Thu, 3 Oct 2002 10:08:39 +0200 (CEST) Message-Id: <4.2.0.58.20021003095556.01f4c900@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr Date: Thu, 03 Oct 2002 01:07:00 -0000 To: Felix Lee , gdb@sources.redhat.com From: Pierre Muller Subject: Re: remapping absolute source paths In-Reply-To: <200210030636.g936aOi31950@paper-wolf-solo.tigerfood.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2002-10/txt/msg00030.txt.bz2 At 08:36 03/10/2002 , Felix Lee a écrit: >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" Did you try to use dir /p/.. because it might be that gdb does try /p/../a/x/foo.c normally this should be expanded back into /a/x/foo.c but we could probably easily get GDB to handle it the other way around so that it gets translated into /p/x/foo.c. This would of course require some documentation about this new feature, but as dir /p/.. is probably quite useless for now, it could be adapted for this purpose, without the need of a new gdb command. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99