public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Torsten Polle <Torsten.Polle@gmx.de>,
	Sasha Da Rocha Pinheiro	 <darochapinhe@wisc.edu>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>
Subject: Re: Relative path X full path
Date: Tue, 03 Apr 2018 11:10:00 -0000	[thread overview]
Message-ID: <1522753820.15770.96.camel@klomp.org> (raw)
In-Reply-To: <1522325435.15770.76.camel@klomp.org>

On Thu, 2018-03-29 at 14:10 +0200, Mark Wielaard wrote:
> It does indeed come up more often, and it is a little confusing.
> So I am proposing the following documentation update to hopefully
> explain better how to get the absolute path for a file (decl).

I did discuss this offlist a bit more with Sasha.
I am now convinced this really is somewhat inconsistent.
And I was tempted to "fix" it by just always adding the comp_dir to any
 relative path we return. But this would increase the memory usage for
line tables even more (we store the whole path when we parse the table
for the first time). And it has been this way so long that people might
even rely on what we return now.

In hindsight these interfaces should never have merged the file path
and directory paths, but kept them separate. By returning just a full
path it is impossible to see the original separate paths. Which might
be interesting to some clients. Since DWARF5 adds a way to add various
properties to file entries we should just add a new API that lets you
query any property of a file entry you like (including the file path
and dir path).

So for now I just pushed this documentation update. And keep the code
as is.

Cheers,

Mark

  reply	other threads:[~2018-04-03 11:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 16:45 Sasha Da Rocha Pinheiro
2018-03-26 18:16 ` Milian Wolff
2018-03-26 19:12 ` Torsten Polle
2018-03-29 12:10   ` Mark Wielaard
2018-04-03 11:10     ` Mark Wielaard [this message]
2018-03-26 19:15 ` Mark Wielaard

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=1522753820.15770.96.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=Torsten.Polle@gmx.de \
    --cc=darochapinhe@wisc.edu \
    --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).