KGDBoE - Debug Linux Kernel via Network

Welcome to the new home of KGDBoE - a tool that allows debugging the Linux kernel using the network connection. It is useful on modern PCs that don't have a serial port or a JTAG connector and it's much faster than using a COM port.

The new KGDBoE is inspired by the original kgdboe patches by Jason Wessel, but goes well beyond the capabilities of the original tool. The key features are:

  • Works with stock kernels without rebuilding them. Tested on Linux Kernel 3.8.0-4.13.0.
  • Easy configuration. No need to specify the IP or MAC addresses.
  • Supports modern multi-core systems.

Read more about it in our press-release.

Download

Feedback

We need your feedback! We have tested kgdboe on some network adapters, but we want to hear from you how reliably it works on other hardware. Tell us about your experiences with kgdboe and we will update the table below:

Network ard driver Platform Kernel version Result
pcnet32 x86 (VMware) 3.8, 3.15 stable
r8169 x86 3.11 stable
e1000 x64 (VMware) 3.9.5, 4.13.0 stable
i.MX6 Ethernet (requires modifying kernel configuration) Wandboard 3.10.53 stable

Tips and tricks

KGDBoE uses some of the network stack code to communicate to your gdb. Setting breakpoints in the code that is used by it would deadlock your debugging session. Follow the tips below to avoid it:

  • Don't set breakpoints in the network code
  • Don't set breakpoints in mod_timer() unless you're using the single-CPU mode
  • Use the single-CPU mode unless you absolutely need SMP. Although KGDBoE includes workarounds for multi-CPU mode, they are based on making assumptions about the network driver internals and can be safely avoided by disabling all CPUs except #0 during debugging.

License

The source code is available under the GPL license.