This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
remapping absolute source paths
- From: Felix Lee <bdgle at tigerfood dot org>
- To: gdb at sources dot redhat dot com
- Date: Wed, 02 Oct 2002 23:36:23 -0700
- Subject: remapping absolute source paths
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?
--