[Lldb-commits] [PATCH] D74727: Allow customized relative PYTHONHOME

Haibo Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 18 11:02:58 PST 2020


hhb marked an inline comment as done.
hhb added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:298
+        llvm::sys::path::append(path, lldb_python_home);
+        llvm::sys::path::remove_dots(path, /* remove_dot_dots = */ true);
+        absolute_python_home = path.c_str();
----------------
hhb wrote:
> labath wrote:
> > Is the `remove_dot_dots` really necessary? It can produce unexpected results when `..`s back up over symlinks...
> I was just trying to make the string shorter. It is not necessary. Removed.
> 
> But just curious what is the unexpected result? Say if I have a symlink "/src/python" -> "/usr/local/lib/python3.7", a "/src/python/../" should be resolved to /src, with or without remove_dot_dots?
> 
> Well I guess things get more interesting when liblldb is a symlink... That doesn't affect my use case though.
Kind of understood after searching around. For me remove_dot_dots is the expected behavior. But yea let's remove it to reduce some confusion...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74727





More information about the lldb-commits mailing list