<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Kernel parameter: kgdboe</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /><link rel="start" href="index.html" title="Using kgdb and the kgdb Internals" /><link rel="up" href="ch03.html" title="Chapter 3. Enable kgdb for debugging" /><link rel="prev" href="ch03s03.html" title="Kernel parameter: kgdboc" /><link rel="next" href="ch03s05.html" title="Kernel parameter: kgdbcon" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kernel parameter: kgdboe</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Enable kgdb for debugging</th><td width="20%" align="right"> <a accesskey="n" href="ch03s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="kgdboe"></a>Kernel parameter: kgdboe</h2></div></div></div><p>
  The term kgdboe is meant to stand for kgdb over ethernet.  To use
  kgdboe, the ethernet driver must have implemented the NETPOLL API,
  and the kernel must be compiled with NETPOLL support.  Also kgdboe
  uses unicast udp.  This means your debug host needs to be on the
  same lan as the target system you wish to debug.
  </p><p>
  NOTE: Even though an ethernet driver may implement the NETPOLL API
  it is possible that kgdboe will not work as a robust debug method.
  Trying to debug the network stack for instance, would likely hang
  the kernel.  Also certain IRQ resources cannot be easily shared
  between the normal kernel operation and the "polled context" where
  the system is stopped by kgdb.  Using kgdboe with preemptible IRQ
  handlers for the device kgdboe is using is known to have with the
  system hanging for instance.
  </p><p>
  The kgdboe parameter string is as follows:
  <code class="constant">kgdboe=[src-port]@&lt;src-ip&gt;/[dev],[tgt-port]@&lt;tgt-ip&gt;/[tgt-macaddr]</code>
  where:
  </p><div class="itemizedlist"><ul type="disc"><li><p>src-port (optional): source for UDP packets (defaults to <code class="constant">6443</code>)</p></li><li><p>src-ip (optional unless from boot): source IP to use (interface address)</p></li><li><p>dev (optional): network interface (<code class="constant">eth0</code>)</p></li><li><p>tgt-port (optional): port GDB will use (defaults to <code class="constant">6442</code>)</p></li><li><p>tgt-ip: IP address GDB will be connecting from</p></li><li><p>tgt-macaddr (optional): ethernet MAC address for logging agent (default is broadcast)</p></li></ul></div><p>
  </p><p>
  What follows are several examples of how to configure kgdboe in various ways.
  </p><div class="itemizedlist"><ul type="disc"><li><p>From boot with target ip = 10.0.2.15 and debug host ip = 10.0.2.2</p><p><code class="constant">kgdboe=@10.0.2.15/,@10.0.2.2/</code></p></li><li><p>From boot using eth1, with target ip = 10.0.2.15 and debug host ip = 10.0.2.2</p><p><code class="constant">kgdboe=@10.0.2.15/eth1,@10.0.2.2/</code></p></li><li><p>As a module, with target ip = 10.0.2.15 and debug host ip = 10.0.2.2. NOTE: The src ip is only required when booting with kgdboe enabled</p><p><code class="constant">kgdboe=@/,@10.0.2.2/</code></p></li></ul></div><p>
  </p><p>
  You can also reconfigure kgdboe dynamically at run time as follows:
  </p><div class="itemizedlist"><ul type="disc"><li><p><code class="constant">echo "@/,@10.0.2.2/" &gt; /sys/module/kgdboe/paramters/kgdboe</code></p></li></ul></div><p>
  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Kernel parameter: kgdboc </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Kernel parameter: kgdbcon</td></tr></table></div></body></html>
