Nix: add info on stacktraces

This commit is contained in:
Mihai Fufezan 2024-11-07 16:14:50 +02:00
parent 9018cb76cf
commit ac31e2dd4f
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg

View file

@ -41,6 +41,22 @@ Run `nix develop` first, then follow the
[Building with ASan](https://wiki.hyprland.org/Crashes-and-Bugs/#building-the-wayland-stack-with-asan) [Building with ASan](https://wiki.hyprland.org/Crashes-and-Bugs/#building-the-wayland-stack-with-asan)
guide. guide.
## Getting a debug stacktrace
Debug stacktraces provide useful info on why a program crashed. To get proper
stacktraces from Hyprland, make sure it was [built in debug mode](#build-in-debug-mode).
After a crash, perform the following steps:
```sh
nix shell nixpkgs#gdb # get gdb temporarily
coredumpctl # check the PID of the recent crash
coredumpctl debug <PID> # using the PID found in the previous step
```
The rest of the process is the same as
[here](../../Crashes-and-Bugs#obtaining-a-debug-stacktrace), from step 3 onwards.
## Manual building ## Manual building
Nix works differently than other build systems, so it has its own abstractions Nix works differently than other build systems, so it has its own abstractions