2015-09-19 03:13:17 +08:00
|
|
|
# Kconfig - debug configuration options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 Wind River Systems, Inc.
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-09-19 03:13:17 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
menu "Safe memory access"
|
|
|
|
|
|
|
|
config MEM_SAFE
|
|
|
|
bool
|
|
|
|
prompt "Enable safe memory access"
|
|
|
|
default n
|
|
|
|
help
|
2016-04-12 05:18:44 +08:00
|
|
|
Add the routines available in mem_safe.h to the system. This is added
|
|
|
|
as a kconfig option instead of simply linking against the library
|
|
|
|
because some implementations might require initialization.
|
2015-09-19 03:13:17 +08:00
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Safe memory access implementation"
|
2016-04-12 05:19:18 +08:00
|
|
|
depends on MEM_SAFE
|
2015-09-19 03:13:17 +08:00
|
|
|
default MEM_SAFE_CHECK_BOUNDARIES
|
|
|
|
|
|
|
|
config MEM_SAFE_CHECK_BOUNDARIES
|
|
|
|
bool
|
|
|
|
prompt "Software validation of memory access within memory regions"
|
|
|
|
help
|
2016-04-12 05:18:44 +08:00
|
|
|
This implementation checks the application image's text/rodata
|
|
|
|
boundaries for its read-only region and the data/bss/noinit boundaries
|
|
|
|
for its read-write region, in software.
|
2015-09-19 03:13:17 +08:00
|
|
|
|
2016-04-12 05:18:44 +08:00
|
|
|
Other regions can be added as needed by using the
|
|
|
|
sys_mem_safe_region_add() API. The number of regions that can be added
|
2017-04-10 22:29:25 +08:00
|
|
|
is controlled via the MEM_SAFE_NUM_EXTRA_REGIONS kconfig option.
|
2015-09-19 03:13:17 +08:00
|
|
|
|
|
|
|
This implementation requires initialization and thus consumes some boot
|
|
|
|
time.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config MEM_SAFE_NUM_EXTRA_REGIONS
|
|
|
|
int
|
2016-04-12 05:18:44 +08:00
|
|
|
prompt "Number of safe memory access regions to be added at runtime"
|
2015-09-19 03:13:17 +08:00
|
|
|
depends on MEM_SAFE_CHECK_BOUNDARIES
|
|
|
|
default 0
|
|
|
|
help
|
2016-04-12 05:18:44 +08:00
|
|
|
The functions available in mem_safe.h check if memory is within
|
|
|
|
read-only or read-write regions before accessing it instead of crashing.
|
|
|
|
The kernel image is added as a valid region automatically, but other
|
|
|
|
regions can be added if the application makes access to additional
|
|
|
|
memory outside of the image's boundaries.
|
2015-09-19 03:13:17 +08:00
|
|
|
|
|
|
|
endmenu
|
2016-04-12 05:44:11 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Generic Debugging Options
|
|
|
|
#
|
|
|
|
config DEBUG_INFO
|
|
|
|
bool "Enable system debugging information"
|
|
|
|
default n
|
2017-04-03 18:10:23 +08:00
|
|
|
depends on X86
|
2016-04-12 05:44:11 +08:00
|
|
|
help
|
|
|
|
This option enables the addition of various information that can be used
|
|
|
|
by debuggers in debugging the system.
|
|
|
|
|
|
|
|
NOTE: Does not currently work with the x86 IAMCU ABI.
|
debug: add target GDB server
The GDB server implements a set of GDB commands, such as read/write
memory, read/write registers, connect/detach, breakpoints, single-step,
continue. It is not OS-aware, and thus provides a 'system-level'
debugging environment, where the system stops when debugging (such as
handling a breakpoint or single-stepping).
It currently only works over a serial line, taking over the
uart_console. If target code prints over the console, the GDB server
intecepts them and does not send the characters directly over the serial
line, but rather wraps them in a packet handled by the GDB client.
Change-Id: Ic4b82e81b5a575831c01af7b476767234fbf74f7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-04-12 05:51:39 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# GDB Server options
|
|
|
|
#
|
|
|
|
|
|
|
|
config GDB_SERVER
|
|
|
|
bool
|
|
|
|
prompt "Enable GDB Server [EXPERIMENTAL]"
|
|
|
|
default n
|
|
|
|
select CACHE_FLUSHING
|
|
|
|
select REBOOT
|
|
|
|
select MEM_SAFE
|
|
|
|
select DEBUG_INFO
|
|
|
|
select UART_CONSOLE_DEBUG_SERVER_HOOKS
|
|
|
|
help
|
|
|
|
This option enables the GDB Server support.
|
|
|
|
|
|
|
|
config GDB_SERVER_MAX_SW_BP
|
|
|
|
int "Maximum number of GDB Server Software breakpoints"
|
|
|
|
default 100
|
|
|
|
depends on GDB_SERVER
|
|
|
|
help
|
|
|
|
This option specifies the maximum number of Software breakpoints
|
|
|
|
|
|
|
|
config GDB_SERVER_INTERRUPT_DRIVEN
|
|
|
|
bool
|
|
|
|
prompt "Enable GDB interrupt mode"
|
|
|
|
default y
|
|
|
|
depends on GDB_SERVER
|
|
|
|
select CONSOLE_HANDLER
|
|
|
|
help
|
|
|
|
This option enables interrupt support for GDB Server.
|
|
|
|
|
|
|
|
config GDB_REMOTE_SERIAL_EXT_NOTIF_PREFIX_STR
|
|
|
|
string
|
|
|
|
prompt "Trigger string for remote serial ext. via notifi. packets"
|
|
|
|
default "WrCons"
|
|
|
|
depends on GDB_SERVER
|
|
|
|
help
|
|
|
|
The value of this option depends on the string the GDB client use to
|
|
|
|
prefix the notification packets.
|
|
|
|
|
|
|
|
config GDB_SERVER_BOOTLOADER
|
|
|
|
bool
|
|
|
|
prompt "Enable the bootloader mode"
|
|
|
|
default n
|
|
|
|
depends on GDB_SERVER
|
|
|
|
help
|
|
|
|
This option enables the bootloader mode of the GDB Server.
|
2017-02-02 02:21:21 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Miscellaneous debugging options
|
|
|
|
#
|
|
|
|
|
|
|
|
config OPENOCD_SUPPORT
|
|
|
|
bool
|
|
|
|
prompt "OpenOCD support [EXPERIMENTAL]"
|
|
|
|
default n
|
|
|
|
select THREAD_MONITOR
|
|
|
|
help
|
|
|
|
This option exports an array of offsets to kernel structs, used by
|
|
|
|
OpenOCD to determine the state of running threads. (This option
|
|
|
|
selects CONFIG_THREAD_MONITOR, so all of its caveats are implied.)
|