Kconfig.debug 4.3 KB

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