Re: Question about splitting debug information

Jason Kenny <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <SN2PR01MB2045BD9096E076381703BBFA84F60@SN2PR01MB2045.prod.exchangelabs.com>
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 <[email protected]> on behalf of Martin Ritter <[email protected]>
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 <[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://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fgdb%2Fonlinedocs%2Fgdb%2FSeparate-Debug-Files.html&amp;data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&amp;sdata=S87AVOFBXz6jVOu4eEz%2FG6O%2FGD6AUAhnz1cN2%2BLO6sk%3D&amp;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
>     [email protected] <mailto:[email protected]>
>     https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&amp;data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&amp;sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&amp;reserved=0
>
>
>
> --
> Gary
>
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&amp;data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&amp;sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&amp;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
[email protected]
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&amp;data=02%7C01%7C%7Cb32b75c36e694acc62d108d639c19ecb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759901081619364&amp;sdata=ZgLW8a4J843FLEpxH%2FUThvo88OMykOjAgY%2F6BiFCjK0%3D&amp;reserved=0

_______________________________________________
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.