File index given line (libdw)

Sasha Da Rocha Pinheiro darochapinhe@wisc.edu
Thu Jul 13 00:25:00 GMT 2017


Hi guys, 
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,
			                     size_t *nfiles)
__nonnull_attribute__ (2);


Regards,
Sasha



More information about the Elfutils-devel mailing list