€•“Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ*/translations/zh_CN/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/process/debugging/kgdb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ1Using kgdb, kdb and the kernel debugger internals”h]”hŒ1Using kgdb, kdb and the kernel debugger internals”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒD/var/lib/git/docbuild/linux/Documentation/process/debugging/kgdb.rst”h´KubhŒ field_list”“”)�”}”(hhh]”hŒfield”“”)�”}”(hhh]”(hŒ field_name”“”)�”}”(hŒAuthor”h]”hŒAuthor”…”�”}”(hh×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÒh³hÊh´KubhŒ field_body”“”)�”}”(hŒ Jason Wessel ”h]”hŒ paragraph”“”)�”}”(hŒ Jason Wessel”h]”hŒ Jason Wessel”…”�”}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khhçubah}”(h]”h ]”h"]”h$]”h&]”uh1håhhÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÐh³hÊh´KhhÍh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1hËhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´Kubhì)�”}”(hŒÿThe 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]”hŒÿThe 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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K hj h²hubhì)�”}”(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 ”…”�”}”(hj,h²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``CONFIG_KALLSYMS``”h]”hŒCONFIG_KALLSYMS”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj,ubhŒ.”…”�”}”(hj,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khj h²hubhì)�”}”(hX»Kgdb 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]”hX¿Kgdb 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.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khj h²hubhì)�”}”(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.”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K!hj h²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒCompiling a kernel”h]”hŒCompiling a kernel”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjrh²hh³hÊh´K,ubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒCIn order to enable compilation of kdb, you must first enable kgdb. ”h]”hì)�”}”(hŒBIn order to enable compilation of kdb, you must first enable kgdb.”h]”hŒBIn order to enable compilation of kdb, you must first enable kgdb.”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K.hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…h²hh³hÊh´Nubj‰)�”}”(hŒLThe kgdb test compile options are described in the kgdb test suite chapter. ”h]”hì)�”}”(hŒKThe kgdb test compile options are described in the kgdb test suite chapter.”h]”hŒKThe kgdb test compile options are described in the kgdb test suite chapter.”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K0hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jƒh³hÊh´K.hjrh²hubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel config options for kgdb”h]”hŒKernel config options for kgdb”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÂh²hh³hÊh´K4ubhì)�”}”(hŒ—To enable ``CONFIG_KGDB`` you should look under :menuselection:`Kernel hacking --> Kernel debugging` and select :menuselection:`KGDB: kernel debugger`.”h]”(hŒ To enable ”…”�”}”(hjÓh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KGDB``”h]”hŒ CONFIG_KGDB”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÓubhŒ you should look under ”…”�”}”(hjÓh²hh³Nh´NubhŒinline”“”)�”}”(hŒ#Kernel hacking ‣ Kernel debugging”h]”hŒ#Kernel hacking ‣ Kernel debugging”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ4:menuselection:`Kernel hacking --> Kernel debugging`”uh1jíhjÓubhŒ and select ”…”�”}”(hjÓh²hh³Nh´Nubjî)�”}”(hŒKGDB: kernel debugger”h]”hŒKGDB: kernel debugger”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ&:menuselection:`KGDB: kernel debugger`”uh1jíhjÓubhŒ.”…”�”}”(hjÓh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K6hjÂh²hubhì)�”}”(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]”(hŒ¦While 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 ”…”�”}”(hjh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_DEBUG_INFO``”h]”hŒCONFIG_DEBUG_INFO”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubhŒ which is called ”…”�”}”(hjh²hh³Nh´Nubjî)�”}”(hŒ"Compile the kernel with debug info”h]”hŒ"Compile the kernel with debug info”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ3:menuselection:`Compile the kernel with debug info`”uh1jíhjubhŒ in the config menu.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K:hjÂh²hubhì)�”}”(hX°It 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]”(hŒ6It is advised, but not required, that you turn on the ”…”�”}”(hjTh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_FRAME_POINTER``”h]”hŒCONFIG_FRAME_POINTER”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjTubhŒ kernel option which is called ”…”�”}”(hjTh²hh³Nh´Nubjî)�”}”(hŒ&Compile the kernel with frame pointers”h]”hŒ&Compile the kernel with frame pointers”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ7:menuselection:`Compile the kernel with frame pointers`”uh1jíhjTubhX  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.”…”�”}”(hjTh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K?hjÂh²hubhì)�”}”(hXÕIf 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]”(hŒBIf the architecture that you are using supports the kernel option ”…”�”}”(hj‰h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_STRICT_KERNEL_RWX``”h]”hŒCONFIG_STRICT_KERNEL_RWX”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj‰ubhX$, 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 ”…”�”}”(hj‰h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_STRICT_KERNEL_RWX``”h]”hŒCONFIG_STRICT_KERNEL_RWX”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj‰ubhŒ9 option turned on, else you need to turn off this option.”…”�”}”(hj‰h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KFhjÂh²hubhì)�”}”(hXˆNext 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]”hXˆNext 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.”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KNhjÂh²hubhì)�”}”(hŒMHere is an example set of ``.config`` symbols to enable or disable for kgdb::”h]”(hŒHere is an example set of ”…”�”}”(hjÉh²hh³Nh´Nubj5)�”}”(hŒ ``.config``”h]”hŒ.config”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÉubhŒ' symbols to enable or disable for kgdb:”…”�”}”(hjÉh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KUhjÂh²hubhŒ literal_block”“”)�”}”(hŒg# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y”h]”hŒg# CONFIG_STRICT_KERNEL_RWX is not set CONFIG_FRAME_POINTER=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y”…”�”}”hjësbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jéh³hÊh´KWhjÂh²hubeh}”(h]”Œkernel-config-options-for-kgdb”ah ]”h"]”Œkernel config options for kgdb”ah$]”h&]”uh1hµhjrh²hh³hÊh´K4ubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel config options for kdb”h]”hŒKernel config options for kdb”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K]ubhì)�”}”(hX�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.”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 ”…”�”}”(hjh²hh³Nh´Nubj5)�”}”(hŒ ``lsmod``”h]”hŒlsmod”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubhŒ, or ”…”�”}”(hjh²hh³Nh´Nubj5)�”}”(hŒ``ps``”h]”hŒps”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubhŒX. In order to build kdb into the kernel you follow the same steps as you would for kgdb.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K_hjh²hubhì)�”}”(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 ”…”�”}”(hjFh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KGDB_KDB``”h]”hŒCONFIG_KGDB_KDB”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjFubhŒ which is called ”…”�”}”(hjFh²hh³Nh´Nubjî)�”}”(hŒ'KGDB_KDB: include kdb frontend for kgdb”h]”hŒ'KGDB_KDB: include kdb frontend for kgdb”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ8:menuselection:`KGDB_KDB: include kdb frontend for kgdb`”uh1jíhjFubhŒ^ in the config menu. In theory you would have already also selected an I/O driver such as the ”…”�”}”(hjFh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KGDB_SERIAL_CONSOLE``”h]”hŒCONFIG_KGDB_SERIAL_CONSOLE”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjFubhŒU interface if you plan on using kdb on a serial port, when you were configuring kgdb.”…”�”}”(hjFh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kfhjh²hubhì)�”}”(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]”(hŒDIf you want to use a PS/2-style keyboard with kdb, you would select ”…”�”}”(hj�h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KDB_KEYBOARD``”h]”hŒCONFIG_KDB_KEYBOARD”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj�ubhŒ which is called ”…”�”}”(hj�h²hh³Nh´Nubjî)�”}”(hŒ"KGDB_KDB: keyboard as input device”h]”hŒ"KGDB_KDB: keyboard as input device”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”Œ menuselection”ah"]”h$]”h&]”Œrawtext”Œ3:menuselection:`KGDB_KDB: keyboard as input device`”uh1jíhj�ubhŒ in the config menu. The ”…”�”}”(hj�h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KDB_KEYBOARD``”h]”hŒCONFIG_KDB_KEYBOARD”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj�ubhŒC option is not used for anything in the gdb interface to kgdb. The ”…”�”}”(hj�h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_KDB_KEYBOARD``”h]”hŒCONFIG_KDB_KEYBOARD”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj�ubhŒ option only works with kdb.”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Klhjh²hubhì)�”}”(hŒEHere is an example set of ``.config`` symbols to enable/disable kdb::”h]”(hŒHere is an example set of ”…”�”}”(hjæh²hh³Nh´Nubj5)�”}”(hŒ ``.config``”h]”hŒ.config”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjæubhŒ symbols to enable/disable kdb:”…”�”}”(hjæh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Krhjh²hubjê)�”}”(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”h]”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&]”jùjúuh1jéh³hÊh´Kthjh²hubeh}”(h]”Œkernel-config-options-for-kdb”ah ]”h"]”Œkernel config options for kdb”ah$]”h&]”uh1hµhjrh²hh³hÊh´K]ubeh}”(h]”Œcompiling-a-kernel”ah ]”h"]”Œcompiling a kernel”ah$]”h&]”uh1hµhh·h²hh³hÊh´K,ubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel Debugger Boot Arguments”h]”hŒKernel Debugger Boot Arguments”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj$h²hh³hÊh´K|ubhì)�”}”(hŒæThis 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]”hŒæThis 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.”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K~hj$h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel parameter: kgdboc”h]”hŒKernel parameter: kgdboc”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjCh²hh³hÊh´K„ubhì)�”}”(hŒòThe 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]”hŒöThe 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.”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K†hjCh²hubhì)�”}”(hXòFor 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]”(hXŸFor 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 ”…”�”}”(hjbh²hh³Nh´Nubj5)�”}”(hŒ ``kgdbwait``”h]”hŒkgdbwait”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjbubhŒG and early debugging if you build kgdboc into the kernel as a built-in.”…”�”}”(hjbh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K‹hjCh²hubhì)�”}”(hXåOptionally 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]”hXåOptionally 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.”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K”hjCh²hubh¶)�”}”(hhh]”(h»)�”}”(hŒkgdboc arguments”h]”hŒkgdboc arguments”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj�h²hh³hÊh´K�ubhì)�”}”(hŒUsage::”h]”hŒUsage:”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KŸhj�h²hubjê)�”}”(hŒ-kgdboc=[kms][[,]kbd][[,]serial_device][,baud]”h]”hŒ-kgdboc=[kms][[,]kbd][[,]serial_device][,baud]”…”�”}”hj¯sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´K¡hj�h²hubhì)�”}”(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.”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K£hj�h²hubhì)�”}”(hŒAbbreviations:”h]”hŒAbbreviations:”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K¦hj�h²hubj„)�”}”(hhh]”(j‰)�”}”(hŒkms = Kernel Mode Setting ”h]”hì)�”}”(hŒkms = Kernel Mode Setting”h]”hŒkms = Kernel Mode Setting”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K¨hjÜubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjÙh²hh³hÊh´Nubj‰)�”}”(hŒkbd = Keyboard ”h]”hì)�”}”(hŒkbd = Keyboard”h]”hŒkbd = Keyboard”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kªhjôubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjÙh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÀjÁuh1jƒh³hÊh´K¨hj�h²hubhì)�”}”(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.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K¬hj�h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ!Using loadable module or built-in”h]”hŒ!Using loadable module or built-in”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´K³ubhŒenumerated_list”“”)�”}”(hhh]”(j‰)�”}”(hŒWAs a kernel built-in: Use the kernel boot argument:: kgdboc=,[baud] ”h]”(hì)�”}”(hŒAs a kernel built-in:”h]”hŒAs a kernel built-in:”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kµhj6ubhì)�”}”(hŒUse the kernel boot argument::”h]”hŒUse the kernel boot argument:”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K·hj6ubjê)�”}”(hŒkgdboc=,[baud]”h]”hŒkgdboc=,[baud]”…”�”}”hjVsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´K¹hj6ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj3h²hh³hÊh´Nubj‰)�”}”(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ì)�”}”(hŒAs a kernel loadable module:”h]”hŒAs a kernel loadable module:”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K»hjjubhì)�”}”(hŒUse the command::”h]”hŒUse the command:”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K½hjjubjê)�”}”(hŒ*modprobe kgdboc kgdboc=,[baud]”h]”hŒ*modprobe kgdboc kgdboc=,[baud]”…”�”}”hjŠsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´K¿hjjubhì)�”}”(hŒÉ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.”h]”hŒÉ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.”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÁhjjubj2)�”}”(hhh]”(j‰)�”}”(hŒ``kgdboc=ttyS0,115200`` ”h]”hì)�”}”(hŒ``kgdboc=ttyS0,115200``”h]”j5)�”}”(hj¯h]”hŒkgdboc=ttyS0,115200”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj­ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÅhj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¦ubj‰)�”}”(hŒ``kgdboc=ttyAMA1,115200`` ”h]”hì)�”}”(hŒ``kgdboc=ttyAMA1,115200``”h]”j5)�”}”(hjÐh]”hŒkgdboc=ttyAMA1,115200”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÇhjÊubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¦ubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j1hjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj3h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj h²hh³hÊh´Kµubeh}”(h]”Œ!using-loadable-module-or-built-in”ah ]”h"]”Œ!using loadable module or built-in”ah$]”h&]”uh1hµhj�h²hh³hÊh´K³ubh¶)�”}”(hhh]”(h»)�”}”(hŒ&Configure kgdboc at runtime with sysfs”h]”hŒ&Configure kgdboc at runtime with sysfs”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KÊubhì)�”}”(hŒeAt run time you can enable or disable kgdboc by writing parameters into sysfs. Here are two examples:”h]”hŒeAt run time you can enable or disable kgdboc by writing parameters into sysfs. Here are two examples:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÌhj h²hubj2)�”}”(hhh]”(j‰)�”}”(hŒQEnable kgdboc on ttyS0:: echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc ”h]”(hì)�”}”(hŒEnable kgdboc on ttyS0::”h]”hŒEnable kgdboc on ttyS0:”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÏhj,ubjê)�”}”(hŒ1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc”h]”hŒ1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc”…”�”}”hj>sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´KÑhj,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj)h²hh³hÊh´Nubj‰)�”}”(hŒFDisable kgdboc:: echo "" > /sys/module/kgdboc/parameters/kgdboc ”h]”(hì)�”}”(hŒDisable kgdboc::”h]”hŒDisable kgdboc:”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÓhjRubjê)�”}”(hŒ.echo "" > /sys/module/kgdboc/parameters/kgdboc”h]”hŒ.echo "" > /sys/module/kgdboc/parameters/kgdboc”…”�”}”hjdsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´KÕhjRubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj)h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj h²hh³hÊh´KÏubhŒnote”“”)�”}”(hŒrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.”h]”hì)�”}”(hŒrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.”h]”hŒrYou do not need to specify the baud if you are configuring the console on tty which is already configured or open.”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KÙhj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1j~hj h²hh³hÊh´Nubeh}”(h]”Œ&configure-kgdboc-at-runtime-with-sysfs”ah ]”h"]”Œ&configure kgdboc at runtime with sysfs”ah$]”h&]”uh1hµhj�h²hh³hÊh´KÊubh¶)�”}”(hhh]”(h»)�”}”(hŒ More examples”h]”hŒ More examples”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KÝubhì)�”}”(hŒ–You 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]”hŒ–You 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.”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kßhj h²hubj2)�”}”(hhh]”(j‰)�”}”(hŒpkdb 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:”…”�”}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KãhjÂubjê)�”}”(hŒkgdboc=[,baud]”h]”hŒkgdboc=[,baud]”…”�”}”hjÔsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´KåhjÂubhì)�”}”(hŒ Example::”h]”hŒExample:”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KçhjÂubjê)�”}”(hŒkgdboc=ttyS0,115200”h]”hŒkgdboc=ttyS0,115200”…”�”}”hjðsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´KéhjÂubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¿h²hh³hÊh´Nubj‰)�”}”(hŒ€kdb 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:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Këhjubjê)�”}”(hŒ!kgdboc=kbd,[,baud]”h]”hŒ!kgdboc=kbd,[,baud]”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´Kíhjubhì)�”}”(hŒ Example::”h]”hŒExample:”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kïhjubjê)�”}”(hŒkgdboc=kbd,ttyS0,115200”h]”hŒkgdboc=kbd,ttyS0,115200”…”�”}”hj2sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´Kñhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¿h²hh³hÊh´Nubj‰)�”}”(hŒ'kdb with a keyboard:: kgdboc=kbd ”h]”(hì)�”}”(hŒkdb with a keyboard::”h]”hŒkdb with a keyboard:”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KóhjFubjê)�”}”(hŒ kgdboc=kbd”h]”hŒ kgdboc=kbd”…”�”}”hjXsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´KõhjFubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¿h²hh³hÊh´Nubj‰)�”}”(hŒ4kdb with kernel mode setting:: kgdboc=kms,kbd ”h]”(hì)�”}”(hŒkdb with kernel mode setting::”h]”hŒkdb with kernel mode setting:”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K÷hjlubjê)�”}”(hŒkgdboc=kms,kbd”h]”hŒkgdboc=kms,kbd”…”�”}”hj~sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´Kùhjlubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¿h²hh³hÊh´Nubj‰)�”}”(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]”hŒ9kdb with kernel mode setting and kgdb over a serial port:”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Kûhj’ubjê)�”}”(hŒkgdboc=kms,kbd,ttyS0,115200”h]”hŒkgdboc=kms,kbd,ttyS0,115200”…”�”}”hj¤sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´Kýhj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¿h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj h²hh³hÊh´Kãubj)�”}”(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]”(hŒfKgdboc does not support interrupting the target via the gdb remote protocol. You must manually send a ”…”�”}”(hjÂh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ `SysRq-G`”h]”hŒSysRq-G”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjÂubhŒà 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 ”…”�”}”(hjÂh²hh³Nh´NubjË)�”}”(hŒ `SysRq-G`”h]”hŒSysRq-G”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjÂubhŒ for you.”…”�”}”(hjÂh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mhj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1j~hj h²hh³hÊh´Nubhì)�”}”(hXÛWhen 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]”(hX°When 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 ”…”�”}”(hjüh²hh³Nh´NubjË)�”}”(hŒ`Sysrq`”h]”hŒSysrq”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjüubhŒ# sequence and then type the letter ”…”�”}”(hjüh²hh³Nh´NubjË)�”}”(hŒ`g`”h]”hŒg”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjüubhŒ~. Then you disconnect the terminal session and connect gdb. Your options if you don’t like this are to hack gdb to send the ”…”�”}”(hjüh²hh³Nh´NubjË)�”}”(hŒ `SysRq-G`”h]”hŒSysRq-G”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjüubhŒy for you as well as on the initial connect, or to use a debugger proxy that allows an unmodified gdb to do the debugging.”…”�”}”(hjüh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mhj h²hubeh}”(h]”Œ more-examples”ah ]”h"]”Œ more examples”ah$]”h&]”uh1hµhj�h²hh³hÊh´KÝubeh}”(h]”Œkgdboc-arguments”ah ]”h"]”Œkgdboc arguments”ah$]”h&]”uh1hµhjCh²hh³hÊh´K�ubeh}”(h]”Œkernel-parameter-kgdboc”ah ]”h"]”Œkernel parameter: kgdboc”ah$]”h&]”uh1hµhj$h²hh³hÊh´K„ubh¶)�”}”(hhh]”(h»)�”}”(hŒ%Kernel parameter: ``kgdboc_earlycon``”h]”(hŒKernel parameter: ”…”�”}”(hj[h²hh³Nh´Nubj5)�”}”(hŒ``kgdboc_earlycon``”h]”hŒkgdboc_earlycon”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj[ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhjXh²hh³hÊh´Mubhì)�”}”(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 ”…”�”}”(hjwh²hh³Nh´Nubj5)�”}”(hŒ``kgdboc_earlycon``”h]”hŒkgdboc_earlycon”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjwubhX 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 ”…”�”}”(hjwh²hh³Nh´Nubj5)�”}”(hŒ ``kgdboc``”h]”hŒkgdboc”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjwubhŒ parameter.”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MhjXh²hubhì)�”}”(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]”(hŒhNormally there is only one boot console (especially that implements the read() function) so just adding ”…”�”}”(hj©h²hh³Nh´Nubj5)�”}”(hŒ``kgdboc_earlycon``”h]”hŒkgdboc_earlycon”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj©ubhX 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.”…”�”}”(hj©h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MhjXh²hubhì)�”}”(hŒ8For instance, on one board to be explicit you might do::”h]”hŒ7For instance, on one board to be explicit you might do:”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M$hjXh²hubjê)�”}”(hŒ(kgdboc_earlycon=qcom_geni kgdboc=ttyMSM0”h]”hŒ(kgdboc_earlycon=qcom_geni kgdboc=ttyMSM0”…”�”}”hj×sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´M&hjXh²hubhì)�”}”(hŒLIf the only boot console on the device was "qcom_geni", you could simplify::”h]”hŒOIf the only boot console on the device was “qcom_geniâ€�, you could simplify:”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M(hjXh²hubjê)�”}”(hŒkgdboc_earlycon kgdboc=ttyMSM0”h]”hŒkgdboc_earlycon kgdboc=ttyMSM0”…”�”}”hjósbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´M*hjXh²hubeh}”(h]”Œ kernel-parameter-kgdboc-earlycon”ah ]”h"]”Œ!kernel parameter: kgdboc_earlycon”ah$]”h&]”uh1hµhj$h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel parameter: ``kgdbwait``”h]”(hŒKernel parameter: ”…”�”}”(hj h²hh³Nh´Nubj5)�”}”(hŒ ``kgdbwait``”h]”hŒkgdbwait”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M-ubhì)�”}”(hXäThe 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]”(hŒThe Kernel command line option ”…”�”}”(hj( h²hh³Nh´Nubj5)�”}”(hŒ ``kgdbwait``”h]”hŒkgdbwait”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj( 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( h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M/hj h²hubhì)�”}”(hŒÆThe 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]”hŒÆThe 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.”…”�”}”(hjH h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M7hj h²hubeh}”(h]”Œkernel-parameter-kgdbwait”ah ]”h"]”Œkernel parameter: kgdbwait”ah$]”h&]”uh1hµhj$h²hh³hÊh´M-ubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel parameter: ``kgdbcon``”h]”(hŒKernel parameter: ”…”�”}”(hja h²hh³Nh´Nubj5)�”}”(hŒ ``kgdbcon``”h]”hŒkgdbcon”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hja ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhj^ h²hh³hÊh´M<ubhì)�”}”(hŒšThe ``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]”(hŒThe ”…”�”}”(hj} h²hh³Nh´Nubj5)�”}”(hŒ ``kgdbcon``”h]”hŒkgdbcon”…”�”}”(hj… h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj} 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.”…”�”}”(hj} h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M>hj^ h²hubhì)�”}”(hŒ­Kgdb 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]”hŒ­Kgdb 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� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MBhj^ h²hubj2)�”}”(hhh]”(j‰)�”}”(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² h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MFhj® ubjê)�”}”(hŒkgdbcon”h]”hŒkgdbcon”…”�”}”hjÀ sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MHhj® ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj« h²hh³hÊh´Nubj‰)�”}”(hŒkUse 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Ø h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MJhjÔ ubjê)�”}”(hŒ7echo 1 > /sys/module/debug_core/parameters/kgdb_use_con”h]”hŒ7echo 1 > /sys/module/debug_core/parameters/kgdb_use_con”…”�”}”hjæ sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MLhjÔ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj« h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj^ h²hh³hÊh´MFubj)�”}”(hŒ†If 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ì)�”}”(hŒ†If 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Œ†If 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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MPhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j~hj^ h²hh³hÊh´NubhŒ important”“”)�”}”(hŒ�You cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is:: console=ttyS0,115200 kgdboc=ttyS0 kgdbcon”h]”(hì)�”}”(hŒmYou cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is::”h]”hŒlYou cannot use kgdboc + kgdbcon on a tty that is an active system console. An example of incorrect usage is:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MVhj ubjê)�”}”(hŒ)console=ttyS0,115200 kgdboc=ttyS0 kgdbcon”h]”hŒ)console=ttyS0,115200 kgdboc=ttyS0 kgdbcon”…”�”}”hj, sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MYhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hj^ h²hh³hÊh´Nubhì)�”}”(hŒTIt is possible to use this option with kgdboc on a tty that is not a system console.”h]”hŒTIt is possible to use this option with kgdboc on a tty that is not a system console.”…”�”}”(hj@ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M[hj^ h²hubeh}”(h]”Œkernel-parameter-kgdbcon”ah ]”h"]”Œkernel parameter: kgdbcon”ah$]”h&]”uh1hµhj$h²hh³hÊh´M<ubh¶)�”}”(hhh]”(h»)�”}”(hŒ"Run time parameter: ``kgdbreboot``”h]”(hŒRun time parameter: ”…”�”}”(hjY h²hh³Nh´Nubj5)�”}”(hŒ``kgdbreboot``”h]”hŒ kgdbreboot”…”�”}”(hja h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjY ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhjV h²hh³hÊh´M_ubhì)�”}”(hŒ®The 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]”hŒ®The 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.”…”�”}”(hju h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MahjV h²hubhŒtabular_col_spec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œspec”Œ|p{0.4cm}|p{11.5cm}|p{5.6cm}|”uh1jƒ h³hÊh´MehjV h²hubhŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jš hj— ubj› )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jš hj— ubj› )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jš hj— ubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hì)�”}”(hŒ1”h]”hŒ1”…”�”}”(hjÉ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MjhjÆ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÁ ubjÅ )�”}”(hhh]”hì)�”}”(hŒ:``echo -1 > /sys/module/debug_core/parameters/kgdbreboot``”h]”j5)�”}”(hjâ h]”hŒ6echo -1 > /sys/module/debug_core/parameters/kgdbreboot”…”�”}”(hjä h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjà ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MkhjÝ 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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mlhjý ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÁ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj¼ ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ2”h]”hŒ2”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mnhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hj ubjÅ )�”}”(hhh]”hì)�”}”(hŒ9``echo 0 > /sys/module/debug_core/parameters/kgdbreboot``”h]”j5)�”}”(hj9 h]”hŒ5echo 0 > /sys/module/debug_core/parameters/kgdbreboot”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj7 ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mohj4 ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hj ubjÅ )�”}”(hhh]”hì)�”}”(hŒ8Send the detach message to any attached debugger client.”h]”hŒ8Send the detach message to any attached debugger client.”…”�”}”(hjW h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MphjT ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj¼ ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ3”h]”hŒ3”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mrhjt ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjq ubjÅ )�”}”(hhh]”hì)�”}”(hŒ9``echo 1 > /sys/module/debug_core/parameters/kgdbreboot``”h]”j5)�”}”(hj� h]”hŒ5echo 1 > /sys/module/debug_core/parameters/kgdbreboot”…”�”}”(hj’ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjŽ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mshj‹ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjq ubjÅ )�”}”(hhh]”hì)�”}”(hŒ$Enter the debugger on reboot notify.”h]”hŒ$Enter the debugger on reboot notify.”…”�”}”(hj® h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mthj« ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjq ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj¼ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jº hj— ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j• hj’ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j� hjV h²hh³Nh´Nubeh}”(h]”Œrun-time-parameter-kgdbreboot”ah ]”h"]”Œrun time parameter: kgdbreboot”ah$]”h&]”uh1hµhj$h²hh³hÊh´M_ubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel parameter: ``nokaslr``”h]”(hŒKernel parameter: ”…”�”}”(hjæ h²hh³Nh´Nubj5)�”}”(hŒ ``nokaslr``”h]”hŒnokaslr”…”�”}”(hjî h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjæ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhjã h²hh³hÊh´Mwubhì)�”}”(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 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Myhjã h²hubeh}”(h]”Œkernel-parameter-nokaslr”ah ]”h"]”Œkernel parameter: nokaslr”ah$]”h&]”uh1hµhj$h²hh³hÊh´Mwubh¶)�”}”(hhh]”(h»)�”}”(hŒKernel parameter: ``rodata``”h]”(hŒKernel parameter: ”…”�”}”(hj h²hh³Nh´Nubj5)�”}”(hŒ ``rodata``”h]”hŒrodata”…”�”}”(hj# h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M€ubhì)�”}”(hŒ¸``CONFIG_STRICT_KERNEL_RWX`` is turned on by default and is not visible to menuconfig on some architectures (arm64 for example), you can pass ``rodata=off`` to the kernel in this case.”h]”(j5)�”}”(hŒ``CONFIG_STRICT_KERNEL_RWX``”h]”hŒCONFIG_STRICT_KERNEL_RWX”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj7 ubhŒr is turned on by default and is not visible to menuconfig on some architectures (arm64 for example), you can pass ”…”�”}”(hj7 h²hh³Nh´Nubj5)�”}”(hŒ``rodata=off``”h]”hŒ rodata=off”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj7 ubhŒ to the kernel in this case.”…”�”}”(hj7 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M‚hj h²hubeh}”(h]”Œkernel-parameter-rodata”ah ]”h"]”Œkernel parameter: rodata”ah$]”h&]”uh1hµhj$h²hh³hÊh´M€ubeh}”(h]”Œkernel-debugger-boot-arguments”ah ]”h"]”Œkernel debugger boot arguments”ah$]”h&]”uh1hµhh·h²hh³hÊh´K|ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Using kdb”h]”hŒ Using kdb”…”�”}”(hjx h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhju h²hh³hÊh´M‡ubh¶)�”}”(hhh]”(h»)�”}”(hŒ$Quick start for kdb on a serial port”h]”hŒ$Quick start for kdb on a serial port”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj† h²hh³hÊh´MŠubhì)�”}”(hŒ*This is a quick example of how to use kdb.”h]”hŒ*This is a quick example of how to use kdb.”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MŒhj† h²hubj2)�”}”(hhh]”(j‰)�”}”(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ì)�”}”(hŒ2Configure kgdboc at boot using kernel parameters::”h]”hŒ1Configure kgdboc at boot using kernel parameters:”…”�”}”(hj¬ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MŽhj¨ ubjê)�”}”(hŒ0console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslr”h]”hŒ0console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslr”…”�”}”hjº sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´M�hj¨ ubhì)�”}”(hŒOR”h]”hŒOR”…”�”}”(hjÈ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M’hj¨ 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:”…”�”}”(hjÖ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M”hj¨ ubjê)�”}”(hŒ1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc”h]”hŒ1echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc”…”�”}”hjä sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´M—hj¨ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¥ h²hh³hÊh´Nubj‰)�”}”(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ì)�”}”(hŒü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.”h]”(hŒ 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 ”…”�”}”(hjü h²hh³Nh´NubjË)�”}”(hŒ `SysRq-G`”h]”hŒSysRq-G”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjü ubhŒ$, which means you must have enabled ”…”�”}”(hjü h²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_MAGIC_SYSRQ=y``”h]”hŒCONFIG_MAGIC_SYSRQ=y”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjü ubhŒ in your kernel config.”…”�”}”(hjü h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M™hjø ubj„)�”}”(hhh]”(j‰)�”}”(hŒbWhen logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger ”h]”(hì)�”}”(hŒAWhen 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:”…”�”}”(hj5 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mžhj1 ubjê)�”}”(hŒecho g > /proc/sysrq-trigger”h]”hŒecho g > /proc/sysrq-trigger”…”�”}”hjC sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´M hj1 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj. ubj‰)�”}”(hŒ3Example using minicom 2.2 Press: `CTRL-A` `f` `g` ”h]”(hì)�”}”(hŒExample using minicom 2.2”h]”hŒExample using minicom 2.2”…”�”}”(hj[ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¢hjW ubhì)�”}”(hŒPress: `CTRL-A` `f` `g`”h]”(hŒPress: ”…”�”}”(hji h²hh³Nh´NubjË)�”}”(hŒ`CTRL-A`”h]”hŒCTRL-A”…”�”}”(hjq h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhji ubhŒ ”…”�”}”(hji h²hh³Nh´NubjË)�”}”(hŒ`f`”h]”hŒf”…”�”}”(hjƒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhji ubhŒ ”…”�”}”hji sbjË)�”}”(hŒ`g`”h]”hŒg”…”�”}”(hj• h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhji ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¤hjW ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj. ubj‰)�”}”(hŒ�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ì)�”}”(hŒPWhen you have telneted to a terminal server that supports sending a remote break”h]”hŒPWhen you have telneted to a terminal server that supports sending a remote break”…”�”}”(hj³ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¦hj¯ ubhì)�”}”(hŒPress: `CTRL-]`”h]”(hŒPress: ”…”�”}”(hjÁ h²hh³Nh´NubjË)�”}”(hŒ`CTRL-]`”h]”hŒCTRL-]”…”�”}”(hjÉ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjÁ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M©hj¯ ubhì)�”}”(hŒType in: ``send break``”h]”(hŒ Type in: ”…”�”}”(hjÝ h²hh³Nh´Nubj5)�”}”(hŒ``send break``”h]”hŒ send break”…”�”}”(hjå h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÝ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M«hj¯ ubhì)�”}”(hŒPress: `Enter` `g`”h]”(hŒPress: ”…”�”}”(hjù h²hh³Nh´NubjË)�”}”(hŒ`Enter`”h]”hŒEnter”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjù ubhŒ ”…”�”}”(hjù h²hh³Nh´NubjË)�”}”(hŒ`g`”h]”hŒg”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjù ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M­hj¯ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj. ubeh}”(h]”h ]”h"]”h$]”h&]”jÀjÁuh1jƒh³hÊh´Mžhjø ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¥ h²hh³Nh´Nubj‰)�”}”(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ì)�”}”(hŒoFrom 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=h²hh³Nh´Nubj5)�”}”(hŒ``help``”h]”hŒhelp”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hj=ubhŒC command to see a complete list of the commands that are available.”…”�”}”(hj=h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¯hj9ubhì)�”}”(hŒ$Some useful commands in kdb include:”h]”hŒ$Some useful commands in kdb include:”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M²hj9ubj‘ )�”}”(hhh]”j– )�”}”(hhh]”(j› )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jš hjnubj› )�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”KAuh1jš hjnubj» )�”}”(hhh]”(jÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ ``lsmod``”h]”j5)�”}”(hj�h]”hŒlsmod”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjŽubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mµhj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjˆubjÅ )�”}”(hhh]”hì)�”}”(hŒ%Shows where kernel modules are loaded”h]”hŒ%Shows where kernel modules are loaded”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mµhj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ``ps``”h]”j5)�”}”(hjÐh]”hŒps”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¶hjËubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÈubjÅ )�”}”(hhh]”hì)�”}”(hŒ"Displays only the active processes”h]”hŒ"Displays only the active processes”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¶hjëubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÈubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ``ps A``”h]”j5)�”}”(hjh]”hŒps A”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M·hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjubjÅ )�”}”(hhh]”hì)�”}”(hŒShows all the processes”h]”hŒShows all the processes”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M·hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ ``summary``”h]”j5)�”}”(hjPh]”hŒsummary”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjNubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¸hjKubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjHubjÅ )�”}”(hhh]”hì)�”}”(hŒ*Shows kernel version info and memory usage”h]”hŒ*Shows kernel version info and memory usage”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¸hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjHubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ``bt``”h]”j5)�”}”(hj�h]”hŒbt”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjŽubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¹hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjˆubjÅ )�”}”(hhh]”hì)�”}”(hŒ9Get a backtrace of the current process using dump_stack()”h]”hŒ9Get a backtrace of the current process using dump_stack()”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¹hj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ ``dmesg``”h]”j5)�”}”(hjÐh]”hŒdmesg”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MºhjËubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÈubjÅ )�”}”(hhh]”hì)�”}”(hŒView the kernel syslog buffer”h]”hŒView the kernel syslog buffer”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mºhjëubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjÈubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubjÀ )�”}”(hhh]”(jÅ )�”}”(hhh]”hì)�”}”(hŒ``go``”h]”j5)�”}”(hjh]”hŒgo”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M»hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjubjÅ )�”}”(hhh]”hì)�”}”(hŒContinue the system”h]”hŒContinue the system”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M»hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÄ hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¿ hj…ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jº hjnubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j• hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1j� hj9ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¥ h²hh³hÊh´Nubj‰)�”}”(hXƒWhen 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ì)�”}”(hX‚When 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ŒSWhen you are done using kdb you need to consider rebooting the system or using the ”…”�”}”(hjeh²hh³Nh´Nubj5)�”}”(hŒ``go``”h]”hŒgo”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjeubhX) 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.”…”�”}”(hjeh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´M¾hjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¥ h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj† h²hh³hÊh´MŽubeh}”(h]”Œ$quick-start-for-kdb-on-a-serial-port”ah ]”h"]”Œ$quick start for kdb on a serial port”ah$]”h&]”uh1hµhju h²hh³hÊh´MŠubh¶)�”}”(hhh]”(h»)�”}”(hŒ6Quick start for kdb using a keyboard connected console”h]”hŒ6Quick start for kdb using a keyboard connected console”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj™h²hh³hÊh´MÆubhì)�”}”(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.”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÈhj™h²hubj2)�”}”(hhh]”(j‰)�”}”(hŒ®Configure 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ì)�”}”(hŒ2Configure kgdboc at boot using kernel parameters::”h]”hŒ1Configure kgdboc at boot using kernel parameters:”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÊhj»ubjê)�”}”(hŒ kgdboc=kbd”h]”hŒ kgdboc=kbd”…”�”}”hjÍsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MÌhj»ubhì)�”}”(hŒOR”h]”hŒOR”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÎhj»ubhì)�”}”(hŒ.Configure kgdboc after the kernel has booted::”h]”hŒ-Configure kgdboc after the kernel has booted:”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÐhj»ubjê)�”}”(hŒ/echo kbd > /sys/module/kgdboc/parameters/kgdboc”h]”hŒ/echo kbd > /sys/module/kgdboc/parameters/kgdboc”…”�”}”hj÷sbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MÒhj»ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¸h²hh³hÊh´Nubj‰)�”}”(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 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ì)�”}”(hŒü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.”h]”(hŒ 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 ”…”�”}”(hjh²hh³Nh´NubjË)�”}”(hŒ `SysRq-G`”h]”hŒSysRq-G”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjubhŒ$, which means you must have enabled ”…”�”}”(hjh²hh³Nh´Nubj5)�”}”(hŒ``CONFIG_MAGIC_SYSRQ=y``”h]”hŒCONFIG_MAGIC_SYSRQ=y”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjubhŒ in your kernel config.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÔhj ubj„)�”}”(hhh]”(j‰)�”}”(hŒbWhen logged in as root or with a super user session you can run:: echo g > /proc/sysrq-trigger ”h]”(hì)�”}”(hŒAWhen 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:”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÙhjDubjê)�”}”(hŒecho g > /proc/sysrq-trigger”h]”hŒecho g > /proc/sysrq-trigger”…”�”}”hjVsbah}”(h]”h ]”h"]”h$]”h&]”jùjúuh1jéh³hÊh´MÛhjDubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjAubj‰)�”}”(hŒÂ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` ”h]”(hì)�”}”(hŒ Example using a laptop keyboard:”h]”hŒ Example using a laptop keyboard:”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´MÝhjjubhì)�”}”(hŒPress and hold down: `Alt`”h]”(hŒPress and hold down: ”…”�”}”(hj|h²hh³Nh´NubjË)�”}”(hŒ`Alt`”h]”hŒAlt”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mßhjjubhì)�”}”(hŒPress and hold down: `Fn`”h]”(hŒPress and hold down: ”…”�”}”(hj˜h²hh³Nh´NubjË)�”}”(hŒ`Fn`”h]”hŒFn”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhj˜ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Máhjjubhì)�”}”(hŒ1Press and release the key with the label: `SysRq`”h]”(hŒ*Press and release the key with the label: ”…”�”}”(hj´h²hh³Nh´NubjË)�”}”(hŒ`SysRq`”h]”hŒSysRq”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhj´ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mãhjjubhì)�”}”(hŒ Release: `Fn`”h]”(hŒ Release: ”…”�”}”(hjÐh²hh³Nh´NubjË)�”}”(hŒ`Fn`”h]”hŒFn”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Måhjjubhì)�”}”(hŒPress and release: `g`”h]”(hŒPress and release: ”…”�”}”(hjìh²hh³Nh´NubjË)�”}”(hŒ`g`”h]”hŒg”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjìubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mçhjjubhì)�”}”(hŒRelease: `Alt`”h]”(hŒ Release: ”…”�”}”(hjh²hh³Nh´NubjË)�”}”(hŒ`Alt`”h]”hŒAlt”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Méhjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjAubj‰)�”}”(hŒ�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ì)�”}”(hŒ%Example using a PS/2 101-key keyboard”h]”hŒ%Example using a PS/2 101-key keyboard”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mëhj*ubhì)�”}”(hŒPress and hold down: `Alt`”h]”(hŒPress and hold down: ”…”�”}”(hj<h²hh³Nh´NubjË)�”}”(hŒ`Alt`”h]”hŒAlt”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhj<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Míhj*ubhì)�”}”(hŒ1Press and release the key with the label: `SysRq`”h]”(hŒ*Press and release the key with the label: ”…”�”}”(hjXh²hh³Nh´NubjË)�”}”(hŒ`SysRq`”h]”hŒSysRq”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjXubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mïhj*ubhì)�”}”(hŒPress and release: `g`”h]”(hŒPress and release: ”…”�”}”(hjth²hh³Nh´NubjË)�”}”(hŒ`g`”h]”hŒg”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhjtubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mñhj*ubhì)�”}”(hŒRelease: `Alt`”h]”(hŒ Release: ”…”�”}”(hj�h²hh³Nh´NubjË)�”}”(hŒ`Alt`”h]”hŒAlt”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÊhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Móhj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjAubeh}”(h]”h ]”h"]”h$]”h&]”jÀjÁuh1jƒh³hÊh´MÙhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¸h²hh³Nh´Nubj‰)�”}”(hŒfNow type in a kdb command such as ``help``, ``dmesg``, ``bt`` or ``go`` to continue kernel execution. ”h]”hì)�”}”(hŒeNow 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 ”…”�”}”(hjÂh²hh³Nh´Nubj5)�”}”(hŒ``help``”h]”hŒhelp”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÂubhŒ, ”…”�”}”(hjÂh²hh³Nh´Nubj5)�”}”(hŒ ``dmesg``”h]”hŒdmesg”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÂubhŒ, ”…”�”}”hjÂsbj5)�”}”(hŒ``bt``”h]”hŒbt”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÂubhŒ or ”…”�”}”(hjÂh²hh³Nh´Nubj5)�”}”(hŒ``go``”h]”hŒgo”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j4hjÂubhŒ to continue kernel execution.”…”�”}”(hjÂh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mõhj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj¸h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jñjòjóhjôjõuh1j1hj™h²hh³hÊh´MÊubeh}”(h]”Œ6quick-start-for-kdb-using-a-keyboard-connected-console”ah ]”h"]”Œ6quick start for kdb using a keyboard connected console”ah$]”h&]”uh1hµhju h²hh³hÊh´MÆubeh}”(h]”Œ using-kdb”ah ]”h"]”Œ using kdb”ah$]”h&]”uh1hµhh·h²hh³hÊh´M‡ubh¶)�”}”(hhh]”(h»)�”}”(hŒUsing kgdb / gdb”h]”hŒUsing kgdb / gdb”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj4h²hh³hÊh´Mùubhì)�”}”(hX€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.”h]”hX€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.”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Mûhj4h²hubhì)�”}”(hX¬All 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//parameters/