[Nix-dev] Debugging Symbols
Eelco Dolstra
eelco.dolstra at logicblox.com
Mon Feb 15 17:50:38 CET 2016
Hi,
On 15/02/16 15:50, Luca Bruno wrote:
>> I noticed that almost all Nix packages are stripped of debugging symbols and
>> was hoping to discuss a possible solution that would both keep the closure
>> size minimal and allow post-hoc debugging of crashes. The small closure size
>> speaks for itself and since systemd helpfully stores coredumps of all crashes
>> it would be nice to be able to look into them without having to recompile and
>> observe the crash again.
>>
>> TL;DR debugging symbols for all binaries, can be downloaded after the fact,
>> works automatically in gdb.
> +1, with the multi outputs branch [1] it makes a lot of sense to ship an
> additional output for debug symbols
This is already supported. Just add
separateDebugInfo = true;
to a package to get an output named "debug", with debug symbols in
lib/debug/.build-id. This also enables the -ggdb flag.
You can then enable GDB to find these symbols by adding
environment.enableDebugInfo = true;
to configuration.nix.
Note however that very few packages in Nixpkgs currently set separateDebugInfo
because Hydra disk space is problematic as it is.
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
More information about the nix-dev
mailing list