From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10127 invoked by alias); 27 Jun 2011 14:12:03 -0000 Received: (qmail 9949 invoked by uid 22791); 27 Jun 2011 14:12:01 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_QE X-Spam-Check-By: sourceware.org Received: from mail-fx0-f54.google.com (HELO mail-fx0-f54.google.com) (209.85.161.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Jun 2011 14:11:46 +0000 Received: by fxe4 with SMTP id 4so1899151fxe.13 for ; Mon, 27 Jun 2011 07:11:45 -0700 (PDT) Received: by 10.223.91.75 with SMTP id l11mr8842005fam.66.1309183905096; Mon, 27 Jun 2011 07:11:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.29.155 with HTTP; Mon, 27 Jun 2011 07:11:05 -0700 (PDT) In-Reply-To: <4E088DE1.2060809@gmail.com> References: <20110627125306.GA30646@doriath.ww600.siemens.net> <20110627132735.GE16103@n2100.arm.linux.org.uk> <4E088DE1.2060809@gmail.com> From: Hui Zhu Date: Mon, 27 Jun 2011 14:12:00 -0000 Message-ID: Subject: Re: Problem with GDB when debugging IRQ handlers To: Dmitry Eremin-Solenikov Cc: gdb@sourceware.org, Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, Eric Miao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00147.txt.bz2 If I remember is right, kernel didn't supply enough debug info in entry-armv.S. So GDB cannot got enough debug info, then got some frame parse bug inside it. I think add some cfi code(http://sourceware.org/binutils/docs/as/CFI-directives.html) like x86 entry did can handle this issue. Thanks, Hui On Mon, Jun 27, 2011 at 22:04, Dmitry Eremin-Solenikov wrote: > Hello, > > On 27.06.2011 17:27, Russell King - ARM Linux wrote: >> >> On Mon, Jun 27, 2011 at 04:53:06PM +0400, Dmitry Eremin-Solenikov wrote: >>> >>> I've got into a problem when trying to debug irq handlers on PXA (in >>> qemu). backtrace is really strange from my POV (a target is just a qemu >>> running a bit modified 3.0-rc2 kernel): >> >> ... >>> >>> Breakpoint 1, handle_level_irq (irq=3D42, desc=3D0xc3e06000) at >>> kernel/irq/chip.c:329 >>> 329 =A0 =A0 =A0 =A0 =A0 =A0 mask_ack_irq(desc); >>> (gdb) bt >>> #0 =A0handle_level_irq (irq=3D42, desc=3D0xc3e06000) at kernel/irq/chip= .c:329 >>> #1 =A00xc0085f64 in generic_handle_irq_desc (irq=3D42) at >>> include/linux/irqdesc.h:111 >>> #2 =A0generic_handle_irq (irq=3D42) at kernel/irq/irqdesc.c:304 >>> #3 =A00xc0033060 in asm_do_IRQ (irq=3D42, regs=3D)= at >>> arch/arm/kernel/irq.c:90 >>> #4 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #5 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #6 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #7 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #8 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #9 =A00xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #10 0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #11 0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> #12 0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202 >>> >>> ... and so on it continues ad infinitum. Is it the expected behaviour? >>> Because I'm pretty much sure that this isn't a desired behaviour. >> >> My guess is that gdb is trying to unwind using the unwind information. >> However, I don't think we actually give the assembler the full informati= on >> to be able to unwind this. =A0I've no idea how to solve this as I'm no >> expert at the debug info. >> >> We _really_ _do_ want to unwind through this so that we can see the >> parent kernel context information in backtraces - and the fact that >> the kernel itself can unwind through these means we can't tell the >> unwinder not to. >> >> So, no idea. =A0I think you need someone who knows debug info to sort >> this one out. > > Adding gdb ML to cc in the hope to get any assistance. > > -- > With best wishes > Dmitry > >