This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pathmap or dir command on drugs



    > 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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]