**This is an old revision of the document!** ----

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

====== Stefan Hajnoczi: GDB Remote Debugging ====== ===== Project Plan ===== ==== Summary ==== This project will enable gPXE debugging using the GDB remote target feature. Developers will be able to inspect gPXE from a remote machine and control its execution. Due to the low-level nature of gPXE and the environment it executes in, there is little support for debugging and crash analysis. This can make understanding and fixing errors frustrating. The GNU Debugger (GDB) can debug remotely using a simple protocol. The code that implements this protocol on the target is called a GDB stub. Using remote debugging, developers will be able to get much better access to gPXE while it is running or when it has crashed. It will be easier to diagnose crashes and to understand error conditions. ==== Outline ==== Only 32-bit protected mode support is planned. The bulk of gPXE runs in 32-bit protected mode and gdb/binutils support this mode well. Several transports are supported by GDB including serial, UDP, and TCP. Serial is simple and serves as a good starting point. UDP and TCP are more flexible but also more complex. After discussion with mcb30, it looks like UDP is in scope and should be implemented. I believe TCP is not a big win if UDP support is already in place. The GDB stub will support memory and register read/write. This includes support for breakpoint debugging. ==== Milestones and Timeline ==== * Set up IDT and write interrupt handler. * Decide on interface for GDB transports and refactor serial console code to support serving as a GDB transport. * Implement GDB protocol encoder and decoder. * Implement memory read/write, including GDB scripts as tests. * Implement register read/write, including GDB scripts as tests. * Implement continue and single-step, including GDB scripts as tests. * Ensure that breakpoints are working, including GDB scripts as tests. * Implement miscellaneous GDB protocol commands like detach/kill, including GDB scripts as tests. * Implement UDP transport. * Documentation (how to debug, how to run tests). * (Possibly) implement TCP transport and support TCP listen sockets. * (Possibly) support running as a gPXE process for memory peek/poke during execution. ==== Reference links ==== * [[http://code.google.com/soc/2008/etherboot/appinfo.html?csaid=13D4DE0EB18B0081|Google Summer of Code Application Information]] * [[http://sourceware.org/gdb/current/onlinedocs/gdb_18.html#SEC174|Debugging with GDB: Implementing a Remote Stub]] * [[http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/i386-stub.c?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=src|GDB's i386-stub.c]]


QR Code
QR Code soc:2008:stefanha:project_plan:start (generated for current page)