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

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 09:42:33 PST 2021


stella.stamenova added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:413
 
+static const char GetInterpreterInfoScript[] = R"(
+import os
----------------
Does `sys.executable` not work for some reason?


================
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)
----------------
Python on windows could have a version too (e.g. python3.exe)


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