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