This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: remapping absolute source paths
- From: Pierre Muller <muller at ics dot u-strasbg dot fr>
- To: Felix Lee <bdgle at tigerfood dot org>, gdb at sources dot redhat dot com
- Date: Thu, 03 Oct 2002 10:01:22 +0200
- Subject: Re: remapping absolute source paths
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