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]

Re: [RFC] libdw: prepend current directory in read_srclines


Hi Torsten,

On Sun, Mar 26, 2017 at 08:35:50PM +0200, Torsten Polle wrote:
> I observed that readelf and elfutils sometimes report different results.

Do you have an example of this? It would be good to have a testcase.

> PFA a patch that corrects this. I’m not sure whether the way I tackled
> the problem is acceptable.

I see why you are proposing this. The DWARF spec does say about the
include_directories "Each path entry is either a full path name or is
relative to the current directory of the compilation". So your patch
does make sense.

But it does depend on what users of dwarf_getsrclines expect.
Or any use of Dwarf_Line/Dwarf_Files. I think those users expect that
the returned file names can be relative. And that they should make them
absolute using index zero or the comp_dir themselves.

So if you do have an example where the expected output isn't what you
believe it should be we should examine if there is some other way to
do the right thing.

Cheers,

Mark


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