<?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>Chapter 3. Enable kgdb for debugging</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="index.html" title="Using kgdb and the kgdb Internals" /><link rel="prev" href="ch02.html" title="Chapter 2. Compiling a kernel" /><link rel="next" href="ch03s02.html" title="Kernel parameter: kgdb8250" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Enable kgdb for debugging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="EnableKGDB"></a>Chapter 3. Enable kgdb for debugging</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ch03.html#kgdbwait">Kernel parameter: kgdbwait</a></span></dt><dt><span class="sect1"><a href="ch03s02.html">Kernel parameter: kgdb8250</a></span></dt><dt><span class="sect1"><a href="ch03s03.html">Kernel parameter: kgdboc</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#UsingKgdboc">Using kgdboc</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">Kernel parameter: kgdboe</a></span></dt><dt><span class="sect1"><a href="ch03s05.html">Kernel parameter: kgdbcon</a></span></dt></dl></div><p>
   In order to use kgdb you must activate it by passing configuration
   information to one of the kgdb I/O drivers.  If you do not pass any
   configuration information kgdb will not do anything at all.  Kgdb
   will only actively hook up to the kernel trap hooks if a kgdb I/O
   driver is loaded and configured.  If you unconfigure a kgdb I/O
   driver, kgdb will unregister all the kernel hook points.
   </p><p>
   All drivers can be reconfigured at run time, if
   <span class="symbol">CONFIG_SYSFS</span> and <span class="symbol">CONFIG_MODULES</span>
   are enabled, by echo'ing a new config string to
   <code class="constant">/sys/module/&lt;driver&gt;/parameter/&lt;option&gt;</code>.
   The driver can be unconfigured by passing an empty string.  You cannot
   change the configuration while the debugger is attached.  Make sure
   to detach the debugger with the <code class="constant">detach</code> command
   prior to trying unconfigure a kgdb I/O driver.
   </p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="kgdbwait"></a>Kernel parameter: kgdbwait</h2></div></div></div><p>
   The Kernel command line option <code class="constant">kgdbwait</code> makes
   kgdb wait for a debugger connection during booting of a kernel.  You
   can only use this option you compiled a kgdb I/O driver into the
   kernel and you specified the I/O driver configuration as a kernel
   command line option.  The kgdbwait parameter should always follow the
   configuration parameter for the kgdb I/O driver in the kernel
   command line else the I/O driver will not be configured prior to
   asking the kernel to use it to wait.
   </p><p>
   The kernel will stop and wait as early as the I/O driver and
   architecture will allow when you use this option.  If you build the
   kgdb I/O driver as a kernel module kgdbwait will not do anything.
   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Compiling a kernel </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Kernel parameter: kgdb8250</td></tr></table></div></body></html>
