From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21486 invoked by alias); 3 Apr 2018 11:10:29 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 21474 invoked by uid 89); 3 Apr 2018 11:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1241, H*Ad:U*elfutils-devel X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Apr 2018 11:10:23 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C019B32DC425; Tue, 3 Apr 2018 13:10:20 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 79D294000B13; Tue, 3 Apr 2018 13:10:20 +0200 (CEST) Message-ID: <1522753820.15770.96.camel@klomp.org> Subject: Re: Relative path X full path From: Mark Wielaard To: Torsten Polle , Sasha Da Rocha Pinheiro Cc: "elfutils-devel@sourceware.org" Date: Tue, 03 Apr 2018 11:10:00 -0000 In-Reply-To: <1522325435.15770.76.camel@klomp.org> References: <3E482EDA-C11A-4420-963D-9CB6DC221B7F@gmx.de> <1522325435.15770.76.camel@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2018-q2/txt/msg00000.txt.bz2 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