public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: "Torbjörn SVENSSON" <torbjorn.svensson@foss.st.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/arm: Include FType bit in EXC_RETURN pattern on v8m
Date: Wed, 23 Nov 2022 11:56:28 +0000	[thread overview]
Message-ID: <2b98806c-07ca-5dca-9840-bb05866543b1@arm.com> (raw)
In-Reply-To: <20221123114725.2459115-1-torbjorn.svensson@foss.st.com>

Hi Torbjörn,

Thanks for the patch.

On 11/23/22 11:47, Torbjörn SVENSSON wrote:
> 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:

I'd just add the missing entries to the list, therefore making the list complete, update the existing
entries like you did and mention we need to consider the FType bit for v8-m.

> +
> +   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:

With the comment update, this is OK.

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

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

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=2b98806c-07ca-5dca-9840-bb05866543b1@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=torbjorn.svensson@foss.st.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).