Install codelldb

This commit is contained in:
2023-09-16 01:02:45 -04:00
parent 7d2d573b36
commit a18dc18856
5 changed files with 19 additions and 13 deletions

View File

@@ -27,7 +27,6 @@ ARG RECIPE=recipe-framework-13.yml
# See issue #28 (https://github.com/ublue-os/startingpoint/issues/28). # See issue #28 (https://github.com/ublue-os/startingpoint/issues/28).
COPY usr/ /usr COPY usr/ /usr
COPY ${USER_DIR}/ /usr COPY ${USER_DIR}/ /usr
RUN ls /usr
# Copy the recipe that we're building. # Copy the recipe that we're building.
COPY ${RECIPE} /usr/share/ublue-os/recipe.yml COPY ${RECIPE} /usr/share/ublue-os/recipe.yml

View File

@@ -12,6 +12,7 @@ scripts:
- setup-selinux-dockersock.sh - setup-selinux-dockersock.sh
- autorun.sh - autorun.sh
- setup-desktop-audio.sh - setup-desktop-audio.sh
- install-codelldb.sh
rpm: rpm:
# A list of urls of ".repo" files that should be added to your system. # A list of urls of ".repo" files that should be added to your system.
# This is the proper way to add custom COPR repos to your image. # This is the proper way to add custom COPR repos to your image.

View File

@@ -12,6 +12,7 @@ scripts:
- setup-selinux-dockersock.sh - setup-selinux-dockersock.sh
- autorun.sh - autorun.sh
- setup-framework-13.sh - setup-framework-13.sh
- install-codelldb.sh
rpm: rpm:
# A list of urls of ".repo" files that should be added to your system. # A list of urls of ".repo" files that should be added to your system.
# This is the proper way to add custom COPR repos to your image. # This is the proper way to add custom COPR repos to your image.

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
cd /usr/bin/
curl -L "https://github.com/vadimcn/vscode-lldb/releases/download/v1.7.0/codelldb-x86_64-linux.vsix" -o "codelldb-x86_64-linux.zip"
unzip "codelldb-x86_64-linux.zip" "extension/adapter/*" "extension/lldb/*"
rm -f "codelldb-x86_64-linux.zip"
mv extension/ codelldb_adapter
ln -s $(pwd)/codelldb_adapter/adapter/codelldb /usr/bin/codelldb
codelldb -h > /dev/null

View File

@@ -1,12 +0,0 @@
import subprocess
import pathlib
import lldb
# determine the sysroot for the active rust interpreter
rustlib_etc = pathlib.Path(subprocess.getoutput('rustc --print sysroot')) / 'lib' / 'rustlib' / 'etc'
if not rustlib_etc.exists():
raise RuntimeError('Unable to determine rustc sysroot')
# load lldb_lookup.py and execute lldb_commands with the correct path
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)