How to use kgdb over ethernet (kgdboe)?

Have you read this: https://www.kernel.org/pub/linux/kernel/people/jwessel/kgdb/ch03s04.html ?

You have to run debugged kernel with special options - like for example:

kgdbwait kgdbcon [email protected]/,@192.168.242.24/00:11:22:33:44:55

and on debugging side you run following commands:

gdb
file vmlinux
target remote udp:192.168.248.76:6443

it has worked for me.


You can get the kgdboe source from here, build it and load it into your kernel:

make -C /lib/modules/$(uname -r)/build M=$(pwd)
sudo insmod kgdboe.ko

Then type 'dmesg' to see the load log and get instructions on connecting from gdb.

Tags:

Linux