[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 1 17:35:15 PDT 2021


lawrence_danna added a comment.

In D112973#3101602 <https://reviews.llvm.org/D112973#3101602>, @JDevlieghere wrote:

> FWIW `crashlog.py` has a good example of how to import LLDB. It's complicated slightly by us having to honor the `LLDB_DEFAULT_PYTHON_VERSION`, but otherwise it's pretty simple:

Unfortunately that is not enough to solve the problem, because if we run that script with the wrong version of python it will crash (see https://reviews.llvm.org/D112972)
Even if that bug is fixed, it will still raise an ImportError

> A potential alternative to this could be an `lldb-python` (python) script that reinvokes itself with the correct `PYTHONPATH` set?

That approach would work, but I'd still need `--python-prefix` to find the right python.   I'll update this diff tomorrow doing it that way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112973



More information about the lldb-commits mailing list