On Sat, Dec 22, 2012 at 03:50:07AM +0100, Jan Kratochvil wrote:
On Sat, 22 Dec 2012 02:16:31 +0100, Mark Wielaard wrote:
> If the minidebuginfo was really like its name
> suggests a debuginfo file then it would have been an almost perfect fit
> for libdwfl. But it is slightly different. Basically it only contains
> the symtab related sections and the symtab table is not a replacement,
> but an extension of the main file dynsym table.
The original idea really was to make it a replacement for the separate debug
info file, if that one cannot be found.
This also means one could put for example .debug_* sections into
Yes, we could also use it as another location of the debug file if it
would actually contain DWARF sections. But at the moment it doesn't
and so even calling dwarf_begin () on it would fail. But as you can
see from the patch debug and symbol handling is mostly separate in
libdwfl. The compressed ELF section idea can theoretically be used for
OTOH I do not think it is a problem as - if it ever remains in use -
probably won't get used for anything besides the .symtab.
For libdwfl we will always have to treat it somewhat special, even if
we would open it as debug file, since although it has an actual
.symtab/SYMTAB section it has slightly different semantics since you
cannot use it as replacement for the main .synsym/DYNSYM table). So using
it naively you would actually loose symbol information. So in hindsight
it would have been nicer to use a different section type/name. But
now that we have to logic in there we could also use it to mark the
symtab of a "real" minidebuginfo in the same way. It should really
only require some small tweaks, but I don't want to do those unless
we expect/see such real minidebuginfo that contain actual DWARF sections.