Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Greta Yorsh <Greta.Yorsh@arm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [Patch, ARM] Add POP of single register to arm_in_function_epilogue_p
Date: Mon, 25 Jun 2012 12:16:00 -0000	[thread overview]
Message-ID: <4FE8566E.6090001@arm.com> (raw)
In-Reply-To: <001d01cd52ca$19f65d60$4de31820$@Yorsh@arm.com>

On 25/06/12 13:00, Greta Yorsh wrote:
> This patch is related to a recent change in the way gcc generates function
> epilogues for arm targets (since gcc trunk r188745):
> http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02071.html
> 
> The function arm_in_function_epilogue_p does not recognize POP with a single
> register as a stack adjustment in arm mode. 
> It causes two test new failures in gdb testsuite:
> FAIL: gdb.base/watch-cond.exp: watchpoint with local expression, local
> condition evaluates in correct frame
> FAIL: gdb.mi/mi2-watch.exp: hw: watchpoint trigger (stopped at wrong place)
> 
> The reason is that in arm mode the encoding of POP with single register is
> different from the encoding of POP with multiple registers. The attached
> patch adds the missing pattern to arm_in_function_epilogue_p. 
> 
> Thanks,
> Greta
> 
> ChangeLog
> 
> gdb/
> 
> 2012-06-25  Greta Yorsh  <Greta.Yorsh@arm.com>
> 
> 	* arm-tdep.c (arm_in_function_epilogue_p): Recognize POP
> 	with a single register as a stack adjustment in arm mode.
> 
> 
> gdb-pop-one-reg.patch.txt
> 
> 
> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
> index df5dea7..568ace5 100644
> --- a/gdb/arm-tdep.c
> +++ b/gdb/arm-tdep.c
> @@ -3217,6 +3217,9 @@ arm_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
>        else if ((insn & 0x0fff0000) == 0x08bd0000)
>  	/* POP (LDMIA).  */
>  	found_stack_adjust = 1;
> +      else if ((insn & 0x0fff0000) == 0x049d0000)
> +	/* POP of a single register.  */
> +	found_stack_adjust = 1;
>      }
>  
>    if (found_stack_adjust)
> 

OK.

R.




      reply	other threads:[~2012-06-25 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 12:01 Greta Yorsh
2012-06-25 12:16 ` Richard Earnshaw [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=4FE8566E.6090001@arm.com \
    --to=rearnsha@arm.com \
    --cc=Greta.Yorsh@arm.com \
    --cc=gdb-patches@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