Debugging Linux Kernel using KGDB Part 2 -kgdbcon

kgdb allows you to see printk messages inside gdb, while gdb is connected to the target machine. In order to achieve this add "kgdbcon" into kernel command line.

You can look into the following link for adding kernel command line parameters to grub menu

https://embeddedguruji.blogspot.com/2018/12/how-do-permanently-add-kernel-command.html

After you type "continue" in the host machine/development machine, generate an panic message on the target machine.

Use the sample program from the following link, build and load it.

https://embeddedguruji.blogspot.com/2018/12/kernel-panic-in-linux.html


When the kernel panic is generated, the dump message and the other logs will be displayed on the host machine gdb session.





Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto