Add `DEBUG_INFO_DWARF5` to config
gildasio opened this issue · 1 comments
gildasio commented
Trying to debug the latest kernel (6.8) give me the following error when run gdb
:
~/.t/t/e/k/linux-6.8 (main *%=)> gdb -q vmlinux
Reading symbols from vmlinux...
(No debugging symbols found in vmlinux)
Traceback (most recent call last):
File "/home/gildasio/.tmp/test_kernel/easylkb_git/kernel/linux-6.8/vmlinux-gdb.py", line 25, in <module>
import linux.constants
File "/home/gildasio/.tmp/test_kernel/easylkb_git/kernel/linux-6.8/scripts/gdb/linux/constants.py", line 11, in <module>
LX_hrtimer_resolution = gdb.parse_and_eval("hrtimer_resolution")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gdb.error: 'hrtimer_resolution' has unknown type; cast it to its declared type
(gdb) quit
My gdb
version is 14.2:
$ gdb --version
GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
As pointed out by Jan Kiszka on this mail thread adding DEBUG_INFO_DWARF5
to .config
do the trick.
$ ./scripts/config -e DEBUG_INFO_DWARF5
$ make olddefconfig
$ make -j (nproc)
$ gdb vmlinux -q -d .
Reading symbols from vmlinux...
(gdb) apropos lx-s
lx-slabinfo -- Show slabinfo
lx-slabtrace -- Show specific cache slabtrace
lx-sym_to_pfn -- symbol address to PFN
lx-symbols -- (Re-)load symbols of Linux kernel and currently loaded modules.
I'm opening this as issue not as PR to add the config on example.KConfig
because I don't know per now from which kernel version it would happens.
deepseagirl commented
cool, thank you very much for the details & glad you were able to find a solution!
for now I have added a reference to this in the project readme under Known Issues: https://github.com/deepseagirl/easylkb/blob/main/README.md#known-issues
in the future, we'll plan on adding a more dynamic kernel config feature to support individual version requirements like this.