[Lldb-commits] [PATCH] D11357: Resolve DW_AT_comp_dir path if it contains a symlink

Oleksiy Vyalov ovyalov at google.com
Mon Jul 20 11:56:54 PDT 2015


ovyalov added a comment.

In http://reviews.llvm.org/D11357#208345, @jingham wrote:

> Why do you need to do this?  Between the comp dir and the file name you should have an absolute path.  If the debug information is not resolved to an absolute path, that's a compiler bug and should be fixed there.


Binary can be built on remote machine (in case of distributed build) and in this case DW_AT_comp_dir entry contains useless and invalid path for a host which initiated a build.
Problem similar to the issue described here - http://marc.info/?l=cfe-dev&m=131916863602489. GCC puts /proc/self/cwd as a value of DW_AT_comp_dir so host can deduce it locally to own path.

> The debugger does not require that the source tree still exists, so you can't base any logic on this ACTUALLY existing to avoid a potentially large number of pointless stat's.  And in general, unless there's some clear advantage, I'd rather we not touch the file system for source files until somebody actually wants to find a particular source file.


I agree that numeric stat calls may pose a significant IO overhead - as a workaround, we can introduce a new property which enables option symbolic link resolution.


http://reviews.llvm.org/D11357







More information about the lldb-commits mailing list