<?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 config options for kdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1" /><link rel="home" href="index.html" title="Using kgdb, kdb and the kernel debugger internals" /><link rel="up" href="CompilingAKernel.html" title="Chapter 2. Compiling a kernel" /><link rel="prev" href="CompilingAKernel.html" title="Chapter 2. Compiling a kernel" /><link rel="next" href="kgdbKernelArgs.html" title="Chapter 3. Kernel Debugger Boot Arguments" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kernel config options for kdb</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CompilingAKernel.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Compiling a kernel</th><td width="20%" align="right"> <a accesskey="n" href="kgdbKernelArgs.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="Kernel config options for kdb"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="CompileKDB"></a>Kernel config options for kdb</h2></div></div></div><p>Kdb is quite a bit more complex than the simple gdbstub
    sitting on top of the kernel's debug core.  Kdb must implement a
    shell, and also adds some helper functions in other parts of the
    kernel, responsible for printing out interesting data such as what
    you would see if you ran "lsmod", or "ps".  In order to build kdb
    into the kernel you follow the same steps as you would for kgdb.
    </p><p>The main config option for kdb
    is <span class="symbol">CONFIG_KGDB_KDB</span> which is called "KGDB_KDB:
    include kdb frontend for kgdb" in the config menu.  In theory you
    would have already also selected an I/O driver such as the
    CONFIG_KGDB_SERIAL_CONSOLE interface if you plan on using kdb on a
    serial port, when you were configuring kgdb.
    </p><p>If you want to use a PS/2-style keyboard with kdb, you would
    select CONFIG_KDB_KEYBOARD which is called "KGDB_KDB: keyboard as
    input device" in the config menu.  The CONFIG_KDB_KEYBOARD option
    is not used for anything in the gdb interface to kgdb.  The
    CONFIG_KDB_KEYBOARD option only works with kdb.
    </p><p>Here is an example set of .config symbols to enable/disable kdb:
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p># CONFIG_DEBUG_RODATA is not set</p></li><li class="listitem"><p>CONFIG_FRAME_POINTER=y</p></li><li class="listitem"><p>CONFIG_KGDB=y</p></li><li class="listitem"><p>CONFIG_KGDB_SERIAL_CONSOLE=y</p></li><li class="listitem"><p>CONFIG_KGDB_KDB=y</p></li><li class="listitem"><p>CONFIG_KDB_KEYBOARD=y</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="CompilingAKernel.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="CompilingAKernel.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="kgdbKernelArgs.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"> Chapter 3. Kernel Debugger Boot Arguments</td></tr></table></div></body></html>
