Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: gdb@sourceware.org,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
		linux-arm-kernel@lists.infradead.org,
	Eric Miao <eric.y.miao@gmail.com>
Subject: Re: Problem with GDB when debugging IRQ handlers
Date: Mon, 27 Jun 2011 14:12:00 -0000	[thread overview]
Message-ID: <BANLkTin1qv4+W2yrJQgKQSBUWKQGJsnWUw@mail.gmail.com> (raw)
In-Reply-To: <4E088DE1.2060809@gmail.com>

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
<dbaryshkov@gmail.com> 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=42, desc=0xc3e06000) at
>>> kernel/irq/chip.c:329
>>> 329             mask_ack_irq(desc);
>>> (gdb) bt
>>> #0  handle_level_irq (irq=42, desc=0xc3e06000) at kernel/irq/chip.c:329
>>> #1  0xc0085f64 in generic_handle_irq_desc (irq=42) at
>>> include/linux/irqdesc.h:111
>>> #2  generic_handle_irq (irq=42) at kernel/irq/irqdesc.c:304
>>> #3  0xc0033060 in asm_do_IRQ (irq=42, regs=<value optimized out>) at
>>> arch/arm/kernel/irq.c:90
>>> #4  0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202
>>> #5  0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202
>>> #6  0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202
>>> #7  0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202
>>> #8  0xc0033b50 in __irq_svc () at arch/arm/kernel/entry-armv.S:202
>>> #9  0xc0033b50 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 information
>> to be able to unwind this.  I'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.  I 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
>
>


  reply	other threads:[~2011-06-27 14:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110627125306.GA30646@doriath.ww600.siemens.net>
     [not found] ` <20110627132735.GE16103@n2100.arm.linux.org.uk>
2011-06-27 14:04   ` Dmitry Eremin-Solenikov
2011-06-27 14:12     ` Hui Zhu [this message]
2011-06-27 14:59     ` Yao Qi
2011-06-28 10:40       ` Russell King - ARM Linux
2011-06-28 12:06         ` Dmitry Eremin-Solenikov
2011-06-28 12:14           ` Russell King - ARM Linux
2011-06-28 14:19           ` Catalin Marinas
2011-06-28 14:29             ` Catalin Marinas
2011-06-28 14:38               ` Russell King - ARM Linux
2011-06-28 14:42                 ` Catalin Marinas
2011-06-28 14:44               ` Dmitry Eremin-Solenikov
2011-06-28 14:58                 ` Dmitry Eremin-Solenikov
2011-06-28 15:06                   ` Catalin Marinas
2011-06-28 15:46                     ` Dmitry Eremin-Solenikov
2011-06-28 16:11                       ` Catalin Marinas
2011-06-28 22:26                         ` Dmitry Eremin-Solenikov
2011-06-29  9:10                           ` Catalin Marinas
2011-06-29 11:21                             ` Dmitry Eremin-Solenikov
2011-06-28 12:07         ` Hui Zhu
2011-06-28 12:09           ` Russell King - ARM Linux
2011-06-28 13:22             ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTin1qv4+W2yrJQgKQSBUWKQGJsnWUw@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=dbaryshkov@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox