Kconfig.kgdb 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. config HAVE_ARCH_KGDB
  2. bool
  3. menuconfig KGDB
  4. bool "KGDB: kernel debugger"
  5. depends on HAVE_ARCH_KGDB
  6. depends on DEBUG_KERNEL
  7. help
  8. If you say Y here, it will be possible to remotely debug the
  9. kernel using gdb. It is recommended but not required, that
  10. you also turn on the kernel config option
  11. CONFIG_FRAME_POINTER to aid in producing more reliable stack
  12. backtraces in the external debugger. Documentation of
  13. kernel debugger is available at http://kgdb.sourceforge.net
  14. as well as in Documentation/dev-tools/kgdb.rst. If
  15. unsure, say N.
  16. if KGDB
  17. config KGDB_SERIAL_CONSOLE
  18. tristate "KGDB: use kgdb over the serial console"
  19. select CONSOLE_POLL
  20. select MAGIC_SYSRQ
  21. depends on TTY && HW_CONSOLE
  22. default y
  23. help
  24. Share a serial console with kgdb. Sysrq-g must be used
  25. to break in initially.
  26. config KGDB_TESTS
  27. bool "KGDB: internal test suite"
  28. default n
  29. help
  30. This is a kgdb I/O module specifically designed to test
  31. kgdb's internal functions. This kgdb I/O module is
  32. intended to for the development of new kgdb stubs
  33. as well as regression testing the kgdb internals.
  34. See the drivers/misc/kgdbts.c for the details about
  35. the tests. The most basic of this I/O module is to boot
  36. a kernel boot arguments "kgdbwait kgdbts=V1F100"
  37. config KGDB_TESTS_ON_BOOT
  38. bool "KGDB: Run tests on boot"
  39. depends on KGDB_TESTS
  40. default n
  41. help
  42. Run the kgdb tests on boot up automatically without the need
  43. to pass in a kernel parameter
  44. config KGDB_TESTS_BOOT_STRING
  45. string "KGDB: which internal kgdb tests to run"
  46. depends on KGDB_TESTS_ON_BOOT
  47. default "V1F100"
  48. help
  49. This is the command string to send the kgdb test suite on
  50. boot. See the drivers/misc/kgdbts.c for detailed
  51. information about other strings you could use beyond the
  52. default of V1F100.
  53. config KGDB_LOW_LEVEL_TRAP
  54. bool "KGDB: Allow debugging with traps in notifiers"
  55. depends on X86 || MIPS
  56. default n
  57. help
  58. This will add an extra call back to kgdb for the breakpoint
  59. exception handler which will allow kgdb to step through a
  60. notify handler.
  61. config KGDB_KDB
  62. bool "KGDB_KDB: include kdb frontend for kgdb"
  63. default n
  64. help
  65. KDB frontend for kernel
  66. config KDB_DEFAULT_ENABLE
  67. hex "KDB: Select kdb command functions to be enabled by default"
  68. depends on KGDB_KDB
  69. default 0x1
  70. help
  71. Specifiers which kdb commands are enabled by default. This may
  72. be set to 1 or 0 to enable all commands or disable almost all
  73. commands.
  74. Alternatively the following bitmask applies:
  75. 0x0002 - allow arbitrary reads from memory and symbol lookup
  76. 0x0004 - allow arbitrary writes to memory
  77. 0x0008 - allow current register state to be inspected
  78. 0x0010 - allow current register state to be modified
  79. 0x0020 - allow passive inspection (backtrace, process list, lsmod)
  80. 0x0040 - allow flow control management (breakpoint, single step)
  81. 0x0080 - enable signalling of processes
  82. 0x0100 - allow machine to be rebooted
  83. The config option merely sets the default at boot time. Both
  84. issuing 'echo X > /sys/module/kdb/parameters/cmd_enable' or
  85. setting with kdb.cmd_enable=X kernel command line option will
  86. override the default settings.
  87. config KDB_KEYBOARD
  88. bool "KGDB_KDB: keyboard as input device"
  89. depends on VT && KGDB_KDB
  90. default n
  91. help
  92. KDB can use a PS/2 type keyboard for an input device
  93. config KDB_CONTINUE_CATASTROPHIC
  94. int "KDB: continue after catastrophic errors"
  95. depends on KGDB_KDB
  96. default "0"
  97. help
  98. This integer controls the behaviour of kdb when the kernel gets a
  99. catastrophic error, i.e. for a panic or oops.
  100. When KDB is active and a catastrophic error occurs, nothing extra
  101. will happen until you type 'go'.
  102. CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default). The first time
  103. you type 'go', you will be warned by kdb. The secend time you type
  104. 'go', KDB tries to continue. No guarantees that the
  105. kernel is still usable in this situation.
  106. CONFIG_KDB_CONTINUE_CATASTROPHIC == 1. KDB tries to continue.
  107. No guarantees that the kernel is still usable in this situation.
  108. CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. KDB forces a reboot.
  109. If you are not sure, say 0.
  110. endif # KGDB