public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Torbjorn Svensson <azoff@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/arm: Include FType bit in EXC_RETURN pattern on v8m
Date: Wed, 23 Nov 2022 13:20:29 +0000 (GMT)	[thread overview]
Message-ID: <20221123132029.A9CBC3852C67@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8db533e7d6d28db1be0ae4c95ddea7aa3a6224c8

commit 8db533e7d6d28db1be0ae4c95ddea7aa3a6224c8
Author: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Date:   Wed Nov 23 11:58:31 2022 +0100

    gdb/arm: Include FType bit in EXC_RETURN pattern on v8m
    
    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>

Diff:
---
 gdb/arm-tdep.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index a839f957440..6f02f04b5cb 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -828,13 +828,17 @@ arm_m_addr_is_lockup (CORE_ADDR addr)
    For more details see "B1.5.8 Exception return behavior"
    in both ARMv6-M and ARMv7-M Architecture Reference Manuals.
 
-   In the ARMv8-M Architecture Technical Reference also adds
-   for implementations without the Security Extension:
+   From ARMv8-M Architecture Technical Reference, D1.2.95
+   FType, Mode and SPSEL bits are to be considered when the Security
+   Extension is not implemented.
 
-   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.  */
+   EXC_RETURN    Return To        Return Stack    Frame Type
+   0xFFFFFFA0    Handler mode     Main            Extended
+   0xFFFFFFA8    Thread mode      Main            Extended
+   0xFFFFFFAC    Thread mode      Process         Extended
+   0xFFFFFFB0    Handler mode     Main            Standard
+   0xFFFFFFB8    Thread mode      Main            Standard
+   0xFFFFFFBC    Thread mode      Process         Standard  */
 
 static int
 arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
@@ -859,6 +863,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:

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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221123132029.A9CBC3852C67@sourceware.org \
    --to=azoff@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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).