This is the mail archive of the
mailing list for the elfutils project.
- From: Martin Milata <mmilata at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 06 Nov 2012 15:32:11 +0100
- Subject: MiniDebugInfo support
a future version of Automatic Bug Reporting Tool  will use elfutils
for extracting stack traces from core dumps. These stack traces will be
more useful if we can take advantage of the MiniDebugInfo feature that
will be present in Fedora 18.
The idea behind minidebuginfo is to take the separate debuginfo file
that is created during the package build process, drop most of its
sections except the symbol table, LZMA-compress it and put it into the
.gnu_debugdata section of the binary being build. See the feature
page  or GDB  and RPM  implementation if you want details.
Thanks to the find_debuginfo callback in libdwfl, it is very simple to
implement the support in the application -- if regular debuginfo file is
not found we can extract the .gnu_debugdata section to a temporary file
and make the library use it, and then delete it when it's not needed
However, if elfutils supported this feature directly, more users can
benefit from it. I'd like to try to put together a patch for that, but
it is not clear to me how to go about this. Implementing this as a
standard callback probably requires creating a temporary file as the
library needs a file descriptor of the debuginfo. We can then keep track
of the file and delete it afterwards, or unlink it immediately after
opening it - but that would prevent us from returning a meaningful file
So essentially, I have two questions:
1) Is such functionality desirable in elfutils?
2) What is the right way to add the support for it to the library?