From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20888 invoked by alias); 27 Nov 2002 21:13:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20879 invoked from network); 27 Nov 2002 21:13:56 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 27 Nov 2002 21:13:56 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id QAA08652 for ; Wed, 27 Nov 2002 16:09:24 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id QAA02842 for ; Wed, 27 Nov 2002 16:04:52 -0500 Message-ID: <076a01c29659$d7e41520$0202040a@catdog> From: "Kris Warkentin" To: References: <200211272021.PAA04606@hub.ott.qnx.com> Subject: Re: ARM stack alignment on hand called functions Date: Wed, 27 Nov 2002 13:13:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2002-11/txt/msg00396.txt.bz2 > Forwarded From: Richard Earnshaw > > > Can I suggest downloading a current GDB snap and find out if the problem > > > is still present (and if it isn't, follow through with a patch)? > > > Otherwize this will slip through the cracks, only to re-bite you (and > > > others) later :-( > > > > > > Andrew > > > > > > > > > > I can see no evidence that the current code is correct either, so perhaps > > we should file a PR with all this info. > > > > R. Sorry about the late reply...I had missed this in purging my email. I used the arm_push_arguments() : arm-tdep.c from your head branch in isolation and observed the same problem. When I forced an sp alignment at the top of arm_push_arguments(), it worked fine. Now I wonder, however, if " sp = (sp - 3) & ~3 " is too simplistic of a fix? Can we assume that arm will always have 4 byte alignment? 2) Can we assume that arm stacks will always grow downward? I'm thinking yes to the direction but no to the alignment so perhaps we should do a #define STACK_ALIGN_SIZE 4 in tm-arm.h and then do: sp = (sp - STACK_ALIGN_SIZE + 1) & ~(STACK_ALIGN_SIZE - 1); ???? Kris