This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: pathmap or dir command on drugs
- To: gdb at sources dot redhat dot com
- Subject: Re: pathmap or dir command on drugs
- From: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Date: Thu, 9 Nov 2000 14:19:56 -0800 (PST)
> As for dbx, I suggest to give numbers to each pathmap so that deletion is
> made on the index rather than on some path.
David Taylor <taylor@cygnus.com writes:
>When I last used dbx it didn't have a pathmap command. And my current
>system doesn't have dbx on it -- would you be willing to summarize the
>current dbx pathmap command?
Sun dbx started this thread.
SGI dbx has a pathmap facility also (has had for a long time).
I'll describe it, but am not promoting it as desirable syntax!
============
Background, directory paths:
use <dir1> <dir2>
replaces the current list of search paths with dir1,dir2.
example: use /abc /def
use
print the list of directory paths
dir <dir1>
adds dir1 to the list of search paths (at the end of the list).
============
pathmap:
dir /a/b/c/:/hosts/foo/
adds a special entry to the list of search paths.
pathmap entries show up in the 'use' list
just like regular directory-path entries.
If the literal
/a/b/c/
is found in a path then it is replaced by /hosts/foo/
from the pathmap
and no further pathmapping is done (only one replacement).
The pathmaps and directories are in a single list but
are actually searched in separate loops.
(sequential search: not a problem in practice).
One drawback is that a : in a path cannot
be represented in the directory
search list (has not been a problem in practice, fortunately).
It's worked really well
for the cases already mentioned in this thread:
A source tree has moved from /a/b/c to /d/e/f/xold
dir /a/b/c/:/d/e/f/xold/
A source tree is remote, so use the automounter
dir /a/:/hosts/somemachine.domain/a/
Regards,
David B. Anderson davea@sgi.com danderson@acm.org http://reality.sgi.com/davea/