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

Robinson, Paul paul.robinson@sony.com
Thu Apr 9 23:01:20 GMT 2020



> -----Original Message-----
> From: Greg Clayton <clayborg at gmail.com>
> Sent: Thursday, April 9, 2020 6:32 PM
> To: Robinson, Paul <paul.robinson at sony.com>
> Cc: dwarf-discuss at lists.dwarfstd.org
> Subject: Re: [Dwarf-Discuss] Selectively strip CUs from .debug_info?
> 
> Not aware of any tools that can do this, but can't you just do this in
> your build?:
> 
> - link once with full .o files and save debug info off
> - strip debug info from all third party .o files and link again. You still
> get all debug info for any .o files you didn't strip

For sanity we'd need to verify the two links did produce exactly the same 
non-debug-info parts; but it seems likely the linker would be idempotent
enough for that to work.  Thanks!
--paulr

> 
> 
> 
> 
> > On 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
> >
> https://urldefense.com/v3/__http://lists.dwarfstd.org/listinfo.cgi/dwarf-
> discuss-
> dwarfstd.org__;!!JmoZiZGBv3RvKRSx!uBfzpOrA5519OhhGkODt1sTUVyTTJkfTTpGqJ5W9
> rwHxBfo3p5NvGwPvlXXpa6OrdQ$




More information about the Dwarf-discuss mailing list