[Dwarf-Discuss] Selectively strip CUs from .debug_info?

David Blaikie dblaikie@gmail.com
Thu Apr 9 21:56:43 GMT 2020


Not aware of that specific tool - though debugger load time can be greatly
improved by the use of some kind of debugger index. If their debugger of
choice is GDB, then -ggnu-pubnames + -Wl,-gdb-index (with gold or lld) has
made things pretty usable for my needs in LLVM development, and seems to
scale up pretty well to larger projects inside Google, for instance. Slows
link time a bit to produce the index (probably some room for improvement in
lld's implementation of gdb-index - since lld uses less memory than gold
without gdb-index, but more than gold when using gdb-index), takes up some
binary size (if you're using Split DWARF (doubly so with DWARFv5), the
remaining debug info left in the .o/exe aren't much, so the index is quite
a significant portion of that "not much" that's left).

On Thu, Apr 9, 2020 at 2:50 PM Robinson, Paul via Dwarf-Discuss <
dwarf-discuss at lists.dwarfstd.org> wrote:

> Does anyone know of a tool that can strip debug info for specified
> CUs from an executable?  I'm not aware of a way to do this, but
> there are many things I'm not aware of. ?
>
> The use case is someone who wants to build the entire program
> (which includes a number of 3rd-party libraries) with debug info,
> so they'll have full symbols for crash dump analysis; but then
> strip the debug info for those libraries, in order to speed up
> debugger load time.  In this scenario, stripping the 3rd-party
> code before linking isn't going to satisfy the crash dump analysis
> requirement.
>
> I've also brought up split DWARF, but I'm not sure it fits the need.
>
> Thanks,
> --paulr
>
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20200409/bba49fef/attachment.html>



More information about the Dwarf-discuss mailing list