Re: Question about splitting debug information

Martin Ritter <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
Hi Andrew,

thanks, that would be helpful.

Cheers,

Martin

On 24/10/2018 14:18, Andrew C. Morrow wrote:
> 
> I'm actually working on this right now, and have something that is 
> pretty much working. Hopefully lands in the MongoDB master tree this 
> week and I'll follow up with a link.
> 
> Thanks,
> Andrew
> 
> 
> 
> On Wed, Oct 24, 2018 at 4:48 AM Martin Ritter <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Hi,
> 
>     I have a question regarding splitting debug information from binaries
>     and libraries with SCons: What we want to do is to split the debug
>     information from libraries and executables and put them into separate
>     files following
>     https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
> 
>     So we wrote a simple builder which does just that:
> 
>     strip_debug = Builder(
>           action='objcopy --only-keep-debug $SOURCE $TARGET && '
>           'strip --strip-debug --strip-unneeded $SOURCE && '
>           'objcopy --add-gnu-debuglink=$TARGET $SOURCE',
>           suffix='.debug', prefix=".debug/")
> 
>     but obviously this modifies the original $SOURCE. So when running scons
>     again it will notice that the libraries are not up to date and
>     relink them.
> 
>     One solution is to first link the library into the build directory and
>     then copy and strip the files to their final destination. But I was
>     wondering if there is a way to do this without a temporary copy of the
>     binaries (which is quite some disk space in our project)
> 
>     Best Regards,
> 
>     Martin
> 
> 
>     -- 
>     Dr. Martin Ritter
> 
>     LMU München, Excellence Cluster Universe
>     Boltzmannstrasse 2, 85748 Garching
> 
>     Tel: (+49) 89 35831-7152
>     Fax: (+49) 89 3299-4002
> 
>     _______________________________________________
>     Scons-users mailing list
>     [email protected] <mailto:[email protected]>
>     https://pairlist4.pair.net/mailman/listinfo/scons-users
> 
> 
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> 

-- 
Dr. Martin Ritter

LMU München, Excellence Cluster Universe
Boltzmannstrasse 2, 85748 Garching

Tel: (+49) 89 35831-7152
Fax: (+49) 89 3299-4002
_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.