public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
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: Fri, 14 Jul 2017 10:03:00 -0000	[thread overview]
Message-ID: <1500026625.14595.238.camel@klomp.org> (raw)
In-Reply-To: <DM2PR06MB2727756C54216ED61F62B2AA6AC0@DM2PR06MB272.namprd06.prod.outlook.com>

On Thu, 2017-07-13 at 17:33 +0000, Sasha Da Rocha Pinheiro wrote:
> given a Die, I want to associate each line (from dwarf_getsrclines) to
> a file (from dwarf_getsrcfiles). The only way to do this is get the
> filename returned by dwarf_linesrc, and search in the filenames given
> by dwarf_getsrcfiles and dwarf_filesrc. But this is expensive since
> this has to be done for each line. Instead, if I could get the file
> index in the array "struct Dwarf_Fileinfo_s info", I wouldn't need to
> search.

But why do you want to do that?
If we would add int dwarf_line_index (Dwarf_Line *line, size_t *idx) how
exactly would you use it?
What would be a good testcase for this new functionality?
A small example program would help to see what the exact semantics
should be.

Thanks,

Mark

  reply	other threads:[~2017-07-14 10:03 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 [this message]
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
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=1500026625.14595.238.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).