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