guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging and source code


From: Pjotr Prins
Subject: Re: Debugging and source code
Date: Sat, 28 Jan 2017 04:57:42 +0000
User-agent: Mutt/1.6.2 (2016-07-01)

On Thu, Jan 26, 2017 at 10:54:56AM +0100, Ludovic Courtès wrote:
>   0. Status quo: people need to get the source by themselves with “guix
>      build -S”.
> 
>   1. The “debug” output, when it exists, always includes the source.
> 
>   2. When a “source” output exists, the source code is copied there.
>      The “debug” output contains nothing more than debugging info, as is
>      currently the case.
> 
> We’ve already discussed #1.
> 
> With #2, we’d have to manually opt-in in package recipes.  So we could
> have:
> 
>   (package
>     (output '("out" "debug"))  ;like now
>     …)
> 
> or:
> 
>   (package
>     (output '("out" "source" "debug"))
>     …)
> 
> Maybe that’s too inconvenient though.
> 
> Thoughts?

I think we are missing something here. What I want to achieve is that
someone can do 'guix package -i gdb foo:debug-with-sources' so he/she can 
simply start the debugger with

   gdb ~/.guix-profile/bin/foo

and have full debugging information to test drive.

The problem I am facing now is that I have to explain non-programmers
to fetch the source code, unpack it from a *named* store path, go to
the new directory and then run gdb. Not only that, this package
fetches multiple source trees from multiple origins (a common thing in
programming languages). So I'll have to explain how to fetch each
individual tree and make sure they play well together.

And that is exactly what the build system does!!

So, the next idea is to use -K and tell someone to move into the
temporary directory. But then again I miss the dependencies with their
trees.

The :debug target is awesome, it wouuld be even more awesome to point
to source trees from the profile - so they are easy to find and in
sync with the built target. It would mean you can ask anyone to
debug software like we are doing here:
https://github.com/lomereiter/sambamba/issues/219#issuecomment-275615245

Note that this feature is to debug complex software on architectures I
have no access for - like some HPC environments. In the next step I'll
make it relocatable too. I can probably work it using multiple -K's,
but it would be a one-off for every software package. 

That is my request. 

I have a feeling that if I have a use case there will be more takers,
what to think of icecat ;)

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]