guix-devel
[Top][All Lists]
Advanced

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

Re: Debugging and source code


From: Ludovic Courtès
Subject: Re: Debugging and source code
Date: Mon, 30 Jan 2017 10:05:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Pjotr!

Pjotr Prins <address@hidden> skribis:

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

That’s already what happens, though one needs to tell GDB about the
location of debug info as well as the location of the source:

  
https://www.gnu.org/software/guix/manual/html_node/Installing-Debugging-Files.html

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

I don’t think someone who runs GDB can still be called a
“non-programmer”.  :-)

Regardless, as I wrote, I do agree that shipping source in the “debug”
output or similar would facilitate things, the question is about how to
do that in practice (the list of proposals above.)

Ludo’.



reply via email to

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