Kconfig.debug 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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
  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. config GDBSTUB_IMMEDIATE
  43. bool "Break into GDB stub immediately"
  44. depends on GDBSTUB
  45. help
  46. If you say Y here, GDB stub will break into the program as soon as
  47. possible, leaving the program counter at the beginning of
  48. start_kernel() in init/main.c.
  49. config GDBSTUB_ALLOW_SINGLE_STEP
  50. bool "Allow software single-stepping in GDB stub"
  51. depends on GDBSTUB && !SMP && !PREEMPT
  52. help
  53. Allow GDB stub to perform software single-stepping through the
  54. kernel. This doesn't work very well on SMP or preemptible kernels as
  55. it uses temporary breakpoints to emulate single-stepping.
  56. config GDB_CONSOLE
  57. bool "Console output to GDB"
  58. depends on GDBSTUB
  59. help
  60. If you are using GDB for remote debugging over a serial port and
  61. would like kernel messages to be formatted into GDB $O packets so
  62. that GDB prints them as program output, say 'Y'.
  63. config GDBSTUB_DEBUGGING
  64. bool "Debug GDB stub by messages to serial port"
  65. depends on GDBSTUB
  66. help
  67. This causes debugging messages to be displayed at various points
  68. during execution of the GDB stub routines. Such messages will be
  69. displayed on ttyS0 if that isn't the GDB stub's port, or ttySM0
  70. otherwise.
  71. config GDBSTUB_DEBUG_ENTRY
  72. bool "Debug GDB stub entry"
  73. depends on GDBSTUB_DEBUGGING
  74. help
  75. This option causes information to be displayed about entry to or exit
  76. from the main GDB stub routine.
  77. config GDBSTUB_DEBUG_PROTOCOL
  78. bool "Debug GDB stub protocol"
  79. depends on GDBSTUB_DEBUGGING
  80. help
  81. This option causes information to be displayed about the GDB remote
  82. protocol messages generated exchanged with GDB.
  83. config GDBSTUB_DEBUG_IO
  84. bool "Debug GDB stub I/O"
  85. depends on GDBSTUB_DEBUGGING
  86. help
  87. This option causes information to be displayed about GDB stub's
  88. low-level I/O.
  89. config GDBSTUB_DEBUG_BREAKPOINT
  90. bool "Debug GDB stub breakpoint management"
  91. depends on GDBSTUB_DEBUGGING
  92. help
  93. This option causes information to be displayed about GDB stub's
  94. breakpoint management.
  95. choice
  96. prompt "GDB stub port"
  97. default GDBSTUB_ON_TTYSM0
  98. depends on GDBSTUB
  99. help
  100. Select the serial port used for GDB-stub.
  101. config GDBSTUB_ON_TTYSM0
  102. bool "/dev/ttySM0 [SIF0]"
  103. depends on MN10300_TTYSM0
  104. select GDBSTUB_ON_TTYSMx
  105. config GDBSTUB_ON_TTYSM1
  106. bool "/dev/ttySM1 [SIF1]"
  107. depends on MN10300_TTYSM1
  108. select GDBSTUB_ON_TTYSMx
  109. config GDBSTUB_ON_TTYSM2
  110. bool "/dev/ttySM2 [SIF2]"
  111. depends on MN10300_TTYSM2
  112. select GDBSTUB_ON_TTYSMx
  113. config GDBSTUB_ON_TTYS0
  114. bool "/dev/ttyS0"
  115. select GDBSTUB_ON_TTYSx
  116. config GDBSTUB_ON_TTYS1
  117. bool "/dev/ttyS1"
  118. select GDBSTUB_ON_TTYSx
  119. endchoice
  120. config GDBSTUB_ON_TTYSMx
  121. bool
  122. depends on GDBSTUB_ON_TTYSM0 || GDBSTUB_ON_TTYSM1 || GDBSTUB_ON_TTYSM2
  123. default y
  124. config GDBSTUB_ON_TTYSx
  125. bool
  126. depends on GDBSTUB_ON_TTYS0 || GDBSTUB_ON_TTYS1
  127. default y
  128. endmenu
  129. config KERNEL_DEBUGGER
  130. def_bool y
  131. depends on GDBSTUB || KGDB