1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Kernel config options for kdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.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 bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="CompileKDB"></a>Kernel config options for kdb</h2></div></div></div><p>Kdb is quite a bit more complex than the simple gdbstub 2 sitting on top of the kernel's debug core. Kdb must implement a 3 shell, and also adds some helper functions in other parts of the 4 kernel, responsible for printing out interesting data such as what 5 you would see if you ran "lsmod", or "ps". In order to build kdb 6 into the kernel you follow the same steps as you would for kgdb. 7 </p><p>The main config option for kdb 8 is <span class="symbol">CONFIG_KGDB_KDB</span> which is called "KGDB_KDB: 9 include kdb frontend for kgdb" in the config menu. In theory you 10 would have already also selected an I/O driver such as the 11 CONFIG_KGDB_SERIAL_CONSOLE interface if you plan on using kdb on a 12 serial port, when you were configuring kgdb. 13 </p><p>If you want to use a PS/2-style keyboard with kdb, you would 14 select CONFIG_KDB_KEYBOARD which is called "KGDB_KDB: keyboard as 15 input device" in the config menu. The CONFIG_KDB_KEYBOARD option 16 is not used for anything in the gdb interface to kgdb. The 17 CONFIG_KDB_KEYBOARD option only works with kdb. 18 </p><p>Here is an example set of .config symbols to enable/disable kdb: 19 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-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> 20 </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> 21