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

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

Reply via email to