Proposed F18 feature: MiniDebugInfo
alexl at redhat.com
Tue May 8 06:22:03 UTC 2012
On Mon, 2012-05-07 at 16:24 -0400, Bill Nottingham wrote:
> Alexander Larsson (alexl at redhat.com) said:
> > I just wrote a new Feature proposal for shipping minimal debug info by
> > default:
> > https://fedoraproject.org/wiki/Features/MiniDebugInfo
> > The feature page lists some of the background and statistics. It also
> > lists some options in how to implement this, which all have various
> > different pros and cons. I'd like to hear what peoples opinions on these
> > are.
> > My personal opinion is that we should go with compressed data, in the
> > original files without the line number information. This means we use
> > minimal space (i.e. an installation increase by only 0.5%) while being
> > completely transparent to users. It does however make the normal
> > packages larger in a non-optional way which some people disagree with.
> 1) minidebuginfo.rpm is silly. Either it's small enough (and 0.5% is
> certainly that, IMO) that it goes in the main package, or it's too big and
> we should just do regular debuginfo packages.
I completely agree.
> 2) "It will also make it easier to do things like system wide profiling,
> userspace dynamic probes and causual debugging."
> However, the Scope: is only gdb and rpm. Wouldn't said tools also need
> changes? Would this be done in libdwarf, or similar?
I'm not sure what these tools use to unwind, I expect that we'd have to
implement it in libunwind too (added it to the deps) at the very least.
However, anything that already supports separate debug info should be
able to also load this with very little work as it is very similar.
> 3) You mention this being done in find-debuginfo.sh, via injection(?). Is
> this possible to be done automatically even for non-rpm-packaged code?
It surely is, the actual change is just a few lines of added shell code.
Basically, when you've separated out the "normal" separate debug info
you make a copy of it, then run some strip operations on the copy to
remove all but the minimal debug info, then you do:
objcopy --add-section .gnu_debugdata=$debuginfofile.xz $executable
> 4) I disagree with the contention that this should all be done via the
> retrace server.
> For this to provide a reasonable amount of information, all you need is:
> - an unwinder
> Simpler is usually better.
More information about the devel