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
nios2 arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
posix
riscv
x86 x86: paging code rewrite 2020-08-25 15:49:59 -04:00
xtensa
CMakeLists.txt
Kconfig arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00