public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Nick Clifton <nickc@redhat.com>
Cc: Bob Wilson <bwilson@tensilica.com>, binutils@sources.redhat.com
Subject: Re: [PATCH] inconsistent DWARF2 sections generated by --gdwarf2
Date: Thu, 18 Nov 2004 08:59:00 -0000	[thread overview]
Message-ID: <20041118085901.GB21809@bubble.modra.org> (raw)
In-Reply-To: <419C60C8.3020501@redhat.com>

On Thu, Nov 18, 2004 at 08:43:52AM +0000, Nick Clifton wrote:
> Hi Alan, Hi Bob,
> 
> >>probably harmless for GDB, but it breaks readelf, which expects a 
> >>one-to-one correspondence between .debug_info and .debug_line sections.  
> 
> >I would say that this is a readelf bug.  The only reason that readelf
> >needs .debug_info when dumping .debug_line is to find the size of
> >addresses.  readelf could guess that some other way.
> 
> I do not think so - the DWARF standard does specify that there there 
> should be a correspondence between the compilation units in the 
> .debug_info section and the compilation units in the .debug_line section:
> 
>   From "Section 6.2 Line number Information":
> 
>   As mentioned in Section 3.1.1, the line number information
>   generated for a compilation unit is represented in the
>   .debug_line section of an object file and is referenced by
>   corresponding compilation unit debugging information entry
>   in the .debug_info section.

But that's the other way around, .debug_info references .debug_line.  In
this case we have .debug_line with no .debug_info, which should be OK.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2004-11-18  8:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-15 19:27 Bob Wilson
2004-11-18  3:31 ` Alan Modra
2004-11-18  8:39   ` Nick Clifton
2004-11-18  8:59     ` Alan Modra [this message]
2004-11-18  9:18       ` Nick Clifton
2004-11-18 11:58         ` Alan Modra
2004-11-18 14:22           ` Daniel Jacobowitz
2004-11-18 18:14             ` Bob Wilson
2004-11-18 18:42               ` Daniel Jacobowitz
2004-11-22 12:19               ` Nick Clifton

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=20041118085901.GB21809@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=bwilson@tensilica.com \
    --cc=nickc@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).