| .. | .. |
|---|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | |
|---|
| 2 | 3 | config HAVE_ARCH_KGDB |
|---|
| 4 | + bool |
|---|
| 5 | + |
|---|
| 6 | +# set if architecture has the its kgdb_arch_handle_qxfer_pkt |
|---|
| 7 | +# function to enable gdb stub to address XML packet sent from GDB. |
|---|
| 8 | +config HAVE_ARCH_KGDB_QXFER_PKT |
|---|
| 3 | 9 | bool |
|---|
| 4 | 10 | |
|---|
| 5 | 11 | menuconfig KGDB |
|---|
| .. | .. |
|---|
| 17 | 23 | unsure, say N. |
|---|
| 18 | 24 | |
|---|
| 19 | 25 | if KGDB |
|---|
| 26 | + |
|---|
| 27 | +config KGDB_HONOUR_BLOCKLIST |
|---|
| 28 | + bool "KGDB: use kprobe blocklist to prohibit unsafe breakpoints" |
|---|
| 29 | + depends on HAVE_KPROBES |
|---|
| 30 | + depends on MODULES |
|---|
| 31 | + select KPROBES |
|---|
| 32 | + default y |
|---|
| 33 | + help |
|---|
| 34 | + If set to Y the debug core will use the kprobe blocklist to |
|---|
| 35 | + identify symbols where it is unsafe to set breakpoints. |
|---|
| 36 | + In particular this disallows instrumentation of functions |
|---|
| 37 | + called during debug trap handling and thus makes it very |
|---|
| 38 | + difficult to inadvertently provoke recursive trap handling. |
|---|
| 39 | + |
|---|
| 40 | + If unsure, say Y. |
|---|
| 20 | 41 | |
|---|
| 21 | 42 | config KGDB_SERIAL_CONSOLE |
|---|
| 22 | 43 | tristate "KGDB: use kgdb over the serial console" |
|---|
| .. | .. |
|---|
| 63 | 84 | depends on X86 || MIPS |
|---|
| 64 | 85 | default n |
|---|
| 65 | 86 | help |
|---|
| 66 | | - This will add an extra call back to kgdb for the breakpoint |
|---|
| 67 | | - exception handler which will allow kgdb to step through a |
|---|
| 68 | | - notify handler. |
|---|
| 87 | + This will add an extra call back to kgdb for the breakpoint |
|---|
| 88 | + exception handler which will allow kgdb to step through a |
|---|
| 89 | + notify handler. |
|---|
| 69 | 90 | |
|---|
| 70 | 91 | config KGDB_KDB |
|---|
| 71 | 92 | bool "KGDB_KDB: include kdb frontend for kgdb" |
|---|
| .. | .. |
|---|
| 95 | 116 | |
|---|
| 96 | 117 | The config option merely sets the default at boot time. Both |
|---|
| 97 | 118 | issuing 'echo X > /sys/module/kdb/parameters/cmd_enable' or |
|---|
| 98 | | - setting with kdb.cmd_enable=X kernel command line option will |
|---|
| 119 | + setting with kdb.cmd_enable=X kernel command line option will |
|---|
| 99 | 120 | override the default settings. |
|---|
| 100 | 121 | |
|---|
| 101 | 122 | config KDB_KEYBOARD |
|---|
| .. | .. |
|---|
| 123 | 144 | CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. KDB forces a reboot. |
|---|
| 124 | 145 | If you are not sure, say 0. |
|---|
| 125 | 146 | |
|---|
| 147 | +config ARCH_HAS_EARLY_DEBUG |
|---|
| 148 | + bool |
|---|
| 149 | + default n |
|---|
| 150 | + help |
|---|
| 151 | + If an architecture can definitely handle entering the debugger |
|---|
| 152 | + when early_param's are parsed then it select this config. |
|---|
| 153 | + Otherwise, if "kgdbwait" is passed on the kernel command line it |
|---|
| 154 | + won't actually be processed until dbg_late_init() just after the |
|---|
| 155 | + call to kgdb_arch_late() is made. |
|---|
| 156 | + |
|---|
| 157 | + NOTE: Even if this isn't selected by an architecture we will |
|---|
| 158 | + still try to register kgdb to handle breakpoints and crashes |
|---|
| 159 | + when early_param's are parsed, we just won't act on the |
|---|
| 160 | + "kgdbwait" parameter until dbg_late_init(). If you get a |
|---|
| 161 | + crash and try to drop into kgdb somewhere between these two |
|---|
| 162 | + places you might or might not end up being able to use kgdb |
|---|
| 163 | + depending on exactly how far along the architecture has initted. |
|---|
| 164 | + |
|---|
| 126 | 165 | endif # KGDB |
|---|