> -----Original Message----- > From: Greg Clayton <clayb...@gmail.com> > Sent: Thursday, April 9, 2020 6:32 PM > To: Robinson, Paul <paul.robin...@sony.com> > Cc: dwarf-discuss@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- > disc...@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@lists.dwarfstd.org > > > https://urldefense.com/v3/__http://lists.dwarfstd.org/listinfo.cgi/dwarf- > discuss- > dwarfstd.org__;!!JmoZiZGBv3RvKRSx!uBfzpOrA5519OhhGkODt1sTUVyTTJkfTTpGqJ5W9 > rwHxBfo3p5NvGwPvlXXpa6OrdQ$ _______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org