zephyr/arch
Mark Holden 8bd4f244b0 coredump: ARM: Ensure sp in dump is set as gdb expects
Gdb is typically able to reconstruct the first two frames of the
failing stack using the "pc" and "lr" registers. After that, (if
the frame pointer is omitted) it appears to need the stack pointer
(sp register) to point to the top of the stack before a fatal
error occurred.

The ARM Cortex-M processors push registers r0-r3, r12, LR,
{possibly FPU registers}, PC, SPSR onto the stack before entering the
exception handler. We adjust the stack pointer back to the point
before these registers were pushed for preservation in the dump.

During k_oops/k_panic, the sp wasn't stored in the core dump at all.
Apply similar logic to store it when failures occur in that path.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-11-06 10:17:59 -08:00
..
arc Revert "arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK" 2024-10-22 18:28:37 -04:00
arm coredump: ARM: Ensure sp in dump is set as gdb expects 2024-11-06 10:17:59 -08:00
arm64 arch: arm64: init xen in arch_kernel_init() 2024-09-17 20:05:22 -04:00
common Revert "arch: common: Add user can specify the nocache location" 2024-10-04 22:52:31 +01:00
mips arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
nios2 arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
posix arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
riscv arch: riscv: smp: prevent nested #ifdef 2024-10-04 10:50:14 +01:00
sparc arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
x86 arch: x86_64: re-enable -mno-red-zone 2024-09-24 10:11:15 +02:00
xtensa cmake: toolchain/xcc,xt-clang: env vars for multiple cores 2024-10-31 09:26:00 -05:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig x86: add support for on-demand mappings 2024-09-23 18:10:38 -04:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00