zephyr/arch
Chris Coleman 99a268fa16 arch: arm: Collect full register state in Cortex-M Exception Stack Frame
To debug hard-to-reproduce faults/panics, it's helpful to get the full
register state at the time a fault occurred. This enables recovering
full backtraces and the state of local variables at the time of a
crash.

This PR introduces a new Kconfig option, CONFIG_EXTRA_EXCEPTION_INFO,
to facilitate this use case. The option enables the capturing of the
callee-saved register state (r4-r11 & exc_return) during a fault. The
info is forwarded to `k_sys_fatal_error_handler` in the z_arch_esf_t
parameter. From there, the data can be saved for post-mortem analysis.

To test the functionality a new unit test was added to
tests/arch/arm_interrupt which verifies the register contents passed
in the argument match the state leading up to a crash.

Signed-off-by: Chris Coleman <chris@memfault.com>
2020-08-31 10:13:27 +02:00
..
arc arc: Fix for undefined shift behavior (CID 211523) 2020-08-27 07:53:49 -04:00
arm arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
common config: Rename TEXT_SECTION_OFFSET to ROM_START_OFFSET 2020-07-09 14:02:38 -04:00
nios2 arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
posix tracing: posix_arch: trace swap 2020-08-24 13:21:12 +02:00
riscv tracing: riscv: fix tracing of context switch 2020-08-24 13:21:12 +02:00
x86 x86: paging code rewrite 2020-08-25 15:49:59 -04:00
xtensa tracing: swap: cleanup trace points and their location 2020-08-24 13:21:12 +02:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00