Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify LLDB scripting language. #308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ function ensure_pip {

function get_lldb_python_exe {
# Find the Python version used by LLDB
local lldb_pyver=$(${LLDB} -Q -x -b --one-line 'script import platform; print(".".join(platform.python_version_tuple()[:2]))'|tail -1)
local lldb_python=$(${LLDB} -Q -x -b --one-line 'script import sys; print(sys.executable)'|tail -1)
local lldb_pyver=$(${LLDB} -Q -x -b --one-line 'script --language python -- import platform; print(".".join(platform.python_version_tuple()[:2]))'|tail -1)
local lldb_python=$(${LLDB} -Q -x -b --one-line 'script --language python -- import sys; print(sys.executable)'|tail -1)

lldb_python=$(${LLDB} -Q -x -b --one-line 'script import sys; print(sys.executable)'|tail -1)
lldb_python=$(${LLDB} -Q -x -b --one-line 'script --language python -- import sys; print(sys.executable)'|tail -1)
local lldb_python_basename=$(basename "${lldb_python}")
if [ "python" = "$lldb_python_basename" ];
then
Expand All @@ -189,7 +189,7 @@ function get_lldb_python_exe {
then
# newer lldb versions report sys.path as /path/to/lldb instead of python
# sys.exec_path still appears to be the parent path of bin/python though
local lldb_python_exec_prefix=$(${LLDB} -Q -x -b --one-line 'script import sys; print(sys.exec_prefix)'|tail -1)
local lldb_python_exec_prefix=$(${LLDB} -Q -x -b --one-line 'script --language python -- import sys; print(sys.exec_prefix)'|tail -1)
lldb_python="$lldb_python_exec_prefix/bin/python"
lldb_python="${lldb_python/%$lldb_pyver/}${lldb_pyver}"
fi
Expand Down Expand Up @@ -269,7 +269,7 @@ if [ "${BACKEND_LLDB}" -eq 1 ]; then
fi

if [ -n "${VENV}" ]; then
echo "script import sys;sys.path.append('${LLDB_SITE_PACKAGES}')" >> ${LLDB_INIT_FILE}
echo "script --language python -- import sys;sys.path.append('${LLDB_SITE_PACKAGES}')" >> ${LLDB_INIT_FILE}
fi
echo "command script import $LLDB_ENTRY_FILE" >> ${LLDB_INIT_FILE}
fi
Expand Down