zephyr/arch/arm/core/aarch32
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
..
cortex_a_r arm: remove custom k_thread_abort() for Cortex-R 2020-08-18 08:36:35 +02:00
cortex_m arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
__aeabi_atexit.c
CMakeLists.txt arch/arm/aarch32: add IRQ relay mechanism to ARMv7/8-M 2020-07-14 16:17:30 +02:00
cpu_idle.S arch: arm: aarch32: correct documentation of arch_cpu_atomic_idle 2020-03-20 11:53:14 +01:00
fatal.c arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
irq_manage.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
irq_offload.c
irq_relay.S arch: arm: Export vector table symbols with GDATA instead of GTEXT 2020-07-24 12:04:28 +02:00
isr_wrapper.S arch: arm: aarch32: Fix read_timer_end_of_isr register preservation 2020-04-15 15:49:27 +02:00
Kconfig arch: arm: Collect full register state in Cortex-M Exception Stack Frame 2020-08-31 10:13:27 +02:00
nmi_on_reset.S
nmi.c arch: arm: aarch32: Fix incorrect z_arm_{int,exc}_exit usage 2020-04-20 18:22:46 +02:00
prep_c.c arch: arm: aarch32: Always use VTOR when it is available 2020-07-14 16:17:30 +02:00
swap_helper.S arch: arm: aarch32: add support for Cortex-M1 2020-08-14 13:35:39 -05:00
swap.c
thread.c arch: arm: cortex-m: hw stack protection under no multi-threading 2020-08-07 13:06:04 +02:00
userspace.S arch: arm: userspace: lock swap to set PSP, PSPLIM in userspace enter 2020-02-19 12:19:43 -08:00
vector_table.ld arch: arm: cortex_m: align vector table based on VTOR requirements 2020-07-14 13:03:25 +02:00