From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1358 invoked by alias); 28 Jun 2011 14:19:32 -0000 Received: (qmail 1348 invoked by uid 22791); 28 Jun 2011 14:19:30 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jun 2011 14:19:16 +0000 Received: by wwi18 with SMTP id 18so208039wwi.12 for ; Tue, 28 Jun 2011 07:19:15 -0700 (PDT) Received: by 10.227.2.81 with SMTP id 17mr6809250wbi.15.1309270755161; Tue, 28 Jun 2011 07:19:15 -0700 (PDT) Received: from 1n450.cable.virginmedia.net (cpc3-cmbg12-0-0-cust651.5-4.cable.virginmedia.com [86.9.126.140]) by mx.google.com with ESMTPS id ex2sm186445wbb.65.2011.06.28.07.19.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 07:19:14 -0700 (PDT) Date: Tue, 28 Jun 2011 14:19:00 -0000 From: Catalin Marinas To: Dmitry Eremin-Solenikov Cc: Russell King - ARM Linux , Yao Qi , Eric Miao , linux-arm-kernel@lists.infradead.org, gdb@sourceware.org Subject: Re: Problem with GDB when debugging IRQ handlers Message-ID: <20110628142045.GC7255@1n450.cable.virginmedia.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00157.txt.bz2 On Tue, Jun 28, 2011 at 04:06:11PM +0400, Dmitry Eremin-Solenikov wrote: > On 6/28/11, Russell King - ARM Linux wrote: > I did some checks. It seems, the problem isn't related to unwinder. At least > it looks like kernel has all necessary unwinding subops. It looks like the > problem is really related to the lack of necessary .cfi information. At least > when i added .cfi_startproc/.cfi_endproc annotations to entry-armv.S code, > gdb stopped decoding backtrace with the "previous frame identical to this frame" > error. Unfortunately I don't have enough knowledge to add .cfi annotations to > irq handlers. I think it may have stopped decoding because of some information it reads from the stack doesn't look sane. But I wonder whether we could get it looping again depending on the register values in the interrupted context. > diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S > index e8d8856..d77f9d7 100644 > --- a/arch/arm/kernel/entry-armv.S > +++ b/arch/arm/kernel/entry-armv.S > @@ -28,6 +28,7 @@ > #include "entry-header.S" > #include > > + .cfi_sections .debug_frame > /* > * Interrupt handling. Preserves r7, r8, r9 > */ > @@ -113,6 +114,7 @@ ENDPROC(__und_invalid) > > .macro svc_entry, stack_hole=0 > UNWIND(.fnstart ) > + .cfi_startproc > UNWIND(.save {r0 - pc} ) > sub sp, sp, #(S_FRAME_SIZE + \stack_hole - 4) Could you add some directives like below in the svc_entry macro (after "sub sp...", not sure if it matters) and check whether gdb behaves better: .cfi_def_cfa_offset S_PC .cfi_offset 14, -4 Thanks. -- Catalin