Debugging the Linux Kernel using KGDB Part 3 - Magic Sysrq

Consider a scenario, where you have sent "continue" command in gdb to target machine,  now you need to connect to the debugger(gdb).  There is no way now, you can achieve it from development machine/host machine.

In this case, we can use the magic SysRq sequence on the target machine to enter the debugger mode.

Logged in as a root, run the following command to stop the kernel and connect with debugger

$echo 'g' > /proc/sysrq-trigger


To use this feature, your kernel should be compiled with CONFIG_MAGIC_SYSRQ feature


Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto