nixpkgs/pkgs
Alyssa Ross d57568fcad
linuxManualConfig: install GDB scripts
These are required to debug kernel modules.  Since we're now able to
do that, there's another reason besides BTF to enable DEBUG_INFO, so
I've done that for pre-BTF kernel modules as well here.

For GDB to get configured correctly, vmlinux-gdb.py has to be two
directories up from scripts/gdb, and vmlinux has to be next to
vmlinux-gdb.py.  The least invasive way to satisfy these constraints
is to make vmlinux a symlink, which GDB will resolve before looking
for vmlinux-gdb.py.

Tested both ways of getting the scripts into GDB that I know of:

gdb /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/vmlinux \
    -iex 'add-auto-load-safe-path /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/lib/modules/6.1.19/build/vmlinux-gdb.py' \
    -ex 'lx-version' \
    -ex 'q'
gdb /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/vmlinux \
    -ex 'source /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/lib/modules/6.1.19/build/vmlinux-gdb.py' \
    -ex 'lx-version' \
    -ex 'q'

Also tested that the strip changes don't result in meaningful output
size changes (there's some small variation due to BTF data not always
coming out the same size, which is unrelated), and built every kernel
I can on x86_64 to make sure I'm not relying on build system behaviour
specific to newer kernels.
2023-03-20 00:09:52 +00:00
..
applications Merge pull request #220704 from mdarocha/vsliveshare-update 2023-03-16 13:28:14 -03:00
build-support Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
common-updater
data Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
desktops deepin.deepin-image-viewer: 5.9.4 -> 5.9.11 2023-03-16 11:26:45 +08:00
development Merge pull request #221443 from vbgl/ocaml-data-encoding-0.6 2023-03-16 15:00:02 -03:00
games lbreakouthd: 1.1 -> 1.1.1 2023-03-16 14:03:06 -03:00
misc
os-specific linuxManualConfig: install GDB scripts 2023-03-20 00:09:52 +00:00
pkgs-lib
servers Merge pull request #221357 from tfc/mod_tile-cmake 2023-03-16 15:50:26 +00:00
shells Merge pull request #221161 from r-ryantm/auto-update/oh-my-zsh 2023-03-15 22:30:19 +02:00
stdenv Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
test
tools Merge pull request #221360 from figsoda/orz 2023-03-16 14:11:56 -03:00
top-level Merge pull request #221360 from figsoda/orz 2023-03-16 14:11:56 -03:00