From: Daniel Jacobowitz <drow@false.org>
To: Tom Tromey <tromey@redhat.com>
Cc: Jason Richards <jsn.richards@gmail.com>, gdb-patches@sourceware.org
Subject: Re: infinite loop processing siblings - dwarf2reader - dwarf 3 debug
Date: Mon, 26 Oct 2009 21:50:00 -0000 [thread overview]
Message-ID: <20091026215031.GA27627@caradoc.them.org> (raw)
In-Reply-To: <m3my3dx3i2.fsf@fleche.redhat.com>
On Mon, Oct 26, 2009 at 03:13:41PM -0600, Tom Tromey wrote:
> >>>>> "Jason" == Jason Richards <jsn.richards@gmail.com> writes:
>
> Jason> I encountered a problem where GDB gets stuck in an infinite loop
> Jason> processing dwarf 3 debug information. Turns out the producer has
> Jason> placed a sibling attribute in a die in a comp unit which
> Jason> references a previous die in the comp unit.
>
> This does not sound like valid DWARF to me. Section 1.9 makes it sound
> as though the only valid value is the DIE's next sibling.
That's right. What is this producer?
> Jason> It seams to me the appropriate fix for this problem is to change
> Jason> "locate_pdi_sibling" to first return the location past the
> Jason> children, before returning sibling information, which fixes this
> Jason> particular problem.
>
> Jason> Is there something I am not thinking about?
>
> I don't know why the code is the way it is; I assume for performance but
> I have not looked into it at all.
You are correct. This optimization is the point of DW_AT_sibling, in
fact.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2009-10-26 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-25 4:24 Jason Richards
2009-10-26 21:13 ` Tom Tromey
2009-10-26 21:50 ` Daniel Jacobowitz [this message]
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=20091026215031.GA27627@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=jsn.richards@gmail.com \
--cc=tromey@redhat.com \
/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