Strategy for Snaps with Debugging Symbols

Alfonso Sanchez-Beato alfonso.sanchez-beato at canonical.com
Tue Mar 28 06:13:24 UTC 2017


On Fri, Mar 24, 2017 at 6:49 PM, Dmitrii Shcherbakov <
dmitrii.shcherbakov at canonical.com> wrote:

> Hi everybody,
>
> My question is in the context of a libvirt & qemu snap but I think it is
> worthwhile to discuss that for any software written in C, C++ or other
> compiled languages for which debugging symbols can be generated.
>
> A lot of debugging tasks can be solved by looking at logs and {s,l}tracing
> but sometimes this is not enough.
>
> With Debian packages the approaches are:
>
> 1) to provide your own -dbg package;
> 2) let https://launchpad.net/ubuntu/+source/pkg-create-dbgsym generate it
> and add a ddebs.ubuntu.com repo on demand.
>
> https://wiki.ubuntu.com/Debug%20Symbol%20Packages
> https://wiki.ubuntu.com/AptElfDebugSymbols
> https://wiki.debian.org/AutomaticDebugPackages
>
> One idea for snaps is to use -dbg tracks which are going to contain snaps
> with embedded debugging symbols. Of course, some snaps may contain a number
> of services so you'd have to customize your build process and create
> additional automation around snapcraft to make it more manageable.
>

I would love to see this, it would ease a lot the debugging pain for snaps.
IMHO using a debugging track makes lots of sense, provided gdbserver/gdb in
Ubuntu Core can be configured to find the symbols automatically.


>
> https://snapcraft.io/docs/reference/channels
>
> Another issue is that with separate snaps that would have debugging symbols
> you'd have to replace a non-debug snap with a debug snap which would
> complicate things if you had a certain state already and did not want a
> transactional erase of the state you wanted to debug.
>
> In the case of ddebs you can just download symbols and use them with an
> existing application while with a separate snap you need to perform a
> replacement.
>
> I was wondering if anybody thought about it yet and, if not, to start this
> discussion here.
>
> Thanks in advance!
> <https://snapcraft.io/docs/reference/channels>
> Best Regards,
> Dmitrii Shcherbakov
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



More information about the Snapcraft mailing list