[GDB] Remote debugging over UDP

This commit implements GDB over UDP.  Using UDP is more complex than
serial and has required some restructuring.

The GDB stub is now built using one or both of GDBSERIAL and GDBUDP
config.h options.

To enter the debugger, execute the gPXE shell command:
gdbstub <transport> [<options>...]

Where <transport> is "serial" or "udp".  For "udp", the name of a
configured network device is required:
gdbstub udp net0

The GDB stub listens on UDP port 43770 by default.
This commit is contained in:
Stefan Hajnoczi
2008-06-11 12:12:46 +01:00
committed by Michael Brown
parent 9ec3ff95f0
commit 6e670b5f38
8 changed files with 501 additions and 50 deletions

View File

@@ -3,16 +3,16 @@
# Run:
# make bin/gpxe.hd.tmp
# make
# tests/gdbstub_test.gdb
# gdb
# (gdb) target remote :TCPPORT
# OR
# (gdb) target remote udp:IP:UDPPORT
# (gdb) source tests/gdbstub_test.gdb
define gpxe_load_symbols
file bin/gpxe.hd.tmp
end
define gpxe_connect
target remote localhost:4444
end
define gpxe_assert
if $arg0 != $arg1
echo FAIL $arg2\n
@@ -78,7 +78,6 @@ define gpxe_test_step
end
gpxe_load_symbols
gpxe_connect
gpxe_start_tests
gpxe_test_regs_read
gpxe_test_regs_write