includeos / IncludeOS

A minimal, resource efficient unikernel for cloud services
https://includeos.github.io/
Apache License 2.0
4.93k stars 365 forks source link

Make it easier to enable/disable debugging #2279

Open MagnusS opened 2 months ago

MagnusS commented 2 months ago

When debugging it would be useful to have a single option for enabling symbols and debugging information and avoid stripping the binary. Now that stacktraces work again it can also be useful with symbols from libcxx and musl. One solution could be to use dontStrip and enableDebugging in nix to control it, see https://nixos.wiki/wiki/Debug_Symbols.

Some debugging options I have found are listed below.

In cmake:

Musl and musl-unpatched uses --enable-debug

There could be more :-)

fwsGonzo commented 2 months ago

Everything needs to be built with symbols, and then at the end there's a decision to strip or not. That will also be compatible with backtraces support, since they also need symbols and then strip after.