Kconfig.debug 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config DEBUG_STACKOVERFLOW
  4. bool "Check for stack overflows"
  5. depends on DEBUG_KERNEL
  6. config DEBUG_DECOMPRESS_KERNEL
  7. bool "Using serial port during decompressing kernel"
  8. depends on DEBUG_KERNEL
  9. default n
  10. help
  11. If you say Y here you will confirm the start and the end of
  12. decompressing Linux seeing "Uncompressing Linux... " and
  13. "Ok, booting the kernel.\n" on console.
  14. config TEST_MISALIGNMENT_HANDLER
  15. bool "Run tests on the misalignment handler"
  16. depends on DEBUG_KERNEL
  17. default n
  18. help
  19. If you say Y here the kernel will execute a list of misaligned memory
  20. accesses to make sure the misalignment handler deals them with
  21. correctly. If it does not, the kernel will throw a BUG.
  22. config KPROBES
  23. bool "Kprobes"
  24. depends on DEBUG_KERNEL
  25. help
  26. Kprobes allows you to trap at almost any kernel address and
  27. execute a callback function. register_kprobe() establishes
  28. a probepoint and specifies the callback. Kprobes is useful
  29. for kernel debugging, non-intrusive instrumentation and testing.
  30. If in doubt, say "N".
  31. config GDBSTUB
  32. bool "Remote GDB kernel debugging"
  33. depends on DEBUG_KERNEL && DEPRECATED
  34. select DEBUG_INFO
  35. select FRAME_POINTER
  36. help
  37. If you say Y here, it will be possible to remotely debug the kernel
  38. using gdb. This enlarges your kernel ELF image disk size by several
  39. megabytes and requires a machine with more than 16 MB, better 32 MB
  40. RAM to avoid excessive linking time. This is only useful for kernel
  41. hackers. If unsure, say N.
  42. This is deprecated in favour of KGDB and will be removed in a later
  43. version.
  44. config GDBSTUB_IMMEDIATE
  45. bool "Break into GDB stub immediately"
  46. depends on GDBSTUB
  47. help
  48. If you say Y here, GDB stub will break into the program as soon as
  49. possible, leaving the program counter at the beginning of
  50. start_kernel() in init/main.c.
  51. config GDBSTUB_ALLOW_SINGLE_STEP
  52. bool "Allow software single-stepping in GDB stub"
  53. depends on GDBSTUB && !SMP && !PREEMPT
  54. help
  55. Allow GDB stub to perform software single-stepping through the
  56. kernel. This doesn't work very well on SMP or preemptible kernels as
  57. it uses temporary breakpoints to emulate single-stepping.
  58. config GDB_CONSOLE
  59. bool "Console output to GDB"
  60. depends on GDBSTUB
  61. help
  62. If you are using GDB for remote debugging over a serial port and
  63. would like kernel messages to be formatted into GDB $O packets so
  64. that GDB prints them as program output, say 'Y'.
  65. config GDBSTUB_DEBUGGING
  66. bool "Debug GDB stub by messages to serial port"
  67. depends on GDBSTUB
  68. help
  69. This causes debugging messages to be displayed at various points
  70. during execution of the GDB stub routines. Such messages will be
  71. displayed on ttyS0 if that isn't the GDB stub's port, or ttySM0
  72. otherwise.
  73. config GDBSTUB_DEBUG_ENTRY
  74. bool "Debug GDB stub entry"
  75. depends on GDBSTUB_DEBUGGING
  76. help
  77. This option causes information to be displayed about entry to or exit
  78. from the main GDB stub routine.
  79. config GDBSTUB_DEBUG_PROTOCOL
  80. bool "Debug GDB stub protocol"
  81. depends on GDBSTUB_DEBUGGING
  82. help
  83. This option causes information to be displayed about the GDB remote
  84. protocol messages generated exchanged with GDB.
  85. config GDBSTUB_DEBUG_IO
  86. bool "Debug GDB stub I/O"
  87. depends on GDBSTUB_DEBUGGING
  88. help
  89. This option causes information to be displayed about GDB stub's
  90. low-level I/O.
  91. config GDBSTUB_DEBUG_BREAKPOINT
  92. bool "Debug GDB stub breakpoint management"
  93. depends on GDBSTUB_DEBUGGING
  94. help
  95. This option causes information to be displayed about GDB stub's
  96. breakpoint management.
  97. choice
  98. prompt "GDB stub port"
  99. default GDBSTUB_ON_TTYSM0
  100. depends on GDBSTUB
  101. help
  102. Select the serial port used for GDB-stub.
  103. config GDBSTUB_ON_TTYSM0
  104. bool "/dev/ttySM0 [SIF0]"
  105. depends on MN10300_TTYSM0
  106. select GDBSTUB_ON_TTYSMx
  107. config GDBSTUB_ON_TTYSM1
  108. bool "/dev/ttySM1 [SIF1]"
  109. depends on MN10300_TTYSM1
  110. select GDBSTUB_ON_TTYSMx
  111. config GDBSTUB_ON_TTYSM2
  112. bool "/dev/ttySM2 [SIF2]"
  113. depends on MN10300_TTYSM2
  114. select GDBSTUB_ON_TTYSMx
  115. config GDBSTUB_ON_TTYS0
  116. bool "/dev/ttyS0"
  117. select GDBSTUB_ON_TTYSx
  118. config GDBSTUB_ON_TTYS1
  119. bool "/dev/ttyS1"
  120. select GDBSTUB_ON_TTYSx
  121. endchoice
  122. config GDBSTUB_ON_TTYSMx
  123. bool
  124. depends on GDBSTUB_ON_TTYSM0 || GDBSTUB_ON_TTYSM1 || GDBSTUB_ON_TTYSM2
  125. default y
  126. config GDBSTUB_ON_TTYSx
  127. bool
  128. depends on GDBSTUB_ON_TTYS0 || GDBSTUB_ON_TTYS1
  129. default y
  130. endmenu
  131. config KERNEL_DEBUGGER
  132. def_bool y
  133. depends on GDBSTUB || KGDB