]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/arm: Extend arm_m_addr_is_magic to support FNC_RETURN, add unwind-secure-frames...
authorChristophe Lyon <christophe.lyon@arm.com>
Fri, 1 Apr 2022 09:22:28 +0000 (10:22 +0100)
committerChristophe Lyon <christophe.lyon@arm.com>
Wed, 27 Apr 2022 14:18:18 +0000 (15:18 +0100)
commitef273377587d440f4aa248265147d5e75f86a018
tree0f7a7056cb9954cdd0ecda587c5e03966971d5d0
parentae7e2f45aa4798be449f282bbf75ad41e73f055e
gdb/arm: Extend arm_m_addr_is_magic to support FNC_RETURN, add unwind-secure-frames command

This patch makes use of the support for several stack pointers
introduced by the previous patch to switch between them as needed
during unwinding.

It introduces a new 'unwind-secure-frames' arm command to enable/disable
mode switching during unwinding. It is enabled by default.

It has been tested using an STM32L5 board (with cortex-m33) and the
sample applications shipped with the STM32Cube development
environment: GTZC_TZSC_MPCBB_TrustZone in
STM32CubeL5/Projects/NUCLEO-L552ZE-Q/Examples/GTZC.

The test consisted in setting breakpoints in various places and check
that the backtrace is correct: SecureFault_Callback (Non-secure mode),
__gnu_cmse_nonsecure_call (before and after the vpush instruction),
SecureFault_Handler (Secure mode).

This implies that we tested only some parts of this patch (only MSP*
were used), but remaining parts seem reasonable.

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/NEWS
gdb/arm-tdep.c
gdb/doc/gdb.texinfo