Debug Symbols: Difference between revisions

imported>Jtojnar
Mention dwarffs
imported>Symphorien
mention nixseparatedebuginfod
Line 130: Line 130:
==== dwarffs ====
==== dwarffs ====
To avoid the need to explicitly list every dependency in <code>environment.systemPackages</code> to have its debug output available, you can use [https://github.com/edolstra/dwarffs dwarffs]. It will create a virtual file system where gdb will be able to look for separate debug symbols for packages on-demand. The downside is that it might increase gdb start up time significantly.
To avoid the need to explicitly list every dependency in <code>environment.systemPackages</code> to have its debug output available, you can use [https://github.com/edolstra/dwarffs dwarffs]. It will create a virtual file system where gdb will be able to look for separate debug symbols for packages on-demand. The downside is that it might increase gdb start up time significantly.
==== nixseparatedebuginfo ====
[https://github.com/symphorien/nixseparatedebuginfod nixseparatedebuginfod] is a debuginfod server that can download the relevant debug outputs and source files as needed by debuginfod-capable tools. Compared to dwarffs, it does not require root access, and handles debug outputs of derivations not built by hydra (eg locally or on a custom binary cache) and source files. As of NixOS 22.11, only hotspot is built with debuginfod support by default, and notably not gdb so instead of installing <code>gdb</code> in <code>/etc/nixos/configuration.nix</code>, you should install <code>(gdb.override { enableDebuginfod = true })</code>.