[Lldb-commits] [PATCH] D45977: Always normalize FileSpec paths.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 23 15:13:08 PDT 2018


clayborg added a comment.

In https://reviews.llvm.org/D45977#1076048, @aprantl wrote:

> One general question: why is this form of normalization preferred over calling realpath?


Normalization is everything we can do to fix up a path without knowing anything about the current working directory or any symlinks. So we can remove redundant references to the current directory (".") or the parent directory (".."), but only if they are not at the start of the path. Since our path may have been created on a different machine with an unknown symlinks, realpath really can't do anything for us. What is a path like "./foo.txt" relative to when stored in the debug info with no compilation directory? what if we have "/tmp/mysymlink" mean on another machine? We can't realpath it because we don't know the actual root or any of the symlinks.


https://reviews.llvm.org/D45977





More information about the lldb-commits mailing list