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: David Taylor <taylor at cygnus dot com>
- Subject: Re: pathmap or dir command on drugs
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 08 Nov 2000 11:52:05 +1100
- Cc: gdb at sourceware dot cygnus dot com
- References: <200011062125.QAA00561@texas.cygnus.com>
David Taylor wrote:
> One camp, by comparison with breakpoints and displays, is:
>
> pathmap <from-prefix> <to-prefix>
> show pathmaps <optional-list>
> delete pathmaps <optional-list>
>
> The other camp is
>
> pathmap add <from-prefix> <to-prefix>
> pathmap list <optional-list>
> pathmap delete <optional-list>
>
> By further analogy with breakpoints and displays, we could also have:
Regardless of the command syntax, is there a way of doing:
(gdb) show pathmap
some complex-jibberish is displayed
(gdb) set pathmap jibberish
so that the entire path map can be set using a single command (instead
of having to construct it).
Hmm, Yes ok, the directory command doesn't have an equivalent:
(gdb) show directories
Source directories searched: $cdir:$cwd
(gdb) directory /tmp
Source directories searched: /tmp:$cdir:$cwd
(gdb) set directories $cdir:/tmp:/$cwd
No symbol table is loaded. Use the "file" command.
[[this is an error ok :-)]]
(gdb) show directories
Source directories searched: /tmp:$cdir:$cwd
(gdb)
:-(
If such an underlying mechanism then, I think, that would be more
useable GUI's (what to add to MI). The CLI might then add a vineer that
included operations such as ``pathmap add''.
A regex operation sounds useful (if slightly more obtuse for non UNIX
die-hards).
Andrew