From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20110 invoked by alias); 20 Nov 2002 18:59:23 -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 20091 invoked from network); 20 Nov 2002 18:59:20 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 20 Nov 2002 18:59:20 -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 NAA31109; Wed, 20 Nov 2002 13:55:23 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id NAA12399; Wed, 20 Nov 2002 13:49:50 -0500 Message-ID: <19e701c290c6$e22587f0$0202040a@catdog> From: "Kris Warkentin" To: Cc: , References: <200211201837.gAKIbXv25319@pc960.cambridge.arm.com> Subject: Re: ARM stack alignment on hand called functions Date: Wed, 20 Nov 2002 10:59: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/msg00281.txt.bz2 > 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? > > struct f { char a; char b; char c;}; > > struct f g = {1,2,3}; > > struct f h (int a, int b, int c, int d, int e) > { > g.c = e; > return g; > } > > and then call h from within the debugger. Is g.c set correctly? > > My guess is that it won't, because the integer value for e will have been > pushed onto the stack incorrectly. > Looks like you might be right: When I 'call h(1,2,3,4,5)', I get: Breakpoint 2, h (a=1, b=2, c=3, d=1280, e=-31946752) at armstack.c:8 Hmm.... Looks like some further investigation is needed. Kris