This is the mail archive of the
mailing list for the elfutils project.
File index given line (libdw)
- From: Sasha Da Rocha Pinheiro <darochapinhe at wisc dot edu>
- To: "elfutils-devel at sourceware dot org" <elfutils-devel at sourceware dot org>
- Date: Thu, 13 Jul 2017 00:25:24 +0000
- Subject: File index given line (libdw)
- Accept-language: en-US, pt-BR
- Authentication-results: sourceware.org; auth=none
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
when we get the files given a Die and want to know the file given the line, the only way to do this is comparing the return of dwarf_linesrc with the list of filenames we had from dwarf_getsrcfiles?
Why can't we get the index of the file given the line? Just return the unsigned int file in Dwarf_Line_s.
/* Find line information for address. */
extern const char *dwarf_linesrc (Dwarf_Line *line,
Dwarf_Word *mtime, Dwarf_Word *length);
* Get the file source files used in the CU. */
extern int dwarf_getsrcfiles (Dwarf_Die *cudie, Dwarf_Files **files,