How to break the REMOTE debugged Linux kernel from the LOCAL machine via GDB + KGDB?

547 views Asked by At

I'm debugging the Linux kernel through GDB + KGDB + two virtual machines + serial ports.

If we use GDB to debug a normal program, we can just press Ctrl+C to break the execution of the program.

However, when I connect GDB to a remote KGDB stub, I cannot break the remote machine anyway, except that I use the following command on the REMOTE machine:

echo g > /proc/sysrq-trigger

How to break the REMOTE debugged Linux kernel from the LOCAL machine?

1

There are 1 answers

0
Santi Rodrigo On

You should use minicom -in the local machine- for the serial connection between both machines: press Ctrl-A and then 'F' (this is for sending a break to the remote machine), and after that send 'G': this is the same as the echo command you mentioned above.