Suspending kernel execution
  • Using Ctrl+C

    Kernel execution can be stopped by pressing Ctrl+C on the GDB terminal, which is a signal to KGDB to take control of the kernel and contact GDB.

  • Using Magic SysRq

    This enables the console device to interpret special characters as commands to dump state information or to invoke the kernel debugger.

    To add this support, enable the CONFIG_MAGIC_SYSRQ option during the configuration phase, in the section:

    Kernel hacking ---> Magic SysRq  Key

    The debugger can be entered by sending the letter g to the /proc/sysrq-trigger file as shown below:

    target# echo "g" >  /proc/sysrq-trigger
    SysRq : GDB
    Entering GDB stub
Continuing kernel execution

To continue kernel execution, use the GDB command continue, which instructs the KGDB stub to resume running the kernel.