Skip to content

Commit

Permalink
Add Linux ARM/ARM64 Debugger Packages
Browse files Browse the repository at this point in the history
This PR adds linux ARM and ARM64 packages to package.json.
It also updates platform to check for Linux architecture that have armv
and aarch in the `uname -m` output then set them as arm or arm64.

Also adds a couple of TODO's once the omnisharp extension is ready to
run on the VS Code ARM/ARM64 builds.

See microsoft/vscode#106289
  • Loading branch information
WardenGnaw committed Sep 28, 2020
1 parent 7120374 commit 1ab9c4c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 15 deletions.
56 changes: 47 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@
{
"id": "Debugger",
"description": ".NET Core Debugger (Windows / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/292d2e01-fb93-455f-a6b3-76cddad4f1ef/74935f0979ba7a260417ef919a8c1c9d/coreclr-debug-win7-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-22-2/coreclr-debug-win7-x64.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/8d1b2b0a-94e6-44ac-8ce6-69485e0d82b0/a6e5d292df090afeda4c92d08ecff9ad/coreclr-debug-win7-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-3/coreclr-debug-win7-x64.zip",
"installPath": ".debugger",
"platforms": [
"win32"
Expand All @@ -261,13 +261,13 @@
"x86_64"
],
"installTestPath": "./.debugger/vsdbg-ui.exe",
"integrity": "5D60FAC96542300A410D81096E23A505430BAF8DF77D7CFC92F401B95FA39DAA"
"integrity": "E3CCC5A02F10ACFBAA5ED3F4C127EBA82EE6C72469F170E3667225DD3A32CB60"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (macOS / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/292d2e01-fb93-455f-a6b3-76cddad4f1ef/5a8d7b0b0c3e2a6097259b0ce98a6f37/coreclr-debug-osx-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-22-2/coreclr-debug-osx-x64.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/8d1b2b0a-94e6-44ac-8ce6-69485e0d82b0/ebb4d3c8978249eb02d630e2e991c0dc/coreclr-debug-osx-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-3/coreclr-debug-osx-x64.zip",
"installPath": ".debugger",
"platforms": [
"darwin"
Expand All @@ -280,13 +280,51 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "13AB14F64BC6B83ECAF716BBD9B237BA2D92261DA3E81D3ABBFEF39C9EE5A2A4"
"integrity": "DB6324BD8173FD388477FCF84275B0DEEFC8E1C176A72712BA00BEB8E3DC938A"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / ARM)",
"url": "https://download.visualstudio.microsoft.com/download/pr/8d1b2b0a-94e6-44ac-8ce6-69485e0d82b0/8dbfab7ba8d5b51b3f15f37bf912969f/coreclr-debug-linux-arm.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-3/coreclr-debug-linux-arm.zip",
"installPath": ".debugger",
"platforms": [
"linux"
],
"architectures": [
"arm"
],
"binaries": [
"./vsdbg-ui",
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "84F129C912F08A334E64CCF036FE97BD6ABF9977BAB0D2FB9CB2111C34BC31C4"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / ARM64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/8d1b2b0a-94e6-44ac-8ce6-69485e0d82b0/ac65d3aeaf5eb1038026d2176a356051/coreclr-debug-linux-arm64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-3/coreclr-debug-linux-arm64.zip",
"installPath": ".debugger",
"platforms": [
"linux"
],
"architectures": [
"arm64"
],
"binaries": [
"./vsdbg-ui",
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "9E71DBB9C5AEA015B83C68022A394BB617F35B9C7C77A4A7E812DA9AF9D5F204"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/292d2e01-fb93-455f-a6b3-76cddad4f1ef/2e9b8bc5431d8f6c56025e76eaabbdff/coreclr-debug-linux-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-22-2/coreclr-debug-linux-x64.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/8d1b2b0a-94e6-44ac-8ce6-69485e0d82b0/261de2885425c84381b50e0bf14f62f3/coreclr-debug-linux-x64.zip",
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-3/coreclr-debug-linux-x64.zip",
"installPath": ".debugger",
"platforms": [
"linux"
Expand All @@ -299,7 +337,7 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "AA651AB01CBA4095248AD4239AAB7E58D792B506EF944F2C598151F30C961ED2"
"integrity": "8F612B8EF33090FEC37FF41205FFEB232AD6B3FF6ED3234481CDB4693F95E041"
},
{
"id": "Razor",
Expand Down
14 changes: 8 additions & 6 deletions src/coreclr-debug/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ async function checkForInvalidArchitecture(platformInformation: PlatformInformat
eventStream.post(new DebuggerPrerequisiteFailure("[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer."));
return true;
}
else if (platformInformation.architecture !== "x86_64") {
if (platformInformation.isWindows() && platformInformation.architecture === "x86") {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: x86 Windows is not currently supported by the .NET Core debugger. Debugging will not be available.`));
} else {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: Processor architecture '${platformInformation.architecture}' is not currently supported by the .NET Core debugger. Debugging will not be available.`));
}
else if (platformInformation.isWindows() && platformInformation.architecture === "x86") {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: x86 Windows is not currently supported by the .NET Core debugger. Debugging will not be available.`));
}
else if (platformInformation.isLinux() &&
platformInformation.architecture !== "x86_64" &&
platformInformation.architecture !== "arm" &&
platformInformation.architecture !== "arm64") {
eventStream.post(new DebuggerPrerequisiteWarning(`[WARNING]: Processor architecture '${platformInformation.architecture}' is not currently supported by the .NET Core debugger. Debugging will not be available.`));
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ function isSupportedPlatform(platform: PlatformInformation): boolean {
}

if (platform.isLinux()) {
// TODO: Add 'arm' and 'arm64'
return platform.architecture === "x86_64" ||
platform.architecture === "x86" ||
platform.architecture === "i686";
Expand Down
5 changes: 5 additions & 0 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ export class PlatformInformation {
return util.execChildProcess('uname -m')
.then(architecture => {
if (architecture) {
if (architecture.startsWith('arm64') || architecture.startsWith('aarch64')) {
return 'arm64';
} else if (architecture.startsWith('armv')) {
return 'arm';
}
return architecture.trim();
}

Expand Down
3 changes: 3 additions & 0 deletions tasks/offlinePackagingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ async function doPackageOffline() {
new PlatformInformation('win32', 'x86_64'),
new PlatformInformation('darwin', 'x86_64'),
new PlatformInformation('linux', 'x86_64')
// TODO: arm and arm64
// new PlatformInformation('linux', 'arm')
// new PlatformInformation('linux', 'arm64')
];

for (let platformInfo of packages) {
Expand Down

0 comments on commit 1ab9c4c

Please sign in to comment.