blob: 524e33819f32ac334b224dbd48d7cadae5af54ee [file] [log] [blame]
David Howellsb920de12008-02-08 04:19:31 -08001menu "Kernel hacking"
2
3source "lib/Kconfig.debug"
4
5config DEBUG_STACKOVERFLOW
6 bool "Check for stack overflows"
7 depends on DEBUG_KERNEL
8
9config DEBUG_DECOMPRESS_KERNEL
10 bool "Using serial port during decompressing kernel"
11 depends on DEBUG_KERNEL
12 default n
13 help
14 If you say Y here you will confirm the start and the end of
15 decompressing Linux seeing "Uncompressing Linux... " and
16 "Ok, booting the kernel.\n" on console.
17
18config KPROBES
19 bool "Kprobes"
20 depends on DEBUG_KERNEL
21 help
22 Kprobes allows you to trap at almost any kernel address and
23 execute a callback function. register_kprobe() establishes
24 a probepoint and specifies the callback. Kprobes is useful
25 for kernel debugging, non-intrusive instrumentation and testing.
26 If in doubt, say "N".
27
28config GDBSTUB
29 bool "Remote GDB kernel debugging"
30 depends on DEBUG_KERNEL
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
40config GDBSTUB_IMMEDIATE
41 bool "Break into GDB stub immediately"
42 depends on GDBSTUB
43 help
44 If you say Y here, GDB stub will break into the program as soon as
45 possible, leaving the program counter at the beginning of
46 start_kernel() in init/main.c.
47
48config GDB_CONSOLE
49 bool "Console output to GDB"
50 depends on GDBSTUB
51 help
52 If you are using GDB for remote debugging over a serial port and
53 would like kernel messages to be formatted into GDB $O packets so
54 that GDB prints them as program output, say 'Y'.
55
56config GDBSTUB_DEBUGGING
57 bool "Debug GDB stub by messages to serial port"
58 depends on GDBSTUB
59 help
60 This causes debugging messages to be displayed at various points
61 during execution of the GDB stub routines. Such messages will be
62 displayed on ttyS0 if that isn't the GDB stub's port, or ttySM0
63 otherwise.
64
65config GDBSTUB_DEBUG_ENTRY
66 bool "Debug GDB stub entry"
67 depends on GDBSTUB_DEBUGGING
68 help
69 This option causes information to be displayed about entry to or exit
70 from the main GDB stub routine.
71
72config GDBSTUB_DEBUG_PROTOCOL
73 bool "Debug GDB stub protocol"
74 depends on GDBSTUB_DEBUGGING
75 help
76 This option causes information to be displayed about the GDB remote
77 protocol messages generated exchanged with GDB.
78
79config GDBSTUB_DEBUG_IO
80 bool "Debug GDB stub I/O"
81 depends on GDBSTUB_DEBUGGING
82 help
83 This option causes information to be displayed about GDB stub's
84 low-level I/O.
85
86config GDBSTUB_DEBUG_BREAKPOINT
87 bool "Debug GDB stub breakpoint management"
88 depends on GDBSTUB_DEBUGGING
89 help
90 This option causes information to be displayed about GDB stub's
91 breakpoint management.
92
93choice
94 prompt "GDB stub port"
95 default GDBSTUB_TTYSM0
96 depends on GDBSTUB
97 help
98 Select the serial port used for GDB-stub.
99
100config GDBSTUB_ON_TTYSM0
101 bool "/dev/ttySM0 [SIF0]"
102 depends on MN10300_TTYSM0
103 select GDBSTUB_ON_TTYSMx
104
105config GDBSTUB_ON_TTYSM1
106 bool "/dev/ttySM1 [SIF1]"
107 depends on MN10300_TTYSM1
108 select GDBSTUB_ON_TTYSMx
109
110config GDBSTUB_ON_TTYSM2
111 bool "/dev/ttySM2 [SIF2]"
112 depends on MN10300_TTYSM2
113 select GDBSTUB_ON_TTYSMx
114
115config GDBSTUB_ON_TTYS0
116 bool "/dev/ttyS0"
117 select GDBSTUB_ON_TTYSx
118
119config GDBSTUB_ON_TTYS1
120 bool "/dev/ttyS1"
121 select GDBSTUB_ON_TTYSx
122
123endchoice
124
125config GDBSTUB_ON_TTYSMx
126 bool
127 depends on GDBSTUB_ON_TTYSM0 || GDBSTUB_ON_TTYSM1 || GDBSTUB_ON_TTYSM2
128 default y
129
130config GDBSTUB_ON_TTYSx
131 bool
132 depends on GDBSTUB_ON_TTYS0 || GDBSTUB_ON_TTYS1
133 default y
134
135endmenu