[Lldb-commits] [PATCH] D65611: [Driver] Expand the target in the driver.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 5 09:30:28 PDT 2019


JDevlieghere added a comment.

In D65611#1613052 <https://reviews.llvm.org/D65611#1613052>, @clayborg wrote:

> Also be careful if the user uses a symlink to not resolve the link. If a user tries to debug clang++:
>
>   $ ls -AFlG /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang*
>   -rwxr-xr-x  1 root  wheel  81666656 Jul 12 21:48 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang*
>   lrwxr-xr-x  1 root  wheel         5 Jul 25 07:57 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++@ -> clang
>
>
> We don't want to resolve it to "clang" or it will change the behavior for any program that checks argv[0] and doesn't something different depending on what that values is.


That's a good point, and something I hadn't considered. If my memory serves me right `ResolvePath` doesn't call realpath, but I'd have to double check for sure.

One thing I liked about this is that when you're debugging something in your PATH it will show you the absolute path, like `/bin/ls` instead of just `ls`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65611/new/

https://reviews.llvm.org/D65611





More information about the lldb-commits mailing list