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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to