raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.03k stars 4.95k forks source link

Kernel 5.4 and missing GDB scripts #3676

Open phryniszak opened 4 years ago

phryniszak commented 4 years ago

After switching to kernel 5.4.(45) gdb kernel scripts stopped working. Was working for my in 4.19.

I have in .config:

CONFIG_GDB_SCRIPTS=y

But in GDB no sign of lx- commands.

0xc001ebb4 in ?? ()
Reading symbols from ./vmlinux...
(gdb) lx-
Undefined command: "lx-".  Try "help".
(gdb) apropos lx
(gdb) c

Any clues?

pelwell commented 4 years ago

Sorry - this one slipped past. You can't set CONFIG_GDB_SCRIPTS=y without also setting CONFIG_DEBUG_INFO=y.

pelwell commented 4 years ago

Edited - that should have said CONFIG_DEBUG_INFO=y.

phryniszak commented 4 years ago

I had CONFIG_DEBUG_INFO=y. I could see all symbols in GDB. One thing that didn't work were all python lx- commands. I try to rebuild 5.4 once more to confirm it.

phryniszak commented 4 years ago

I tried again 5.4.49 and no luck. I used original rpi config and add in CONFIG_DEBUG_INFO=y and CONFIG_GDB_SCRIPTS=y I can debug kernel with symbols but no lx- commands. I have to stay with 4.19 for the moment.

qodroi commented 2 years ago

Same here with 5.18.2