all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pjotr Prins <pjotr.public12@thebird.nl>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Debugging and source code
Date: Sat, 28 Jan 2017 04:57:42 +0000	[thread overview]
Message-ID: <20170128045742.GA22211@mail.thebird.nl> (raw)
In-Reply-To: <87efzq5eof.fsf@gnu.org>

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	other threads:[~2017-01-28  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  6:53 Debugging and source code Pjotr Prins
2017-01-25 13:22 ` Ludovic Courtès
2017-01-25 13:26   ` Pjotr Prins
2017-01-25 17:54     ` Ludovic Courtès
2017-01-26  3:58       ` Pjotr Prins
2017-01-26  8:11         ` Chris Marusich
2017-01-26  8:43           ` Pjotr Prins
2017-01-26  8:58           ` Tobias Geerinckx-Rice
2017-01-26 18:03             ` Ludovic Courtès
2017-01-26  9:54         ` Ludovic Courtès
2017-01-28  4:57           ` Pjotr Prins [this message]
2017-01-30  9:05             ` Ludovic Courtès
2017-01-30 10:08               ` Danny Milosavljevic
2017-01-25 20:41   ` Danny Milosavljevic
2017-01-26  4:03     ` Pjotr Prins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170128045742.GA22211@mail.thebird.nl \
    --to=pjotr.public12@thebird.nl \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.