From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1954 invoked by alias); 28 Jun 2011 14:38:47 -0000 Received: (qmail 1942 invoked by uid 22791); 28 Jun 2011 14:38:46 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from caramon.arm.linux.org.uk (HELO caramon.arm.linux.org.uk) (78.32.30.218) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jun 2011 14:38:27 +0000 Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QbZQO-0002yx-MG; Tue, 28 Jun 2011 15:38:01 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QbZQN-0007Eq-Cf; Tue, 28 Jun 2011 15:37:59 +0100 Date: Tue, 28 Jun 2011 14:38:00 -0000 From: Russell King - ARM Linux To: Catalin Marinas Cc: Dmitry Eremin-Solenikov , Yao Qi , Eric Miao , linux-arm-kernel@lists.infradead.org, gdb@sourceware.org Subject: Re: Problem with GDB when debugging IRQ handlers Message-ID: <20110628143758.GF21898@n2100.arm.linux.org.uk> References: <20110627125306.GA30646@doriath.ww600.siemens.net> <20110627132735.GE16103@n2100.arm.linux.org.uk> <4E088DE1.2060809@gmail.com> <4E089AB3.1090801@codesourcery.com> <20110628103946.GC21898@n2100.arm.linux.org.uk> <20110628142045.GC7255@1n450.cable.virginmedia.net> <20110628143014.GD7255@1n450.cable.virginmedia.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110628143014.GD7255@1n450.cable.virginmedia.net> User-Agent: Mutt/1.5.19 (2009-01-05) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00159.txt.bz2 On Tue, Jun 28, 2011 at 03:30:14PM +0100, Catalin Marinas wrote: > Actually since the return address is in S_PC (which maybe gdb assumes it > would be the saved LR), this is probably not be correct. After SVC > entry, we have he following structure on the stack: > > ORIG_r0 > CPSR > <--- assuming this is the Call Frame Address (SP+S_PC+4) > PC <--- CFA - 4 > LR <--- don't care > SP <--- CFA - 12 > ... If I'm reading this correctly, it's not correct. parent SP --> parent context stack [possible empty word] ORIG_r0 parent context CPSR parent context PC parent context LR parent context SP ... new SP --> R0 That empty word may or may not be present if the parent SP is aligned to a 64-bit boundary.