public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Torbjörn SVENSSON" <torbjorn.svensson@foss.st.com>
To: <gdb-patches@sourceware.org>
Cc: luis.machado@arm.com,
	"Torbjörn SVENSSON" <torbjorn.svensson@foss.st.com>
Subject: [PATCH] gdb/arm: Include FType bit in EXC_RETURN pattern on v8m
Date: Wed, 23 Nov 2022 12:47:25 +0100	[thread overview]
Message-ID: <20221123114725.2459115-1-torbjorn.svensson@foss.st.com> (raw)

For v8m, the EXC_RETURN pattern, without security extension, consists of
FType, Mode and SPSEL.  These are the same bits that are used in v7m.
This patch extends the list of patterns to include also the FType bit
and not just Mode and SPSEL bits for v8m targets without security
extension.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 gdb/arm-tdep.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index a839f957440..742b8e1f64b 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -834,7 +834,19 @@ arm_m_addr_is_lockup (CORE_ADDR addr)
    EXC_RETURN    Condition
    0xFFFFFFB0    Return to Handler mode.
    0xFFFFFFB8    Return to Thread mode using the main stack.
-   0xFFFFFFBC    Return to Thread mode using the process stack.  */
+   0xFFFFFFBC    Return to Thread mode using the process stack.
+
+   The above list is incomplete as it does not include the FType bit.  The
+   complete list for ARMv8-M is:
+
+   EXC_RETURN    Condition
+   0xFFFFFFA0    Return to Handler mode, standard frame.
+   0xFFFFFFA8    Return to Thread mode using the main stack, standard frame.
+   0xFFFFFFAC    Return to Thread mode using the process stack, standard frame.
+   0xFFFFFFB0    Return to Handler mode, extended frame.
+   0xFFFFFFB8    Return to Thread mode using the main stack, extended frame.
+   0xFFFFFFBC    Return to Thread mode using the process stack, extended frame.
+   */
 
 static int
 arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
@@ -859,6 +871,9 @@ arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
       switch (addr)
 	{
 	  /* Values from ARMv8-M Architecture Technical Reference.  */
+	case 0xffffffa0:
+	case 0xffffffa8:
+	case 0xffffffac:
 	case 0xffffffb0:
 	case 0xffffffb8:
 	case 0xffffffbc:
-- 
2.25.1


             reply	other threads:[~2022-11-23 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 11:47 Torbjörn SVENSSON [this message]
2022-11-23 11:56 ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123114725.2459115-1-torbjorn.svensson@foss.st.com \
    --to=torbjorn.svensson@foss.st.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).