This is the mail archive of the 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]

Re: MiniDebugInfo support

On Tue, Nov 06, 2012 at 18:50:27 +0100, Mark Wielaard wrote:
> How standardized is this? Is it just for Fedora or do other distros
> also use it? Is the support in GDB and RPM upstream or only in the
> Fedora packages? Can it be seen as a standard GNU extension?

AFAIK no other distribution uses it. It is not in RPM upstream. I don't
know if either is planned.

> > 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.
> Do you have this implemented this way already? If so could you provide
> a link?

I don't, and as was pointed out, it's not actually possible. I have
assumed that elfutils look up both symtab and dynsym and did not consult
the code.

So without elfutils support, we can either implement the address-symbol
lookup ourselves via libelf (possibly not supporting powerpc as the
logic seems to be several levels more complicated there).  Or somehow
construct external debuginfo file with proper symtab from the binary and
compressed debuginfo, but I don't think that's easily achievable.
Another ugly hack that comes to mind is to have two separate dwfl
handles, one with the minisymtabs reported for all the modules, the
other without, and look up the symbols on both. If two sizeless symbols
are returned then use the closer one.

Note that "minidebuginfo" support is not essential feature for us (or
the support for it on ppc), but we'd like to take advantage of it since it's
going to be available in Fedora 18.

> I think it makes the most sense to hide it all behind an interface
> (like) dwfl_module_getsymtab() and dwfl_module_getsym(). But maybe a
> case can be made for supporting something more low-level and make it
> easily possible to get an Elf handle for the image in the section
> from a Dwfl?

As Jan mentioned, we mostly care about dwfl_module_addrsym. Maybe if
there was possibility to indicate which symbol table to search, or
indicate that we want to search all of them? I'm afraid I'm the last
person on this mailing list with the knowledge to propose a proper


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