sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/process/debugging/kgdbmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/process/debugging/kgdbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/process/debugging/kgdbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/process/debugging/kgdbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/process/debugging/kgdbmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/process/debugging/kgdbmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h1Using kgdb, kdb and the kernel debugger internalsh]h1Using kgdb, kdb and the kernel debugger internals}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/process/debugging/kgdb.rsthKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h Jason Wessel h]h paragraph)}(h Jason Wesselh]h Jason Wessel}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hThe kernel has two different debugger front ends (kdb and kgdb) which interface to the debug core. It is possible to use either of the debugger front ends and dynamically transition between them if you configure the kernel properly at compile and runtime.h]hThe kernel has two different debugger front ends (kdb and kgdb) which interface to the debug core. It is possible to use either of the debugger front ends and dynamically transition between them if you configure the kernel properly at compile and runtime.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hX8Kdb is simplistic shell-style interface which you can use on a system console with a keyboard or serial console. You can use it to inspect memory, registers, process lists, dmesg, and even set breakpoints to stop in a certain location. Kdb is not a source level debugger, although you can set breakpoints and execute some basic kernel run control. Kdb is mainly aimed at doing some analysis to aid in development or diagnosing kernel problems. You can access some symbols by name in kernel built-ins or in kernel modules if the code was built with ``CONFIG_KALLSYMS``.h](hX$Kdb is simplistic shell-style interface which you can use on a system console with a keyboard or serial console. You can use it to inspect memory, registers, process lists, dmesg, and even set breakpoints to stop in a certain location. Kdb is not a source level debugger, although you can set breakpoints and execute some basic kernel run control. Kdb is mainly aimed at doing some analysis to aid in development or diagnosing kernel problems. You can access some symbols by name in kernel built-ins or in kernel modules if the code was built with }(hjhhhNhNubhliteral)}(h``CONFIG_KALLSYMS``h]hCONFIG_KALLSYMS}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXKgdb is intended to be used as a source level debugger for the Linux kernel. It is used along with gdb to debug a Linux kernel. The expectation is that gdb can be used to "break in" to the kernel to inspect memory, variables and look through call stack information similar to the way an application developer would use gdb to debug an application. It is possible to place breakpoints in kernel code and perform some limited execution stepping.h]hXKgdb is intended to be used as a source level debugger for the Linux kernel. It is used along with gdb to debug a Linux kernel. The expectation is that gdb can be used to “break in” to the kernel to inspect memory, variables and look through call stack information similar to the way an application developer would use gdb to debug an application. It is possible to place breakpoints in kernel code and perform some limited execution stepping.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXNTwo machines are required for using kgdb. One of these machines is a development machine and the other is the target machine. The kernel to be debugged runs on the target machine. The development machine runs an instance of gdb against the vmlinux file which contains the symbols (not a boot image such as bzImage, zImage, uImage...). In gdb the developer specifies the connection parameters and connects to kgdb. The type of connection a developer makes with gdb depends on the availability of kgdb I/O modules compiled as built-ins or loadable kernel modules in the test machine's kernel.h]hXPTwo machines are required for using kgdb. One of these machines is a development machine and the other is the target machine. The kernel to be debugged runs on the target machine. The development machine runs an instance of gdb against the vmlinux file which contains the symbols (not a boot image such as bzImage, zImage, uImage...). In gdb the developer specifies the connection parameters and connects to kgdb. The type of connection a developer makes with gdb depends on the availability of kgdb I/O modules compiled as built-ins or loadable kernel modules in the test machine’s kernel.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCompiling a kernelh]hCompiling a kernel}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hhhhhK,ubh bullet_list)}(hhh](h list_item)}(hCIn order to enable compilation of kdb, you must first enable kgdb. h]h)}(hBIn order to enable compilation of kdb, you must first enable kgdb.h]hBIn order to enable compilation of kdb, you must first enable kgdb.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjvubah}(h]h ]h"]h$]h&]uh1jthjqhhhhhNubju)}(hLThe kgdb test compile options are described in the kgdb test suite chapter. h]h)}(hKThe kgdb test compile options are described in the kgdb test suite chapter.h]hKThe kgdb test compile options are described in the kgdb test suite chapter.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jthjqhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1johhhK.hj^hhubh)}(hhh](h)}(hKernel config options for kgdbh]hKernel config options for kgdb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK4ubh)}(hTo enable ``CONFIG_KGDB`` you should look under :menuselection:`Kernel hacking --> Kernel debugging` and select :menuselection:`KGDB: kernel debugger`.h](h To enable }(hjhhhNhNubj!)}(h``CONFIG_KGDB``h]h CONFIG_KGDB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh you should look under }(hjhhhNhNubhinline)}(h#Kernel hacking ‣ Kernel debuggingh]h#Kernel hacking ‣ Kernel debugging}(hjhhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext4:menuselection:`Kernel hacking --> Kernel debugging`uh1jhjubh and select }(hjhhhNhNubj)}(hKGDB: kernel debuggerh]hKGDB: kernel debugger}(hjhhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext&:menuselection:`KGDB: kernel debugger`uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubh)}(hXWhile it is not a hard requirement that you have symbols in your vmlinux file, gdb tends not to be very useful without the symbolic data, so you will want to turn on ``CONFIG_DEBUG_INFO`` which is called :menuselection:`Compile the kernel with debug info` in the config menu.h](hWhile it is not a hard requirement that you have symbols in your vmlinux file, gdb tends not to be very useful without the symbolic data, so you will want to turn on }(hj hhhNhNubj!)}(h``CONFIG_DEBUG_INFO``h]hCONFIG_DEBUG_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh which is called }(hj hhhNhNubj)}(h"Compile the kernel with debug infoh]h"Compile the kernel with debug info}(hj%hhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext3:menuselection:`Compile the kernel with debug info`uh1jhj ubh in the config menu.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hXIt is advised, but not required, that you turn on the ``CONFIG_FRAME_POINTER`` kernel option which is called :menuselection:`Compile the kernel with frame pointers` in the config menu. This option inserts code into the compiled executable which saves the frame information in registers or on the stack at different points which allows a debugger such as gdb to more accurately construct stack back traces while debugging the kernel.h](h6It is advised, but not required, that you turn on the }(hj@hhhNhNubj!)}(h``CONFIG_FRAME_POINTER``h]hCONFIG_FRAME_POINTER}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj@ubh kernel option which is called }(hj@hhhNhNubj)}(h&Compile the kernel with frame pointersh]h&Compile the kernel with frame pointers}(hjZhhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext7:menuselection:`Compile the kernel with frame pointers`uh1jhj@ubhX  in the config menu. This option inserts code into the compiled executable which saves the frame information in registers or on the stack at different points which allows a debugger such as gdb to more accurately construct stack back traces while debugging the kernel.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK?hjhhubh)}(hXIf the architecture that you are using supports the kernel option ``CONFIG_STRICT_KERNEL_RWX``, you should consider turning it off. This option will prevent the use of software breakpoints because it marks certain regions of the kernel's memory space as read-only. If kgdb supports it for the architecture you are using, you can use hardware breakpoints if you desire to run with the ``CONFIG_STRICT_KERNEL_RWX`` option turned on, else you need to turn off this option.h](hBIf the architecture that you are using supports the kernel option }(hjuhhhNhNubj!)}(h``CONFIG_STRICT_KERNEL_RWX``h]hCONFIG_STRICT_KERNEL_RWX}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjuubhX$, you should consider turning it off. This option will prevent the use of software breakpoints because it marks certain regions of the kernel’s memory space as read-only. If kgdb supports it for the architecture you are using, you can use hardware breakpoints if you desire to run with the }(hjuhhhNhNubj!)}(h``CONFIG_STRICT_KERNEL_RWX``h]hCONFIG_STRICT_KERNEL_RWX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjuubh9 option turned on, else you need to turn off this option.}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubh)}(hXNext you should choose one or more I/O drivers to interconnect the debugging host and debugged target. Early boot debugging requires a KGDB I/O driver that supports early debugging and the driver must be built into the kernel directly. Kgdb I/O driver configuration takes place via kernel or module parameters which you can learn more about in the section that describes the parameter kgdboc.h]hXNext you should choose one or more I/O drivers to interconnect the debugging host and debugged target. Early boot debugging requires a KGDB I/O driver that supports early debugging and the driver must be built into the kernel directly. Kgdb I/O driver configuration takes place via kernel or module parameters which you can learn more about in the section that describes the parameter kgdboc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjhhubh)}(hMHere is an example set of ``.config`` symbols to enable or disable for kgdb::h](hHere is an example set of }(hjhhhNhNubj!)}(h ``.config``h]h.config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh' symbols to enable or disable for kgdb:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKUhjhhubh literal_block)}(hg# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=yh]hg# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKWhjhhubeh}(h]kernel-config-options-for-kgdbah ]h"]kernel config options for kgdbah$]h&]uh1hhj^hhhhhK4ubh)}(hhh](h)}(hKernel config options for kdbh]hKernel config options for kdb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK]ubh)}(hXKdb 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.h](hXKdb 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 }(hjhhhNhNubj!)}(h ``lsmod``h]hlsmod}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh, or }(hjhhhNhNubj!)}(h``ps``h]hps}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhX. In order to build kdb into the kernel you follow the same steps as you would for kgdb.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hjhhubh)}(hXOThe main config option for kdb is ``CONFIG_KGDB_KDB`` which is called :menuselection:`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.h](h"The main config option for kdb is }(hj2hhhNhNubj!)}(h``CONFIG_KGDB_KDB``h]hCONFIG_KGDB_KDB}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2ubh which is called }(hj2hhhNhNubj)}(h'KGDB_KDB: include kdb frontend for kgdbh]h'KGDB_KDB: include kdb frontend for kgdb}(hjLhhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext8:menuselection:`KGDB_KDB: include kdb frontend for kgdb`uh1jhj2ubh^ in the config menu. In theory you would have already also selected an I/O driver such as the }(hj2hhhNhNubj!)}(h``CONFIG_KGDB_SERIAL_CONSOLE``h]hCONFIG_KGDB_SERIAL_CONSOLE}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2ubhU interface if you plan on using kdb on a serial port, when you were configuring kgdb.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhjhhubh)}(hXEIf you want to use a PS/2-style keyboard with kdb, you would select ``CONFIG_KDB_KEYBOARD`` which is called :menuselection:`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.h](hDIf you want to use a PS/2-style keyboard with kdb, you would select }(hjyhhhNhNubj!)}(h``CONFIG_KDB_KEYBOARD``h]hCONFIG_KDB_KEYBOARD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjyubh which is called }(hjyhhhNhNubj)}(h"KGDB_KDB: keyboard as input deviceh]h"KGDB_KDB: keyboard as input device}(hjhhhNhNubah}(h]h ] menuselectionah"]h$]h&]rawtext3:menuselection:`KGDB_KDB: keyboard as input device`uh1jhjyubh in the config menu. The }(hjyhhhNhNubj!)}(h``CONFIG_KDB_KEYBOARD``h]hCONFIG_KDB_KEYBOARD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjyubhC option is not used for anything in the gdb interface to kgdb. The }(hjyhhhNhNubj!)}(h``CONFIG_KDB_KEYBOARD``h]hCONFIG_KDB_KEYBOARD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjyubh option only works with kdb.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhjhhubh)}(hEHere is an example set of ``.config`` symbols to enable/disable kdb::h](hHere is an example set of }(hjhhhNhNubj!)}(h ``.config``h]h.config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh symbols to enable/disable kdb:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjhhubj)}(h# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=yh]h# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKthjhhubeh}(h]kernel-config-options-for-kdbah ]h"]kernel config options for kdbah$]h&]uh1hhj^hhhhhK]ubeh}(h]compiling-a-kernelah ]h"]compiling a kernelah$]h&]uh1hhhhhhhhK,ubh)}(hhh](h)}(hKernel Debugger Boot Argumentsh]hKernel Debugger Boot Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK|ubh)}(hThis section describes the various runtime kernel parameters that affect the configuration of the kernel debugger. The following chapter covers using kdb and kgdb as well as providing some examples of the configuration parameters.h]hThis section describes the various runtime kernel parameters that affect the configuration of the kernel debugger. The following chapter covers using kdb and kgdb as well as providing some examples of the configuration parameters.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjhhubh)}(hhh](h)}(hKernel parameter: kgdboch]hKernel parameter: kgdboc}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKubh)}(hThe kgdboc driver was originally an abbreviation meant to stand for "kgdb over console". Today it is the primary mechanism to configure how to communicate from gdb to kgdb as well as the devices you want to use to interact with the kdb shell.h]hThe kgdboc driver was originally an abbreviation meant to stand for “kgdb over console”. Today it is the primary mechanism to configure how to communicate from gdb to kgdb as well as the devices you want to use to interact with the kdb shell.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hXFor kgdb/gdb, kgdboc is designed to work with a single serial port. It is intended to cover the circumstance where you want to use a serial console as your primary console as well as using it to perform kernel debugging. It is also possible to use kgdb on a serial port which is not designated as a system console. Kgdboc may be configured as a kernel built-in or a kernel loadable module. You can only make use of ``kgdbwait`` and early debugging if you build kgdboc into the kernel as a built-in.h](hXFor kgdb/gdb, kgdboc is designed to work with a single serial port. It is intended to cover the circumstance where you want to use a serial console as your primary console as well as using it to perform kernel debugging. It is also possible to use kgdb on a serial port which is not designated as a system console. Kgdboc may be configured as a kernel built-in or a kernel loadable module. You can only make use of }(hjNhhhNhNubj!)}(h ``kgdbwait``h]hkgdbwait}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubhG and early debugging if you build kgdboc into the kernel as a built-in.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hXOptionally you can elect to activate kms (Kernel Mode Setting) integration. When you use kms with kgdboc and you have a video driver that has atomic mode setting hooks, it is possible to enter the debugger on the graphics console. When the kernel execution is resumed, the previous graphics mode will be restored. This integration can serve as a useful tool to aid in diagnosing crashes or doing analysis of memory with kdb while allowing the full graphics console applications to run.h]hXOptionally you can elect to activate kms (Kernel Mode Setting) integration. When you use kms with kgdboc and you have a video driver that has atomic mode setting hooks, it is possible to enter the debugger on the graphics console. When the kernel execution is resumed, the previous graphics mode will be restored. This integration can serve as a useful tool to aid in diagnosing crashes or doing analysis of memory with kdb while allowing the full graphics console applications to run.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hhh](h)}(hkgdboc argumentsh]hkgdboc arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhKubh)}(hUsage::h]hUsage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubj)}(h-kgdboc=[kms][[,]kbd][[,]serial_device][,baud]h]h-kgdboc=[kms][[,]kbd][[,]serial_device][,baud]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj|hhubh)}(h_The order listed above must be observed if you use any of the optional configurations together.h]h_The order listed above must be observed if you use any of the optional configurations together.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubh)}(hAbbreviations:h]hAbbreviations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubjp)}(hhh](ju)}(hkms = Kernel Mode Setting h]h)}(hkms = Kernel Mode Settingh]hkms = Kernel Mode Setting}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(hkbd = Keyboard h]h)}(hkbd = Keyboardh]hkbd = Keyboard}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jthjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1johhhKhj|hhubh)}(hX2You can configure kgdboc to use the keyboard, and/or a serial device depending on if you are using kdb and/or kgdb, in one of the following scenarios. The order listed above must be observed if you use any of the optional configurations together. Using kms + only gdb is generally not a useful combination.h]hX2You can configure kgdboc to use the keyboard, and/or a serial device depending on if you are using kdb and/or kgdb, in one of the following scenarios. The order listed above must be observed if you use any of the optional configurations together. Using kms + only gdb is generally not a useful combination.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubh)}(hhh](h)}(h!Using loadable module or built-inh]h!Using loadable module or built-in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubhenumerated_list)}(hhh](ju)}(hWAs a kernel built-in: Use the kernel boot argument:: kgdboc=,[baud] h](h)}(hAs a kernel built-in:h]hAs a kernel built-in:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"ubh)}(hUse the kernel boot argument::h]hUse the kernel boot argument:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"ubj)}(hkgdboc=,[baud]h]hkgdboc=,[baud]}hjBsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj"ubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(hXfAs a kernel loadable module: Use the command:: modprobe kgdboc kgdboc=,[baud] Here are two examples of how you might format the kgdboc string. The first is for an x86 target using the first serial port. The second example is for the ARM Versatile AB using the second serial port. 1. ``kgdboc=ttyS0,115200`` 2. ``kgdboc=ttyAMA1,115200`` h](h)}(hAs a kernel loadable module:h]hAs a kernel loadable module:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjVubh)}(hUse the command::h]hUse the command:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjVubj)}(h*modprobe kgdboc kgdboc=,[baud]h]h*modprobe kgdboc kgdboc=,[baud]}hjvsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjVubh)}(hHere are two examples of how you might format the kgdboc string. The first is for an x86 target using the first serial port. The second example is for the ARM Versatile AB using the second serial port.h]hHere are two examples of how you might format the kgdboc string. The first is for an x86 target using the first serial port. The second example is for the ARM Versatile AB using the second serial port.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjVubj)}(hhh](ju)}(h``kgdboc=ttyS0,115200`` h]h)}(h``kgdboc=ttyS0,115200``h]j!)}(hjh]hkgdboc=ttyS0,115200}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jthjubju)}(h``kgdboc=ttyAMA1,115200`` h]h)}(h``kgdboc=ttyAMA1,115200``h]j!)}(hjh]hkgdboc=ttyAMA1,115200}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jthjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jthjhhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj hhhhhKubeh}(h]!using-loadable-module-or-built-inah ]h"]!using loadable module or built-inah$]h&]uh1hhj|hhhhhKubh)}(hhh](h)}(h&Configure kgdboc at runtime with sysfsh]h&Configure kgdboc at runtime with sysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(heAt run time you can enable or disable kgdboc by writing parameters into sysfs. Here are two examples:h]heAt run time you can enable or disable kgdboc by writing parameters into sysfs. Here are two examples:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](ju)}(hQEnable kgdboc on ttyS0:: echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc h](h)}(hEnable kgdboc on ttyS0::h]hEnable kgdboc on ttyS0:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboch]h1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc}hj*sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(hFDisable kgdboc:: echo "" > /sys/module/kgdboc/parameters/kgdboc h](h)}(hDisable kgdboc::h]hDisable kgdboc:}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubj)}(h.echo "" > /sys/module/kgdboc/parameters/kgdboch]h.echo "" > /sys/module/kgdboc/parameters/kgdboc}hjPsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj>ubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjhhhhhKubhnote)}(hrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.h]h)}(hrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.h]hrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1jjhjhhhhhNubeh}(h]&configure-kgdboc-at-runtime-with-sysfsah ]h"]&configure kgdboc at runtime with sysfsah$]h&]uh1hhj|hhhhhKubh)}(hhh](h)}(h More examplesh]h More examples}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hYou can configure kgdboc to use the keyboard, and/or a serial device depending on if you are using kdb and/or kgdb, in one of the following scenarios.h]hYou can configure kgdboc to use the keyboard, and/or a serial device depending on if you are using kdb and/or kgdb, in one of the following scenarios.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](ju)}(hpkdb and kgdb over only a serial port:: kgdboc=[,baud] Example:: kgdboc=ttyS0,115200 h](h)}(h&kdb and kgdb over only a serial port::h]h%kdb and kgdb over only a serial port:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hkgdboc=[,baud]h]hkgdboc=[,baud]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hkgdboc=ttyS0,115200h]hkgdboc=ttyS0,115200}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(hkdb and kgdb with keyboard and a serial port:: kgdboc=kbd,[,baud] Example:: kgdboc=kbd,ttyS0,115200 h](h)}(h.kdb and kgdb with keyboard and a serial port::h]h-kdb and kgdb with keyboard and a serial port:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h!kgdboc=kbd,[,baud]h]h!kgdboc=kbd,[,baud]}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hkgdboc=kbd,ttyS0,115200h]hkgdboc=kbd,ttyS0,115200}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(h'kdb with a keyboard:: kgdboc=kbd h](h)}(hkdb with a keyboard::h]hkdb with a keyboard:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2ubj)}(h kgdboc=kbdh]h kgdboc=kbd}hjDsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj2ubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(h4kdb with kernel mode setting:: kgdboc=kms,kbd h](h)}(hkdb with kernel mode setting::h]hkdb with kernel mode setting:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXubj)}(hkgdboc=kms,kbdh]hkgdboc=kms,kbd}hjjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjXubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubju)}(h]kdb with kernel mode setting and kgdb over a serial port:: kgdboc=kms,kbd,ttyS0,115200 h](h)}(h:kdb with kernel mode setting and kgdb over a serial port::h]h9kdb with kernel mode setting and kgdb over a serial port:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ubj)}(hkgdboc=kms,kbd,ttyS0,115200h]hkgdboc=kms,kbd,ttyS0,115200}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj~ubeh}(h]h ]h"]h$]h&]uh1jthjhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjhhhhhKubjk)}(hX]Kgdboc does not support interrupting the target via the gdb remote protocol. You must manually send a `SysRq-G` unless you have a proxy that splits console output to a terminal program. A console proxy has a separate TCP port for the debugger and a separate TCP port for the "human" console. The proxy can take care of sending the `SysRq-G` for you.h]h)}(hX]Kgdboc does not support interrupting the target via the gdb remote protocol. You must manually send a `SysRq-G` unless you have a proxy that splits console output to a terminal program. A console proxy has a separate TCP port for the debugger and a separate TCP port for the "human" console. The proxy can take care of sending the `SysRq-G` for you.h](hfKgdboc does not support interrupting the target via the gdb remote protocol. You must manually send a }(hjhhhNhNubhtitle_reference)}(h `SysRq-G`h]hSysRq-G}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh unless you have a proxy that splits console output to a terminal program. A console proxy has a separate TCP port for the debugger and a separate TCP port for the “human” console. The proxy can take care of sending the }(hjhhhNhNubj)}(h `SysRq-G`h]hSysRq-G}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for you.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jjhjhhhhhNubh)}(hXWhen using kgdboc with no debugger proxy, you can end up connecting the debugger at one of two entry points. If an exception occurs after you have loaded kgdboc, a message should print on the console stating it is waiting for the debugger. In this case you disconnect your terminal program and then connect the debugger in its place. If you want to interrupt the target system and forcibly enter a debug session you have to issue a `Sysrq` sequence and then type the letter `g`. Then you disconnect the terminal session and connect gdb. Your options if you don't like this are to hack gdb to send the `SysRq-G` for you as well as on the initial connect, or to use a debugger proxy that allows an unmodified gdb to do the debugging.h](hXWhen using kgdboc with no debugger proxy, you can end up connecting the debugger at one of two entry points. If an exception occurs after you have loaded kgdboc, a message should print on the console stating it is waiting for the debugger. In this case you disconnect your terminal program and then connect the debugger in its place. If you want to interrupt the target system and forcibly enter a debug session you have to issue a }(hjhhhNhNubj)}(h`Sysrq`h]hSysrq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh# sequence and then type the letter }(hjhhhNhNubj)}(h`g`h]hg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh~. Then you disconnect the terminal session and connect gdb. Your options if you don’t like this are to hack gdb to send the }(hjhhhNhNubj)}(h `SysRq-G`h]hSysRq-G}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhy for you as well as on the initial connect, or to use a debugger proxy that allows an unmodified gdb to do the debugging.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] more-examplesah ]h"] more examplesah$]h&]uh1hhj|hhhhhKubeh}(h]kgdboc-argumentsah ]h"]kgdboc argumentsah$]h&]uh1hhj/hhhhhKubeh}(h]kernel-parameter-kgdbocah ]h"]kernel parameter: kgdbocah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h%Kernel parameter: ``kgdboc_earlycon``h](hKernel parameter: }(hjGhhhNhNubj!)}(h``kgdboc_earlycon``h]hkgdboc_earlycon}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1hhjDhhhhhMubh)}(hXNIf you specify the kernel parameter ``kgdboc_earlycon`` and your serial driver registers a boot console that supports polling (doesn't need interrupts and implements a nonblocking read() function) kgdb will attempt to work using the boot console until it can transition to the regular tty driver specified by the ``kgdboc`` parameter.h](h$If you specify the kernel parameter }(hjchhhNhNubj!)}(h``kgdboc_earlycon``h]hkgdboc_earlycon}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjcubhX and your serial driver registers a boot console that supports polling (doesn’t need interrupts and implements a nonblocking read() function) kgdb will attempt to work using the boot console until it can transition to the regular tty driver specified by the }(hjchhhNhNubj!)}(h ``kgdboc``h]hkgdboc}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjcubh parameter.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubh)}(hX}Normally there is only one boot console (especially that implements the read() function) so just adding ``kgdboc_earlycon`` on its own is sufficient to make this work. If you have more than one boot console you can add the boot console's name to differentiate. Note that names that are registered through the boot console layer and the tty layer are not the same for the same port.h](hhNormally there is only one boot console (especially that implements the read() function) so just adding }(hjhhhNhNubj!)}(h``kgdboc_earlycon``h]hkgdboc_earlycon}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhX on its own is sufficient to make this work. If you have more than one boot console you can add the boot console’s name to differentiate. Note that names that are registered through the boot console layer and the tty layer are not the same for the same port.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubh)}(h8For instance, on one board to be explicit you might do::h]h7For instance, on one board to be explicit you might do:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjDhhubj)}(h(kgdboc_earlycon=qcom_geni kgdboc=ttyMSM0h]h(kgdboc_earlycon=qcom_geni kgdboc=ttyMSM0}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM&hjDhhubh)}(hLIf the only boot console on the device was "qcom_geni", you could simplify::h]hOIf the only boot console on the device was “qcom_geni”, you could simplify:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjDhhubj)}(hkgdboc_earlycon kgdboc=ttyMSM0h]hkgdboc_earlycon kgdboc=ttyMSM0}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM*hjDhhubeh}(h] kernel-parameter-kgdboc-earlyconah ]h"]!kernel parameter: kgdboc_earlyconah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hKernel parameter: ``kgdbwait``h](hKernel parameter: }(hjhhhNhNubj!)}(h ``kgdbwait``h]hkgdbwait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhM-ubh)}(hXThe Kernel command line option ``kgdbwait`` makes kgdb wait for a debugger connection during booting of a kernel. You can only use this option if 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.h](hThe Kernel command line option }(hj hhhNhNubj!)}(h ``kgdbwait``h]hkgdbwait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubhX makes kgdb wait for a debugger connection during booting of a kernel. You can only use this option if 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.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM/hjhhubh)}(hThe kernel will stop and wait as early as the I/O driver and architecture allows when you use this option. If you build the kgdb I/O driver as a loadable kernel module kgdbwait will not do anything.h]hThe kernel will stop and wait as early as the I/O driver and architecture allows when you use this option. If you build the kgdb I/O driver as a loadable kernel module kgdbwait will not do anything.}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjhhubeh}(h]kernel-parameter-kgdbwaitah ]h"]kernel parameter: kgdbwaitah$]h&]uh1hhjhhhhhM-ubh)}(hhh](h)}(hKernel parameter: ``kgdbcon``h](hKernel parameter: }(hjM hhhNhNubj!)}(h ``kgdbcon``h]hkgdbcon}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjM ubeh}(h]h ]h"]h$]h&]uh1hhjJ hhhhhM<ubh)}(hThe ``kgdbcon`` feature allows you to see printk() messages inside gdb while gdb is connected to the kernel. Kdb does not make use of the kgdbcon feature.h](hThe }(hji hhhNhNubj!)}(h ``kgdbcon``h]hkgdbcon}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1j hji ubh feature allows you to see printk() messages inside gdb while gdb is connected to the kernel. Kdb does not make use of the kgdbcon feature.}(hji hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM>hjJ hhubh)}(hKgdb supports using the gdb serial protocol to send console messages to the debugger when the debugger is connected and running. There are two ways to activate this feature.h]hKgdb supports using the gdb serial protocol to send console messages to the debugger when the debugger is connected and running. There are two ways to activate this feature.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjJ hhubj)}(hhh](ju)}(h=Activate with the kernel command line option:: kgdbcon h](h)}(h.Activate with the kernel command line option::h]h-Activate with the kernel command line option:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubj)}(hkgdbconh]hkgdbcon}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMHhj ubeh}(h]h ]h"]h$]h&]uh1jthj hhhhhNubju)}(hkUse sysfs before configuring an I/O driver:: echo 1 > /sys/module/debug_core/parameters/kgdb_use_con h](h)}(h,Use sysfs before configuring an I/O driver::h]h+Use sysfs before configuring an I/O driver:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj ubj)}(h7echo 1 > /sys/module/debug_core/parameters/kgdb_use_conh]h7echo 1 > /sys/module/debug_core/parameters/kgdb_use_con}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMLhj ubeh}(h]h ]h"]h$]h&]uh1jthj hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjJ hhhhhMFubjk)}(hIf you do this after you configure the kgdb I/O driver, the setting will not take effect until the next point the I/O is reconfigured.h]h)}(hIf you do this after you configure the kgdb I/O driver, the setting will not take effect until the next point the I/O is reconfigured.h]hIf you do this after you configure the kgdb I/O driver, the setting will not take effect until the next point the I/O is reconfigured.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jjhjJ hhhhhNubh important)}(hYou cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is:: console=ttyS0,115200 kgdboc=ttyS0 kgdbconh](h)}(hmYou cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is::h]hlYou cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj ubj)}(h)console=ttyS0,115200 kgdboc=ttyS0 kgdbconh]h)console=ttyS0,115200 kgdboc=ttyS0 kgdbcon}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMYhj ubeh}(h]h ]h"]h$]h&]uh1j hjJ hhhhhNubh)}(hTIt is possible to use this option with kgdboc on a tty that is not a system console.h]hTIt is possible to use this option with kgdboc on a tty that is not a system console.}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjJ hhubeh}(h]kernel-parameter-kgdbconah ]h"]kernel parameter: kgdbconah$]h&]uh1hhjhhhhhM<ubh)}(hhh](h)}(h"Run time parameter: ``kgdbreboot``h](hRun time parameter: }(hjE hhhNhNubj!)}(h``kgdbreboot``h]h kgdbreboot}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjE ubeh}(h]h ]h"]h$]h&]uh1hhjB hhhhhM_ubh)}(hThe kgdbreboot feature allows you to change how the debugger deals with the reboot notification. You have 3 choices for the behavior. The default behavior is always set to 0.h]hThe kgdbreboot feature allows you to change how the debugger deals with the reboot notification. You have 3 choices for the behavior. The default behavior is always set to 0.}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjB hhubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{0.4cm}|p{11.5cm}|p{5.6cm}|uh1jo hhhMehjB hhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hj ubj )}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j hj ubj )}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hj ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h1h]h1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h:``echo -1 > /sys/module/debug_core/parameters/kgdbreboot``h]j!)}(hj h]h6echo -1 > /sys/module/debug_core/parameters/kgdbreboot}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hhhhMkhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h(Ignore the reboot notification entirely.h]h(Ignore the reboot notification entirely.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(h2h]h2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h9``echo 0 > /sys/module/debug_core/parameters/kgdbreboot``h]j!)}(hj% h]h5echo 0 > /sys/module/debug_core/parameters/kgdbreboot}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj# ubah}(h]h ]h"]h$]h&]uh1hhhhMohj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh]h)}(h8Send the detach message to any attached debugger client.h]h8Send the detach message to any attached debugger client.}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj@ ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hhh](j )}(hhh]h)}(h3h]h3}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhj` ubah}(h]h ]h"]h$]h&]uh1j hj] ubj )}(hhh]h)}(h9``echo 1 > /sys/module/debug_core/parameters/kgdbreboot``h]j!)}(hj| h]h5echo 1 > /sys/module/debug_core/parameters/kgdbreboot}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjz ubah}(h]h ]h"]h$]h&]uh1hhhhMshjw ubah}(h]h ]h"]h$]h&]uh1j hj] ubj )}(hhh]h)}(h$Enter the debugger on reboot notify.h]h$Enter the debugger on reboot notify.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj ubah}(h]h ]h"]h$]h&]uh1j hj] ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]colsKuh1j hj~ ubah}(h]h ]h"]h$]h&]uh1j| hjB hhhNhNubeh}(h]run-time-parameter-kgdbrebootah ]h"]run time parameter: kgdbrebootah$]h&]uh1hhjhhhhhM_ubh)}(hhh](h)}(hKernel parameter: ``nokaslr``h](hKernel parameter: }(hj hhhNhNubj!)}(h ``nokaslr``h]hnokaslr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhMwubh)}(hX If the architecture that you are using enables KASLR by default, you should consider turning it off. KASLR randomizes the virtual address where the kernel image is mapped and confuses gdb which resolves addresses of kernel symbols from the symbol table of vmlinux.h]hX If the architecture that you are using enables KASLR by default, you should consider turning it off. KASLR randomizes the virtual address where the kernel image is mapped and confuses gdb which resolves addresses of kernel symbols from the symbol table of vmlinux.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj hhubeh}(h]kernel-parameter-nokaslrah ]h"]kernel parameter: nokaslrah$]h&]uh1hhjhhhhhMwubeh}(h]kernel-debugger-boot-argumentsah ]h"]kernel debugger boot argumentsah$]h&]uh1hhhhhhhhK|ubh)}(hhh](h)}(h Using kdbh]h Using kdb}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h$Quick start for kdb on a serial porth]h$Quick start for kdb on a serial port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h*This is a quick example of how to use kdb.h]h*This is a quick example of how to use kdb.}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh](ju)}(hXConfigure kgdboc at boot using kernel parameters:: console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslr OR Configure kgdboc after the kernel has booted; assuming you are using a serial port console:: echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc h](h)}(h2Configure kgdboc at boot using kernel parameters::h]h1Configure kgdboc at boot using kernel parameters:}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj? ubj)}(h0console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslrh]h0console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslr}hjQ sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj? ubh)}(hORh]hOR}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj? ubh)}(h\Configure kgdboc after the kernel has booted; assuming you are using a serial port console::h]h[Configure kgdboc after the kernel has booted; assuming you are using a serial port console:}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj? ubj)}(h1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboch]h1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc}hj{ sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj? ubeh}(h]h ]h"]h$]h&]uh1jthj< hhhhhNubju)}(hX?Enter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the `SysRq-G`, which means you must have enabled ``CONFIG_MAGIC_SYSRQ=y`` in your kernel config. - When logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger - Example using minicom 2.2 Press: `CTRL-A` `f` `g` - When you have telneted to a terminal server that supports sending a remote break Press: `CTRL-]` Type in: ``send break`` Press: `Enter` `g` h](h)}(hEnter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the `SysRq-G`, which means you must have enabled ``CONFIG_MAGIC_SYSRQ=y`` in your kernel config.h](hEnter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the }(hj hhhNhNubj)}(h `SysRq-G`h]hSysRq-G}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh$, which means you must have enabled }(hj hhhNhNubj!)}(h``CONFIG_MAGIC_SYSRQ=y``h]hCONFIG_MAGIC_SYSRQ=y}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh in your kernel config.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubjp)}(hhh](ju)}(hbWhen logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger h](h)}(hAWhen logged in as root or with a super user session you can run::h]h@When logged in as root or with a super user session you can run:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hecho g > /proc/sysrq-triggerh]hecho g > /proc/sysrq-trigger}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jthj ubju)}(h3Example using minicom 2.2 Press: `CTRL-A` `f` `g` h](h)}(hExample using minicom 2.2h]hExample using minicom 2.2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hPress: `CTRL-A` `f` `g`h](hPress: }(hj hhhNhNubj)}(h`CTRL-A`h]hCTRL-A}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh }(hj hhhNhNubj)}(h`f`h]hf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh }hj sbj)}(h`g`h]hg}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jthj ubju)}(hWhen you have telneted to a terminal server that supports sending a remote break Press: `CTRL-]` Type in: ``send break`` Press: `Enter` `g` h](h)}(hPWhen you have telneted to a terminal server that supports sending a remote breakh]hPWhen you have telneted to a terminal server that supports sending a remote break}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF ubh)}(hPress: `CTRL-]`h](hPress: }(hjX hhhNhNubj)}(h`CTRL-]`h]hCTRL-]}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjF ubh)}(hType in: ``send break``h](h Type in: }(hjt hhhNhNubj!)}(h``send break``h]h send break}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjt ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjF ubh)}(hPress: `Enter` `g`h](hPress: }(hj hhhNhNubj)}(h`Enter`h]hEnter}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh }(hj hhhNhNubj)}(h`g`h]hg}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjF ubeh}(h]h ]h"]h$]h&]uh1jthj ubeh}(h]h ]h"]h$]h&]jjuh1johhhMhj ubeh}(h]h ]h"]h$]h&]uh1jthj< hhhNhNubju)}(hXFrom the kdb prompt you can run the ``help`` command to see a complete list of the commands that are available. Some useful commands in kdb include: =========== ================================================================= ``lsmod`` Shows where kernel modules are loaded ``ps`` Displays only the active processes ``ps A`` Shows all the processes ``summary`` Shows kernel version info and memory usage ``bt`` Get a backtrace of the current process using dump_stack() ``dmesg`` View the kernel syslog buffer ``go`` Continue the system =========== ================================================================= h](h)}(hoFrom the kdb prompt you can run the ``help`` command to see a complete list of the commands that are available.h](h$From the kdb prompt you can run the }(hj hhhNhNubj!)}(h``help``h]hhelp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubhC command to see a complete list of the commands that are available.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(h$Some useful commands in kdb include:h]h$Some useful commands in kdb include:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj} )}(hhh]j )}(hhh](j )}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j hjubj )}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1j hjubj )}(hhh](j )}(hhh](j )}(hhh]h)}(h ``lsmod``h]j!)}(hj'h]hlsmod}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh]h)}(h%Shows where kernel modules are loadedh]h%Shows where kernel modules are loaded}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h``ps``h]j!)}(hjgh]hps}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j hjeubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1j hj_ubj )}(hhh]h)}(h"Displays only the active processesh]h"Displays only the active processes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h``ps A``h]j!)}(hjh]hps A}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh]h)}(hShows all the processesh]hShows all the processes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h ``summary``h]j!)}(hjh]hsummary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh]h)}(h*Shows kernel version info and memory usageh]h*Shows kernel version info and memory usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h``bt``h]j!)}(hj'h]hbt}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh]h)}(h9Get a backtrace of the current process using dump_stack()h]h9Get a backtrace of the current process using dump_stack()}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h ``dmesg``h]j!)}(hjgh]hdmesg}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j hjeubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1j hj_ubj )}(hhh]h)}(hView the kernel syslog bufferh]hView the kernel syslog buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh](j )}(hhh]h)}(h``go``h]j!)}(hjh]hgo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hhh]h)}(hContinue the systemh]hContinue the system}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]colsKuh1j hjubah}(h]h ]h"]h$]h&]uh1j| hj ubeh}(h]h ]h"]h$]h&]uh1jthj< hhhhhNubju)}(hXWhen you are done using kdb you need to consider rebooting the system or using the ``go`` command to resuming normal kernel execution. If you have paused the kernel for a lengthy period of time, applications that rely on timely networking or anything to do with real wall clock time could be adversely affected, so you should take this into consideration when using the kernel debugger. h]h)}(hXWhen you are done using kdb you need to consider rebooting the system or using the ``go`` command to resuming normal kernel execution. If you have paused the kernel for a lengthy period of time, applications that rely on timely networking or anything to do with real wall clock time could be adversely affected, so you should take this into consideration when using the kernel debugger.h](hSWhen you are done using kdb you need to consider rebooting the system or using the }(hjhhhNhNubj!)}(h``go``h]hgo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhX) command to resuming normal kernel execution. If you have paused the kernel for a lengthy period of time, applications that rely on timely networking or anything to do with real wall clock time could be adversely affected, so you should take this into consideration when using the kernel debugger.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jthj< hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj hhhhhMubeh}(h]$quick-start-for-kdb-on-a-serial-portah ]h"]$quick start for kdb on a serial portah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(h6Quick start for kdb using a keyboard connected consoleh]h6Quick start for kdb using a keyboard connected console}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhMubh)}(h:This is a quick example of how to use kdb with a keyboard.h]h:This is a quick example of how to use kdb with a keyboard.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubj)}(hhh](ju)}(hConfigure kgdboc at boot using kernel parameters:: kgdboc=kbd OR Configure kgdboc after the kernel has booted:: echo kbd > /sys/module/kgdboc/parameters/kgdboc h](h)}(h2Configure kgdboc at boot using kernel parameters::h]h1Configure kgdboc at boot using kernel parameters:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRubj)}(h kgdboc=kbdh]h kgdboc=kbd}hjdsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjRubh)}(hORh]hOR}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRubh)}(h.Configure kgdboc after the kernel has booted::h]h-Configure kgdboc after the kernel has booted:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRubj)}(h/echo kbd > /sys/module/kgdboc/parameters/kgdboch]h/echo kbd > /sys/module/kgdboc/parameters/kgdboc}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjRubeh}(h]h ]h"]h$]h&]uh1jthjOhhhhhNubju)}(hXEnter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the `SysRq-G`, which means you must have enabled ``CONFIG_MAGIC_SYSRQ=y`` in your kernel config. - When logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger - Example using a laptop keyboard: Press and hold down: `Alt` Press and hold down: `Fn` Press and release the key with the label: `SysRq` Release: `Fn` Press and release: `g` Release: `Alt` - Example using a PS/2 101-key keyboard Press and hold down: `Alt` Press and release the key with the label: `SysRq` Press and release: `g` Release: `Alt` h](h)}(hEnter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the `SysRq-G`, which means you must have enabled ``CONFIG_MAGIC_SYSRQ=y`` in your kernel config.h](hEnter the kernel debugger manually or by waiting for an oops or fault. There are several ways you can enter the kernel debugger manually; all involve using the }(hjhhhNhNubj)}(h `SysRq-G`h]hSysRq-G}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$, which means you must have enabled }(hjhhhNhNubj!)}(h``CONFIG_MAGIC_SYSRQ=y``h]hCONFIG_MAGIC_SYSRQ=y}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh in your kernel config.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubjp)}(hhh](ju)}(hbWhen logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger h](h)}(hAWhen logged in as root or with a super user session you can run::h]h@When logged in as root or with a super user session you can run:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hecho g > /proc/sysrq-triggerh]hecho g > /proc/sysrq-trigger}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jthjubju)}(hExample using a laptop keyboard: Press and hold down: `Alt` Press and hold down: `Fn` Press and release the key with the label: `SysRq` Release: `Fn` Press and release: `g` Release: `Alt` h](h)}(h Example using a laptop keyboard:h]h Example using a laptop keyboard:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPress and hold down: `Alt`h](hPress and hold down: }(hjhhhNhNubj)}(h`Alt`h]hAlt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPress and hold down: `Fn`h](hPress and hold down: }(hj/hhhNhNubj)}(h`Fn`h]hFn}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h1Press and release the key with the label: `SysRq`h](h*Press and release the key with the label: }(hjKhhhNhNubj)}(h`SysRq`h]hSysRq}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h Release: `Fn`h](h Release: }(hjghhhNhNubj)}(h`Fn`h]hFn}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPress and release: `g`h](hPress and release: }(hjhhhNhNubj)}(h`g`h]hg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hRelease: `Alt`h](h Release: }(hjhhhNhNubj)}(h`Alt`h]hAlt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jthjubju)}(hExample using a PS/2 101-key keyboard Press and hold down: `Alt` Press and release the key with the label: `SysRq` Press and release: `g` Release: `Alt` h](h)}(h%Example using a PS/2 101-key keyboardh]h%Example using a PS/2 101-key keyboard}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPress and hold down: `Alt`h](hPress and hold down: }(hjhhhNhNubj)}(h`Alt`h]hAlt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h1Press and release the key with the label: `SysRq`h](h*Press and release the key with the label: }(hjhhhNhNubj)}(h`SysRq`h]hSysRq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hPress and release: `g`h](hPress and release: }(hj hhhNhNubj)}(h`g`h]hg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hRelease: `Alt`h](h Release: }(hj'hhhNhNubj)}(h`Alt`h]hAlt}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jthjubeh}(h]h ]h"]h$]h&]jjuh1johhhMhjubeh}(h]h ]h"]h$]h&]uh1jthjOhhhNhNubju)}(hfNow type in a kdb command such as ``help``, ``dmesg``, ``bt`` or ``go`` to continue kernel execution. h]h)}(heNow type in a kdb command such as ``help``, ``dmesg``, ``bt`` or ``go`` to continue kernel execution.h](h"Now type in a kdb command such as }(hjYhhhNhNubj!)}(h``help``h]hhelp}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j hjYubh, }(hjYhhhNhNubj!)}(h ``dmesg``h]hdmesg}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j hjYubh, }hjYsbj!)}(h``bt``h]hbt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjYubh or }(hjYhhhNhNubj!)}(h``go``h]hgo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjYubh to continue kernel execution.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jthjOhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj0hhhhhMubeh}(h]6quick-start-for-kdb-using-a-keyboard-connected-consoleah ]h"]6quick start for kdb using a keyboard connected consoleah$]h&]uh1hhj hhhhhMubeh}(h] using-kdbah ]h"] using kdbah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hUsing kgdb / gdbh]hUsing kgdb / gdb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXIn 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.h]hXIn 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXAll kgdb I/O drivers can be reconfigured at run time, if ``CONFIG_SYSFS`` and ``CONFIG_MODULES`` are enabled, by echo'ing a new config string to ``/sys/module//parameter/