How to use kgdb via ethernet (kgdboe)?

I am using ubuntu 12.04 and the kernel version is 3.12.6, I want to learn how to use kgdb to debug the kernel. I did not get much information. relative to kgdboe (kgdb via Ethernet). I compiled the kernel and included kgdb in menuconfig , I created the kernel image using make bzImage on the development machine and copied it on the target machine, now the problem is how to connect both the target and the development machine. I m not getting the parameter for kgbdoe . Plz help if anyone knows how to use kgdb via ethernet

+4
source share
2 answers

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

You need to run the debugging kernel with special parameters - for example, for example:

kgdbwait kgdbcon kgdboe=@192.168.248.76/,@192.168.242.24/00:11:22:33:44:55

and on the debugging side, the following commands are executed:

gdb
file vmlinux
target remote udp:192.168.248.76:6443

he worked for me.

+3
source

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

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

Then type 'dmesg' to see the download log and get connection instructions from gdb.

+2
source

All Articles