1dc7d5527SJason Wessel 2e024cbd2SJan Engelhardtconfig HAVE_ARCH_KGDB 3e024cbd2SJan Engelhardt bool 4e024cbd2SJan Engelhardt 5dc7d5527SJason Wesselmenuconfig KGDB 6dcc78711SJason Wessel bool "KGDB: kernel debugger" 7dc7d5527SJason Wessel depends on HAVE_ARCH_KGDB 8525c1f92SKees Cook depends on DEBUG_KERNEL 9dc7d5527SJason Wessel help 10dc7d5527SJason Wessel If you say Y here, it will be possible to remotely debug the 115f5ddfb3SJason Wessel kernel using gdb. It is recommended but not required, that 125f5ddfb3SJason Wessel you also turn on the kernel config option 135f5ddfb3SJason Wessel CONFIG_FRAME_POINTER to aid in producing more reliable stack 145f5ddfb3SJason Wessel backtraces in the external debugger. Documentation of 155f5ddfb3SJason Wessel kernel debugger is available at http://kgdb.sourceforge.net 165f5ddfb3SJason Wessel as well as in DocBook form in Documentation/DocBook/. If 175f5ddfb3SJason Wessel unsure, say N. 18dc7d5527SJason Wessel 19e024cbd2SJan Engelhardtif KGDB 20dc7d5527SJason Wessel 21dc7d5527SJason Wesselconfig KGDB_SERIAL_CONSOLE 22dc7d5527SJason Wessel tristate "KGDB: use kgdb over the serial console" 23dc7d5527SJason Wessel select CONSOLE_POLL 24dc7d5527SJason Wessel select MAGIC_SYSRQ 254f73bc4dSJoe Millenbach depends on TTY 26dc7d5527SJason Wessel default y 27dc7d5527SJason Wessel help 28dc7d5527SJason Wessel Share a serial console with kgdb. Sysrq-g must be used 29dc7d5527SJason Wessel to break in initially. 30e8d31c20SJason Wessel 31e8d31c20SJason Wesselconfig KGDB_TESTS 32e8d31c20SJason Wessel bool "KGDB: internal test suite" 33e8d31c20SJason Wessel default n 34e8d31c20SJason Wessel help 35e8d31c20SJason Wessel This is a kgdb I/O module specifically designed to test 36e8d31c20SJason Wessel kgdb's internal functions. This kgdb I/O module is 37e8d31c20SJason Wessel intended to for the development of new kgdb stubs 38e8d31c20SJason Wessel as well as regression testing the kgdb internals. 39e8d31c20SJason Wessel See the drivers/misc/kgdbts.c for the details about 40e8d31c20SJason Wessel the tests. The most basic of this I/O module is to boot 41e8d31c20SJason Wessel a kernel boot arguments "kgdbwait kgdbts=V1F100" 42974460c5SJason Wessel 43974460c5SJason Wesselconfig KGDB_TESTS_ON_BOOT 44974460c5SJason Wessel bool "KGDB: Run tests on boot" 45974460c5SJason Wessel depends on KGDB_TESTS 46974460c5SJason Wessel default n 47974460c5SJason Wessel help 48974460c5SJason Wessel Run the kgdb tests on boot up automatically without the need 49974460c5SJason Wessel to pass in a kernel parameter 50974460c5SJason Wessel 51974460c5SJason Wesselconfig KGDB_TESTS_BOOT_STRING 52974460c5SJason Wessel string "KGDB: which internal kgdb tests to run" 53974460c5SJason Wessel depends on KGDB_TESTS_ON_BOOT 54974460c5SJason Wessel default "V1F100" 55974460c5SJason Wessel help 56974460c5SJason Wessel This is the command string to send the kgdb test suite on 57974460c5SJason Wessel boot. See the drivers/misc/kgdbts.c for detailed 58974460c5SJason Wessel information about other strings you could use beyond the 59974460c5SJason Wessel default of V1F100. 60e024cbd2SJan Engelhardt 61f503b5aeSJason Wesselconfig KGDB_LOW_LEVEL_TRAP 62f503b5aeSJason Wessel bool "KGDB: Allow debugging with traps in notifiers" 635dd11d5dSJason Wessel depends on X86 || MIPS 64f503b5aeSJason Wessel default n 65f503b5aeSJason Wessel help 66f503b5aeSJason Wessel This will add an extra call back to kgdb for the breakpoint 67*278cee05SMasanari Iida exception handler which will allow kgdb to step through a 68*278cee05SMasanari Iida notify handler. 69f503b5aeSJason Wessel 70dcc78711SJason Wesselconfig KGDB_KDB 71dcc78711SJason Wessel bool "KGDB_KDB: include kdb frontend for kgdb" 72dcc78711SJason Wessel default n 73dcc78711SJason Wessel help 74dcc78711SJason Wessel KDB frontend for kernel 75dcc78711SJason Wessel 76ada64e4cSJason Wesselconfig KDB_KEYBOARD 77ada64e4cSJason Wessel bool "KGDB_KDB: keyboard as input device" 78ada64e4cSJason Wessel depends on VT && KGDB_KDB 79ada64e4cSJason Wessel default n 80ada64e4cSJason Wessel help 81ada64e4cSJason Wessel KDB can use a PS/2 type keyboard for an input device 82ada64e4cSJason Wessel 833b0eb71eSRobert Obermeierconfig KDB_CONTINUE_CATASTROPHIC 843b0eb71eSRobert Obermeier int "KDB: continue after catastrophic errors" 853b0eb71eSRobert Obermeier depends on KGDB_KDB 863b0eb71eSRobert Obermeier default "0" 873b0eb71eSRobert Obermeier help 883b0eb71eSRobert Obermeier This integer controls the behaviour of kdb when the kernel gets a 893b0eb71eSRobert Obermeier catastrophic error, i.e. for a panic or oops. 903b0eb71eSRobert Obermeier When KDB is active and a catastrophic error occurs, nothing extra 913b0eb71eSRobert Obermeier will happen until you type 'go'. 923b0eb71eSRobert Obermeier CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default). The first time 933b0eb71eSRobert Obermeier you type 'go', you will be warned by kdb. The secend time you type 943b0eb71eSRobert Obermeier 'go', KDB tries to continue. No guarantees that the 953b0eb71eSRobert Obermeier kernel is still usable in this situation. 963b0eb71eSRobert Obermeier CONFIG_KDB_CONTINUE_CATASTROPHIC == 1. KDB tries to continue. 973b0eb71eSRobert Obermeier No guarantees that the kernel is still usable in this situation. 983b0eb71eSRobert Obermeier CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. KDB forces a reboot. 993b0eb71eSRobert Obermeier If you are not sure, say 0. 1003b0eb71eSRobert Obermeier 101e024cbd2SJan Engelhardtendif # KGDB 102