This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: ARM stack alignment on hand called functions
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "Kris Warkentin" <kewarken at qnx dot com>
- Cc: Richard dot Earnshaw at arm dot com, gdb at sources dot redhat dot com
- Date: Thu, 21 Nov 2002 10:58:10 +0000
- Subject: Re: ARM stack alignment on hand called functions
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > > OK, but with this change the alignment is being done *after* any
> arguments
> > > that have to go onto the stack have been pushed. It should happen
> > > *before*. What happens if you have?
>
> You're right. If I put the "sp = (sp + 3) & ~3" at the top of
> arm_push_arguments(), everything works. I see that a lot of stuff in
> arm-tdep.c has been changed extensively on your head branch, including
> arm_push_arguments(). Probably once we move to the head branch, everything
> will work fine.
>
Don't forget that the stack is a "full-descending" stack; so you should be
rounding the value down, not up.
R.