This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MiniDebugInfo support


Hello,

a future version of Automatic Bug Reporting Tool [1] 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 [2] or GDB [3] and RPM [4] 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
anymore.

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
name...

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?

Thanks,
Martin Milata

[1] https://fedorahosted.org/abrt/
[2] http://fedoraproject.org/wiki/Features/MiniDebugInfo
[3] https://bugzilla.redhat.com/show_bug.cgi?id=834068
[4] https://bugzilla.redhat.com/show_bug.cgi?id=834073

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