Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DEBUG_INFO_DWARF5 to config #4

Closed
gildasio opened this issue Mar 15, 2024 · 1 comment
Closed

Add DEBUG_INFO_DWARF5 to config #4

gildasio opened this issue Mar 15, 2024 · 1 comment

Comments

@gildasio
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants