This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== GDB remote debugging ====== ===== Overview ===== You can use the [[http://www.gnu.org/software/gdb/|GNU Project Debugger (GDB)]] to debug gPXE. In order to do this, you must either have two computers or run gPXE under virtualization (e.g. [[http://bellard.org/qemu/|QEMU]]). When using two computers, one computer will run gPXE while the other will run GDB. GDB communicates with gPXE over the serial port. You will need a null modem serial cable to connect the two computers. ===== Building with GDB enabled ===== Create the following file in ''src/config-local.h'': <code> /* @BEGIN general.h * * Local config.h changes that do not get committed to git. * */ #define GDBSTUB /* Remote GDB debugging */ /* @END general.h */ </code> This file overrides ''src/config.h'' but is not under version control. That means you will never accidentally commit a patch that enables ''GDBSTUB''. Now build gPXE: <code> $ cd src $ make </code> You also need to build an ELF file that GDB can load symbols from: <code> $ make bin/gpxe.hd.tmp </code> Once ''bin/gpxe.hd.tmp'' exists, the ''make'' command will update it and you do not need to use ''make bin/gpxe.hd.tmp'' again. ===== Using GDB remote debugging ===== ===== GDB documentation ===== * [[http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html|Debugging with GDB (official manual)]] * [[http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf|A cheatsheet]], note that there are several others [[http://google.com/search?q=gdb+cheat+sheet|available]]. ===== Getting help ===== You can email the [[https://lists.sourceforge.net/lists/listinfo/etherboot-developers|Etherboot-Developers]] list or ask on the [[http://www.etherboot.org/wiki/contact|IRC channel]].


QR Code
QR Code dev:gdbstub (generated for current page)