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

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.

As for the patch itself - I am not so sure.  It looks to me like there 
might be problems when -gdwarf2 is not specified on the command line. 
ie GAS might still generate dwarf2 debug sections.  I would need to have 
a look at this and I am really swamped at the moment. :-(   Bob - could 
you try a few more tests of your patch please ?  Say with various 
different -gxxx command line switches specified ?

Cheers
   Nick

  reply	other threads:[~2004-11-18  8:39 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 [this message]
2004-11-18  8:59     ` Alan Modra
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=419C60C8.3020501@redhat.com \
    --to=nickc@redhat.com \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=bwilson@tensilica.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).