This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

File index given line (libdw)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]