[Scons-users] Question about splitting debug information

Jason Kenny dragon512 at live.com
Wed Oct 24 11:32:04 EDT 2018


Just a question... would this be useful to have in SCons?  The Parts extension I work on for SCons did this via adding it to the env["PDB"] = "lib.debug". This required tweaking the actions for the linker tool on posix systems. I find it very useful for similar reasons.

Jason
________________________________
From: Scons-users <scons-users-bounces at scons.org> on behalf of Martin Ritter <martin.ritter at lmu.de>
Sent: Wednesday, October 24, 2018 10:01 AM
To: SCons users mailing list; Gary Oberbrunner
Subject: Re: [Scons-users] Question about splitting debug information

Hi Gary,

thank you, I overlooked AddPostAction. I now have something which does
what I want but I'm looking forward to compare that with Andrews
implementation.

Best Regards,

Martin

On 24/10/2018 15:18, Gary Oberbrunner wrote:
> The standard approach for this is to use AddPostAction to do your
> post-build steps, rather than a separate builder. Those operate on the
> target before its signature is stored.
>
> -- Gary
>
> On Wed, Oct 24, 2018 at 4:48 AM Martin Ritter <martin.ritter at lmu.de
> <mailto:martin.ritter at lmu.de>> 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://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fgdb%2Fonlinedocs%2Fgdb%2FSeparate-Debug-Files.html&data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&sdata=S87AVOFBXz6jVOu4eEz%2FG6O%2FGD6AUAhnz1cN2%2BLO6sk%3D&reserved=0
>
>     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
>     Scons-users at scons.org <mailto:Scons-users at scons.org>
>     https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&reserved=0
>
>
>
> --
> Gary
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&reserved=0
>

--
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
Scons-users at scons.org
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20181024/21489c4b/attachment.html>


More information about the Scons-users mailing list