KGDB/KDB running over internet as serial connection isn't possible

From: Muhammad Usama Anjum
Date: Mon Jan 13 2025 - 08:43:42 EST


Hi,

I'm new to trying KGDB/KDB. My test machine doesn't have serial port.
I've been trying to run it over internet. I get following dmesg log:
KGDB: Registered I/O driver kgdboc

On test machine command line:
kgdboc=kbd
sudo sh -c "echo g > /proc/sysrq-trigger" # Launch KGDB

System freezes at this point meaning the debugger got activated
correctly. But I'm unable to connect from host side:
gdb vmlinux
set debug remote 1
target remote <test_machine_ip>:2012

I may be missing something trivial. Please can someone point/correct
me how to connect correctly?

PS: kgdboe [2] seems like a out of tree module for help. But it doesn't
seem to be supported anymore.

Is it possible to connect from another machine over internet and debug
the target?

[1] https://docs.kernel.org/dev-tools/kgdb.html
[2] https://github.com/sysprogs/kgdboe
--
BR,
Muhammad Usama Anjum