Start remote debugging

Synopsis

  gdbstub <transport> [<options>...]

Examples

Start remote debugging via serial port

  gdbstub serial

Start remote debugging via net1

  gdbstub udp net1

Description

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.

See also

Build options

This command is available only when the build options GDBSERIAL or GDBUDP are enabled.

Notes

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.

 
cmd/gdbstub.txt · Last modified: 2012/03/21 22:15 by mcb30
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL http://ipxe.org
References to "iPXE" may not be altered or removed.