]> granicus.if.org Git - esp-idf/commit
esp32: Refactor backtrace and add esp_backtrace_print()
authorDarian Leung <darian@espressif.com>
Thu, 29 Nov 2018 09:06:21 +0000 (17:06 +0800)
committerDarian Leung <darian@espressif.com>
Wed, 19 Jun 2019 10:30:18 +0000 (18:30 +0800)
commit037c079e9a86a54d95b0daa934cd2e8200a7d79b
tree5d9912db9067a36e3a936407f23d078ef6706714
parent28e0a17e0aaf3062e110b36b9509744dead0e22f
esp32: Refactor backtrace and add esp_backtrace_print()

This commit refactors backtracing within the panic handler so that a common
function esp_backtrace_get_next_frame() is used iteratively to traverse a
callstack.

A esp_backtrace_print() function has also be added that allows the printing
of a backtrace at runtime. The esp_backtrace_print() function allows unity to
print the backtrace of failed test cases and jump back to the main test menu
without the need reset the chip. esp_backtrace_print() can also be used as a
debugging function by users.

- esp_stack_ptr_is_sane() moved to soc_memory_layout.h
- removed uncessary includes of "esp_debug_helpers.h"
17 files changed:
components/esp32/cpu_start.c
components/esp32/gdbstub.c
components/esp32/panic.c
components/espcoredump/src/core_dump_port.c
components/freertos/tasks.c
components/heap/test/test_malloc.c
components/soc/esp32/include/soc/cpu.h
components/soc/include/soc/soc_memory_layout.h
components/unity/CMakeLists.txt
components/unity/Kconfig
components/unity/component.mk
components/unity/include/priv/setjmp.h [new file with mode: 0644]
components/xtensa/CMakeLists.txt
components/xtensa/debug_helpers.c [new file with mode: 0644]
components/xtensa/debug_helpers_asm.S [new file with mode: 0644]
components/xtensa/include/esp_debug_helpers.h
tools/unit-test-app/sdkconfig.defaults