gdb/arm: Add support for multiple stack pointers on Cortex-M
authorChristophe Lyon <christophe.lyon@arm.com>
Fri, 1 Apr 2022 09:22:16 +0000 (10:22 +0100)
committerChristophe Lyon <christophe.lyon@arm.com>
Wed, 27 Apr 2022 14:18:18 +0000 (15:18 +0100)
commitae7e2f45aa4798be449f282bbf75ad41e73f055e
tree9f22bd3ae6c6e9dd732f1bb7a10d22e6693d1cc9
parent0824193fd31467b6ff39132d0d72aaa9c01cc9aa
gdb/arm: Add support for multiple stack pointers on Cortex-M

Armv8-M architecture with Security extension features four stack pointers
to handle Secure and Non-secure modes.

This patch adds support to switch between them as needed during
unwinding, and replaces all updates of cache->prev_sp with calls to
arm_cache_set_prev_sp.

Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@foss.st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@arm.com>
gdb/arm-tdep.c
gdb/arm-tdep.h
gdb/features/arm/arm-secext.c [new file with mode: 0644]
gdb/features/arm/arm-secext.xml [new file with mode: 0644]