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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 19 05:43:28 PST 2020


labath 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:
> 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...
Yeah, a lot of people think that is the expected behavior, and then get surprised when something different happens. Unfortunately, the surprise does not happen frequently enough to for people to become aware of that...


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