public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/arm: Fix epilogue frame id
Date: Wed, 24 Jan 2024 07:40:31 +0000	[thread overview]
Message-ID: <2c92745b-ad03-4dd0-8765-1eb4b61450a6@arm.com> (raw)
In-Reply-To: <20240123215229.2385404-1-thiago.bauermann@linaro.org>

On 1/23/24 21:52, Thiago Jung Bauermann wrote:
> arm_epilogue_frame_this_id has a comment saying that it fall backs to using
> the current PC if the function start address can't be identified, but it
> actually uses only the PC to make the frame id.
> 
> This patch makes the code match the comment.  Another hint that it's what
> is intended is that arm_prologue_this_id, a function almost identical to
> it, does that.
> 
> The problem was found by code inspection.  It fixes the following testsuite
> failures:
> 
> FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 9: check frame-id matches
> FAIL: gdb.reverse/solib-reverse.exp: reverse-next third shr1
> FAIL: gdb.reverse/solib-reverse.exp: reverse-next second shr1
> FAIL: gdb.reverse/solib-reverse.exp: reverse-next first shr1
> FAIL: gdb.reverse/solib-reverse.exp: reverse-next generic
> FAIL: gdb.reverse/solib-reverse.exp: reverse-step into solib function one
> FAIL: gdb.reverse/solib-reverse.exp: reverse-step within solib function one
> FAIL: gdb.reverse/solib-reverse.exp: reverse-step into solib function two
> FAIL: gdb.reverse/solib-reverse.exp: reverse-step within solib function two
> 
> Tested on arm-linux-gnueabi-hf.
> ---
>  gdb/arm-tdep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
> index f1aa730579bc..0d0431e0d1cd 100644
> --- a/gdb/arm-tdep.c
> +++ b/gdb/arm-tdep.c
> @@ -3252,7 +3252,7 @@ arm_epilogue_frame_this_id (frame_info_ptr this_frame,
>  
>    arm_gdbarch_tdep *tdep
>      = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
> -  *this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep), pc);
> +  *this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep), func);
>  }
>  
>  /* Implementation of function hook 'prev_register' in

Thanks. This is OK.

Approved-By: Luis Machado <luis.machado@arm.com>

  reply	other threads:[~2024-01-24  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 21:52 Thiago Jung Bauermann
2024-01-24  7:40 ` Luis Machado [this message]
2024-01-24 14:48   ` Thiago Jung Bauermann
2024-01-24 14:53     ` 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=2c92745b-ad03-4dd0-8765-1eb4b61450a6@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=thiago.bauermann@linaro.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).