public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH] libdw: Handle DWARF5 line tables in dwarf_getsrclines.
Date: Fri, 11 May 2018 15:25:00 -0000	[thread overview]
Message-ID: <1526052330.3097.59.camel@klomp.org> (raw)
In-Reply-To: <1525730763-17612-1-git-send-email-mark@klomp.org>

On Tue, 2018-05-08 at 00:06 +0200, Mark Wielaard wrote:
> In DWARF5 the actual line number table format doesn't change, except for
> not allowing DW_LNE_define_file (but we still just accept it). The
> changes are the header having new fields for address and segment
> selector sizes, and new formats for the directory and file names tables.
> 
> The directory and file name tables are much more flexible in DWARF5, but
> we only interpret the actual names and file/dir index relationships,
> skipping/ignoring any other information. There also is no new interface
> yet to get at the new directory and file properties.
> 
> There is some small confusion about the file name table indexing. Older
> DWARF versions explicitly called the first file name table 1. DWARF5
> implies the first index is 0 (but for file attributes, zero means not
> associated with a file). We get away with that by having an actual zero
> index for older DWARF versions (the null_fill). It looks like gcc gets
> around it by explicitly duplicating the first (0) and second (1) file
> name entry in the table. This can also be seen in the new testcase.
> 
> The patch looks big because of moving a few initializations around
> and because the code that is different for older/newer DWARF got moved
> under if statements. But the original old DWARF code path didn't really
> change.


Pushed to master.

      reply	other threads:[~2018-05-11 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 22:06 Mark Wielaard
2018-05-11 15:25 ` Mark Wielaard [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=1526052330.3097.59.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    /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).