gdbstub <transport> [<options>...]
gdbstub udp net1
Start remote debugging via the specified transport. Supported transports are:
serial- attach via a serial port
udp- attach via an (Ethernet) network interface using UDP
You can attach a debugger using the
target remote command within gdb. For example, if you are debugging a build of
ipxe.iso (which is built from
ipxe.lkrn) via the serial port
ttyS0, then you would use:
gdb bin/ipxe.lkrn.tmp (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS0
If you are debugging via UDP to interface
net1, which is configured with the IP address 192.168.0.100, then you would use:
gdb bin/ipxe.lkrn.tmp (gdb) target remote udp:192.168.0.100:43770
See the gdb documentation for further information on debugging.
You cannot have the iPXE serial console enabled at the same time as using the debugger via the serial port.
You cannot use the debugger to step through real-mode portions of iPXE such as calls to the BIOS.
You cannot use the debugger to step through the portions of iPXE that relate to communication with the debugger itself. For example, if you are debugging via UDP on network interface
net1, you cannot step through the iPXE driver that is driving
net1. If you are trying to debug an iPXE network driver, you should either use the serial port, or use a second network card that uses a different network driver.