On Fri, 09 Oct 2009 03:06:41 +0200, Denys Vlasenko wrote:
There is a project, somewhat inactive, which basically mounts
a network filesystem on /usr/lib/debug/.build-id so that gdb
can use debuginfos from network. Homepage:
https://fedoraproject.org/wiki/Features/DebuginfoFS
I do not think currently this project can bring any benefits. It has two
purposes:
(a) Reduce the size of the single loaded .debug file - this is right in the
future but due to various reasons GDB currently needs to read the whole
.debug file first to be able to extract the needed information from it.
GDB currently always reads the single whole .debug file so a download vs.
filesystem access do not make a difference.
(b) Download only specific file of the whole rpm package.
The use cases for the .debug files are:
(1) client bugreport: The client uses remote retrace server, no debuginfo
needed.
[Crash-catcher] Draft retrace server [...]
https://fedorahosted.org/pipermail/crash-catcher/2009-October/000052.html
(2) developer machine.
Only the combination (2)+(b) can benefit from the DebuginfoFS project. But
still I think the developer does not have such a problem to once download the
whole debuginfo rpms for his/her next months of debugging sessions. Also
(s)he will probably need various libraries related to the package being
developed, not just some single library from it. So it is even more
convenient to download it just once and not to wait for this or that .debug to
be loaded during the following interactive debugging sessions.
we only need a gdb command-line option, say, --debuginfo-dir=DIR,
which
directs gdb to check that DIR for debuginfos too, in addition to standard
one (/usr/lib/debug/.build-id).
There is no "in addition to" option, still you can use:
-ex "set debug-file-directory THE-PATHNAME-YOU-WANT"
One needs to be careful -ex options get executed only after the non-option
commandline arguments get loaded. So one rather needs to convert the
commandline arguments to the last "-ex" commands like:
gdb -ex "set debug-file-directory Q" X core.Y
into:
gdb -ex "set debug-file-directory Q" -ex "file X" -ex "core-file
core.Y"
but only one directory -
maybe it makes sense to allow a list of directories.
Still I think a valid extension would be to support
-ex "set debug-file-directory DIR1:DIR2:DIR3"
, although still I would rather like to go the retrace server way.
Sometimes I was also using a very ugly solution of /tmp/subdir/debug
symlinking to /usr/lib/debug and containing/overriding some files there.
Anyway, abrt does not need that, so it's theoretical...
Jan, do you think you can implement it on gdb side?
Isn't the -ex "set debug-file-directory Q" option OK?
Thanks,
Jan