I built the module and loaded it successfully.
# insmod kgdboe.ko device_name=enp2s0f0
# dmesg | tail
...
[ 127.055363] kgdb: Registered I/O driver kgdboe.
[ 127.055450] kgdboe: Successfully initialized. Use the following gdb command to attach:
[ 127.055454] target remote udp:10.5.221.4:31337
However, when trying to connect with gdb I'm getting packet errors and debug session does not start:
(gdb) target remote udp:10.5.221.4:31337
warning: The remote protocol may be unreliable over UDP.
Some events may be lost, rendering further debugging impossible.
Remote debugging using udp:10.5.221.4:31337
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
warning: Invalid remote reply: timeout
OS and NIC details:
Linux lb-tlvb-emu6 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# lshw -class network
*-network:0
description: Ethernet interface
product: I350 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0f0
version: 01
serial: 00:1e:67:9b:10:c2
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.4.0-k duplex=full firmware=1.48, 0x80000707 ip=10.5.221.4 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:33 memory:d1160000-d117ffff ioport:2060(size=32) memory:d11b0000-d11b3fff memory:d12a0000-d12bffff memory:d1280000-d129ffff
I built the module and loaded it successfully.
However, when trying to connect with gdb I'm getting packet errors and debug session does not start:
OS and NIC details: