From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2310 invoked by alias); 22 Dec 2009 16:17:55 -0000 Received: (qmail 2298 invoked by uid 22791); 22 Dec 2009 16:17:54 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Dec 2009 16:17:50 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0436A10DAA; Tue, 22 Dec 2009 16:17:49 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id AB03710D9E; Tue, 22 Dec 2009 16:17:48 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1NN7Qh-0000uW-5a; Tue, 22 Dec 2009 11:17:47 -0500 Date: Tue, 22 Dec 2009 16:17:00 -0000 From: Daniel Jacobowitz To: Richard Earnshaw Cc: Michael Snyder , "Maciej W. Rozycki" , "gdb-patches@sourceware.org" Subject: Re: [PING][PATCH] ARM/Linux: Unwind restart_syscall(2) frames Message-ID: <20091222161747.GA3211@caradoc.them.org> Mail-Followup-To: Richard Earnshaw , Michael Snyder , "Maciej W. Rozycki" , "gdb-patches@sourceware.org" References: <4B2BD8CE.9010802@vmware.com> <1261495721.26179.67.camel@e200601-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1261495721.26179.67.camel@e200601-lin.cambridge.arm.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00342.txt.bz2 On Tue, Dec 22, 2009 at 03:28:41PM +0000, Richard Earnshaw wrote: > It's not code that I'm familiar with, however... > > svc 0x00900000 > ldr pc, [sp], #12 > then > > + trad_frame_set_reg_value (this_cache, ARM_SP_REGNUM, sp + 12); > > So why is the stack pointer /incremented/ by 12 at this point (which > deallocates stack) rather than decremented to compensate for the > increment that will follow? Also, shouldn't the stack allocation be a > multiple of 8 to fully conform to the ABI stack alignment constraints? We're before execution of the above trampoline at this point, trying to compensate for it; that's why the stack goes up, we're simulating return from the trampoline. The code sequence was chosen by the kernel, weird stack alignment and all. -- Daniel Jacobowitz CodeSourcery