[PATCH] D113650: [lldb] fix -print-script-interpreter-info on windows

Lawrence D'Anna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 09:52:21 PST 2021


lawrence_danna added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:413
 
+static const char GetInterpreterInfoScript[] = R"(
+import os
----------------
stella.stamenova wrote:
> Does `sys.executable` not work for some reason?
Yes, unfortunately it will point to `lldb.exe`, not `python.exe`


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:432
+  elif os.name == 'posix':
+      exename = "python" + str(sys.version_info[0])
+      info['executable'] = os.path.join(sys.prefix, 'bin', exename)
----------------
stella.stamenova wrote:
> Python on windows could have a version too (e.g. python3.exe)
Under what circumstances?   How do we determine if it does?     The one from python.org doesn't.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113650



More information about the llvm-commits mailing list