This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] About arm-tdep.c arm_in_function_epilogue_p function
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'Daniel Jacobowitz'" <dan at codesourcery dot com>, "'Ulrich Weigand'" <uweigand at de dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Thu, 18 Nov 2010 13:56:28 +0000
- Subject: Re: [RFA] About arm-tdep.c arm_in_function_epilogue_p function
- References: <002701cb83f6$30b394e0$921abea0$@muller@ics-cnrs.unistra.fr> <20101116000346.GN8573@caradoc.them.org> <000a01cb8710$bcda4a00$368ede00$@muller@ics-cnrs.unistra.fr> <1290086858.18751.21.camel@e102346-lin.cambridge.arm.com> <002101cb8726$8bbedec0$a33c9c40$@muller@ics-cnrs.unistra.fr>
On Thu, 2010-11-18 at 14:43 +0100, Pierre Muller wrote:
> OK, here is the patch.
>
> As already said, this patch doesn't change anything on
> the testsuite results for a armv7l linux machine.
>
> > Why don't you just post a patch? Then we can assess it as we would all
> > other patches. The comments in the code at this point clearly don't
> > match the code, so something certainly needs fixing.
> >
> > R.
>
Looking at a wider context I think I see what's happened. The block
here is essentially a copy of the block earlier in the function with
s/pc/sp/ applied. Except this one variable wasn't updated properly.
OK.
R
> OK to apply?
>
> 2010-11-18 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * arm-tdep.c (arm_in_function_epilogue_p): Fix code when "MOV SP"
> instruction is found.
>
> Index: src/gdb/arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.312
> diff -u -p -r1.312 arm-tdep.c
> --- src/14 Nov 2010 12:10:59 -0000 1.312
> +++ src/gdb/arm-tdep.c 18 Nov 2010 13:35:41 -0000
> @@ -2245,7 +2245,7 @@ arm_in_function_epilogue_p (struct gdbar
> found_stack_adjust = 1;
> else if ((insn & 0x0ffffff0) == 0x01a0d000)
> /* MOV SP. */
> - found_return = 1;
> + found_stack_adjust = 1;
> else if ((insn & 0x0fff0000) == 0x08bd0000)
> /* POP (LDMIA). */
> found_stack_adjust = 1;
>