Re: [PATCH 4/5] Add "target:" filename handling to find_separate_debug_file

Jan Kratochvil
2015-07-25T18:15:22Z

On Tue, 16 Jun 2015 11:42:47 +0200, Gary Benson wrote:
> This commit updates find_separate_debug_file to handle filenames
> prefixed with "target:". The same-directory and DEBUG_SUBDIRECTORY
> locations are checked with the prefix if supplied. The debugdir
> location is checked both with and without the prefix if one is
> supplied. This makes GDB able to fetch separate debug files from
> remote targets and from inferiors in containers.

I do not have practical experience with containers but from what I know their
target is to make the container content OS-independent. That is I can run on
CentOS host a container with Ubuntu etc. Then this shortcut will not work.
I can provide Ubuntu debug info files in some /root/os/ubuntuxyz .
Similarly for Fedora 21 running on CentOS I can provide debug info files
easily with mock in /var/lib/mock/fedora-21-x86_64/root/ .

So one should be able to specify also non-/ directory.

Besides that one should be able to specify multiple directories as for example
there exist site configurations where each machine has /mnt/nfsdir mounted
directory with debug info files for all operating systems in use etc.

Unfortunately on UNIX GDB separates multiple directories by ':' which
conflicts with the "target:" prefix. But maybe one could make an exception
that "target" component would not be parsed as separate directory (which
should not clash as nobody is going to use directory name without leading
slash).

Jan