mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos: Move the "set debug watchpoint as stack overflow check" out of debugging internals
Place it near the other stack overflow kconfig items, instead.
This commit is contained in:
parent
3050f06a8d
commit
47a5851d45
@ -76,6 +76,24 @@ config FREERTOS_CHECK_STACKOVERFLOW_CANARY
|
|||||||
(configCHECK_FOR_STACK_OVERFLOW=2)
|
(configCHECK_FOR_STACK_OVERFLOW=2)
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
config FREERTOS_WATCHPOINT_END_OF_STACK
|
||||||
|
bool "Set a debug watchpoint as a stack overflow check"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
FreeRTOS can check if a stack has overflown its bounds by checking either the value of
|
||||||
|
the stack pointer or by checking the integrity of canary bytes. (See FREERTOS_CHECK_STACKOVERFLOW
|
||||||
|
for more information.) These checks only happen on a context switch, and the situation that caused
|
||||||
|
the stack overflow may already be long gone by then. This option will use the debug memory
|
||||||
|
watchpoint 1 (the second one) to allow breaking into the debugger (or panic'ing) as soon as any
|
||||||
|
of the last 32 bytes on the stack of a task are overwritten. The side effect is that using gdb, you
|
||||||
|
effectively only have one watchpoint; the 2nd one is overwritten as soon as a task switch happens.
|
||||||
|
|
||||||
|
This check only triggers if the stack overflow writes within 4 bytes of the end of the stack, rather than
|
||||||
|
overshooting further, so it is worth combining this approach with one of the other stack overflow check methods.
|
||||||
|
|
||||||
|
When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no OCD is attached, esp-idf
|
||||||
|
will panic on an unhandled debug exception.
|
||||||
|
|
||||||
config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
|
config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
|
||||||
int "Amount of thread local storage pointers"
|
int "Amount of thread local storage pointers"
|
||||||
range 0 256 if !WIFI_ENABLED
|
range 0 256 if !WIFI_ENABLED
|
||||||
@ -203,22 +221,6 @@ config FREERTOS_PORTMUX_DEBUG_RECURSIVE
|
|||||||
portMUX usage.
|
portMUX usage.
|
||||||
endif #FREERTOS_UNICORE
|
endif #FREERTOS_UNICORE
|
||||||
|
|
||||||
|
|
||||||
config FREERTOS_WATCHPOINT_END_OF_STACK
|
|
||||||
bool "Set a debug watchpoint at the end of each stack"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
FreeRTOS can check if a stack has overflown its bounds by checking either the value of
|
|
||||||
the stack pointer or by checking the integrity of canary bytes. (See FREERTOS_CHECK_STACKOVERFLOW
|
|
||||||
for more information.) These checks only happen on a context switch, and the situation that caused
|
|
||||||
the stack overflow may already be long gone by then. This option will use the debug memory
|
|
||||||
watchpoint 1 (the second one) to allow breaking into the debugger (or panic'ing) as soon as any
|
|
||||||
of the last 32 bytes on the stack of a task are overwritten. The side effect is that using gdb, you
|
|
||||||
effectively only have one watchpoint; the 2nd one is overwritten as soon as a task switch happens.
|
|
||||||
|
|
||||||
When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no OCD is attached, esp-idf
|
|
||||||
will panic on an unhandled debug exception.
|
|
||||||
|
|
||||||
endif # FREERTOS_DEBUG_INTERNALS
|
endif # FREERTOS_DEBUG_INTERNALS
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user