gdb/arm: Unwind Non-Secure callbacks from Secure
authorYvan Roux <yvan.roux@foss.st.com>
Mon, 27 Jun 2022 11:26:36 +0000 (13:26 +0200)
committerYvan Roux <yvan.roux@foss.st.com>
Mon, 27 Jun 2022 11:28:07 +0000 (13:28 +0200)
commit8c9ae6df3c244a7a738085ab461cb098df1d46f6
tree13e3fdfef6f166ca6f52e61c285f0bd47a38234b
parenta3f1431a5087445ec3987d38b5ee37bcb802214c
gdb/arm: Unwind Non-Secure callbacks from Secure

Without this changeset, the unwinding doesn't take into account
Non-Secure to Secure stack unwinding enablement status and
doesn't choose the proper SP to do the unwinding.

This patch only unwinds the stack when Non-Secure to Secure
unwinding is enabled, previous SP is set w/r to the current mode
(Handler -> msp_s, Thread -> psp_s) and then the Secure stack is
unwound.  Ensure thumb bit is set in PSR when needed.  Also, drop
thumb bit from PC if set.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: Yvan ROUX <yvan.roux@foss.st.com>
gdb/arm-tdep.c