Merge pull request #119945 from oxalica/vscode-lldb

This commit is contained in:
Sandro 2021-06-12 21:07:18 +02:00 committed by GitHub
commit 64ec948ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3565 additions and 4325 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "vscode-lldb",
"version": "1.6.1",
"version": "1.6.4",
"dependencies": {
"string-argv": "^0.3.1",
"yaml": "^1.10.0",
@ -9,16 +9,15 @@
"@types/node": "^8.10.50",
"@types/mocha": "^7.0.1",
"@types/yauzl": "^2.9.0",
"@types/json5": "^0.0.30",
"typescript": "^3.7.0",
"mocha": "^7.0.1",
"typescript": "^4.2.4",
"mocha": "^8.4.0",
"source-map-support": "^0.5.12",
"memory-streams": "^0.1.3",
"vscode-debugprotocol": "^1.35.0",
"vscode-debugadapter-testsupport": "^1.35.0",
"vsce": "^1.73.0",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.7",
"ts-loader": "^6.2.1"
"vscode-debugprotocol": "^1.47.0",
"vscode-debugadapter-testsupport": "^1.47.0",
"vsce": "=1.88.0",
"webpack": "^5.37.1",
"webpack-cli": "^4.7.0",
"ts-loader": "^8.0.0"
}
}

View File

@ -1,11 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 890abd4..157a8a1 100644
index 37745b5..cad11a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,13 +16,6 @@ endif()
set(VERSION "${VERSION}${VERSION_SUFFIX}")
message("Version ${VERSION}")
-set(LLDB_PACKAGE $ENV{LLDB_PACKAGE} CACHE PATH "Zip archive containing LLDB files")
-if (LLDB_PACKAGE)
- message("Using LLDB_PACKAGE=${LLDB_PACKAGE}")
@ -14,15 +14,15 @@ index 890abd4..157a8a1 100644
-endif()
-
set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]")
# General OS-specific definitions
@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-# Run 'npm install'
-execute_process(
- COMMAND ${NPM} install
- COMMAND ${NPM} ci # like install, but actually respects package-lock file.
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- RESULT_VARIABLE Result
-)
@ -32,3 +32,5 @@ index 890abd4..157a8a1 100644
-
# Copy it back, so we can commit the lock file.
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,18 +1,17 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, jq, callPackage
{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, callPackage
, nodePackages, cmake, nodejs, unzip, python3
}:
assert lib.versionAtLeast python3.version "3.5";
let
publisher = "vadimcn";
pname = "vscode-lldb";
version = "1.6.1";
version = "1.6.4";
src = fetchFromGitHub {
owner = "vadimcn";
repo = "vscode-lldb";
rev = "v${version}";
sha256 = "sha256-mi+AeHg9zO0vjF0OZCufPkliInqxTvDGV350wqAwe90=";
fetchSubmodules = true;
sha256 = "sha256-utElXMAJG8X7jFmY/oyrWOCkOiNG3jZHrf04vTBTi7M=";
};
lldb = callPackage ./lldb.nix {};
@ -24,7 +23,7 @@ let
# It will pollute the build environment of `buildRustPackage`.
cargoPatches = [ ./reset-cargo-config.patch ];
cargoSha256 = "sha256-vcL/nSGhyE0INQVWxEIpYwXmnOl1soBn+mymZr1FaSM=";
cargoSha256 = "sha256-ZbD/+QWvpi88bHoSvDG0FKcsTsnthYR1SYkkJhqBbbU=";
nativeBuildInputs = [ makeWrapper ];
@ -71,8 +70,10 @@ in stdenv.mkDerivation rec {
mkdir -p $ext/{adapter,formatters}
mv -t $ext vsix-extracted/extension/*
cp -t $ext/adapter ${adapter}/{bin,lib}/* ../adapter/*.py
wrapProgram $ext/adapter/codelldb \
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
cp -t $ext/formatters ../formatters/*.py
ln -s ${lldb} $ext/lldb
ln -s ${lldb.lib} $ext/lldb
# Mark that all components are installed.
touch $ext/platform.ok
@ -80,7 +81,7 @@ in stdenv.mkDerivation rec {
'';
# `adapter` will find python binary and libraries at runtime.
fixupPhase = ''
postFixup = ''
wrapProgram $out/$installPrefix/adapter/codelldb \
--prefix PATH : "${python3}/bin" \
--prefix LD_LIBRARY_PATH : "${python3}/lib"

View File

@ -1,13 +1,13 @@
# Patched lldb for Rust language support.
{ lldb_11, fetchFromGitHub }:
{ lldb_12, fetchFromGitHub }:
let
llvmSrc = fetchFromGitHub {
owner = "vadimcn";
repo = "llvm-project";
rev = "dd7efd9ea2d38e3227bc2e83a99772aceeb44242";
sha256 = "sha256-XY8J8Ie1cWb6ok72Gju/KUxZ4fIFQVitYVnuCezGRKQ=";
rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687";
sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I=";
};
in lldb_11.overrideAttrs (oldAttrs: {
in lldb_12.overrideAttrs (oldAttrs: {
src = "${llvmSrc}/lldb";
passthru = (oldAttrs.passthru or {}) // {

View File

@ -1,11 +1,19 @@
diff --git a/.cargo/config b/.cargo/config
index c3c75e4..e69de29 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -1,8 +0,0 @@
@@ -1,14 +0,0 @@
-[build]
-target-dir = "build/target"
-
-[target.armv7-unknown-linux-gnueabihf]
-linker = "arm-linux-gnueabihf-gcc"
-rustflags = [
- "-C", "link-arg=-fuse-ld=lld",
- "-C", "link-arg=--target=armv7-unknown-linux-gnueabihf",
-]
-
-[target.aarch64-unknown-linux-gnu]
-linker = "aarch64-linux-gnu-gcc"
-rustflags = [
- "-C", "link-arg=-fuse-ld=lld",
- "-C", "link-arg=--target=aarch64-unknown-linux-gnu",
-]

View File

@ -20,7 +20,7 @@ version="$1"
sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile"
srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version" --fetchSubmodules)
sed -E 's/\bsha256 = ".*?"/sha256 = "'$srcHash'"/' --in-place "$nixFile"
sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile"
cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile"