From: Mark Wielaard <mark@klomp.org>
To: Sasha Da Rocha Pinheiro <darochapinhe@wisc.edu>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>
Subject: Re: File index given line (libdw)
Date: Mon, 17 Jul 2017 13:04:00 -0000 [thread overview]
Message-ID: <1500296643.14595.353.camel@klomp.org> (raw)
In-Reply-To: <CY1PR0601MB169121ADDFA1CCBAD883D4EEA6A00@CY1PR0601MB1691.namprd06.prod.outlook.com>
On Mon, 2017-07-17 at 04:10 +0000, Sasha Da Rocha Pinheiro wrote:
> [Resending cause it seems it didn't go]
Probably because it had an HTML attachement.
The mailinglist rejects emails with HTML.
> You understood what I need when you said:
> "So you want to keep a vector with filenames for a particular CU. And
> then given Dwarf_Lines you want to associate each Dwarf_Line with a
> particular filename from that vector."
>
> I agree with this "But currently that is an implementation detail. "
> But I don't see why this would change. Deliberately sort the files
> names so it doesn't match with the lines? I don't think so.
But newer versions of DWARF could have a different way of sharing the
source files or directory table between CUs. The issue is that the index
from the Dwarf_Lines only makes sense if you know which CU the
corresponding Dwarf_Files came from. So instead of providing the
relationship between a Dwarf_Line and a Dwarf_File I rather would not
depend on something indirect like the index into some Dwarf_Files table.
If we do provide it then I think we should be explicit about what it is
an index into. So maybe a function like:
extern int *
dwarf_line_files (Dwarf_Line *line, Dwarf_Files **files, size_t *idx);
Where files and idx are returned in a way that make them useful with
dwarf_filesrc. Would the above be helpful for your usecase?
Cheers,
Mark
next prev parent reply other threads:[~2017-07-17 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 0:25 Sasha Da Rocha Pinheiro
2017-07-13 9:11 ` Mark Wielaard
2017-07-13 17:33 ` Sasha Da Rocha Pinheiro
2017-07-14 10:03 ` Mark Wielaard
2017-07-15 1:22 ` Sasha Da Rocha Pinheiro
2017-07-15 13:56 ` Mark Wielaard
2017-07-17 4:11 ` Sasha Da Rocha Pinheiro
2017-07-17 13:04 ` Mark Wielaard [this message]
2017-07-17 17:28 ` Sasha Da Rocha Pinheiro
2017-07-21 19:29 ` Mark Wielaard
2017-07-26 21:25 ` 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=1500296643.14595.353.camel@klomp.org \
--to=mark@klomp.org \
--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).