Skip to content

Commit 946cea4

Browse files
authored
Merge pull request #1199 from microsoft/main
Merge 'main' into 'release/cpptools'
2 parents c3aefaa + d30bcc0 commit 946cea4

File tree

8 files changed

+60
-12
lines changed

8 files changed

+60
-12
lines changed

eng/pipelines/steps/PublishOpenDebugAD7.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ steps:
1212
copy ${{ parameters.SignedBinariesFolder }}\Release\Microsoft.MICore.dll $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
1313
displayName: "Publish OpenDebugAD7 ${{ parameters.RuntimeID }}"
1414

15-
# Windows Steps for copying over OpenDebugAD7.exe, WindowsDebugLauncher.exe, and verify the windows binaries.
15+
# Windows Steps for signing OpenDebugAD7.exe, copying over WindowsDebugLauncher.exe, and verify the windows binaries.
1616
- ${{ if startsWith(parameters.RuntimeID, 'win') }}:
17+
- template: ../tasks/MSBuild.yml
18+
parameters:
19+
DisplayName: "Sign OpenDebugAD7.exe"
20+
solution: $(Build.SourcesDirectory)\src\OpenDebugAD7\OpenDebugAD7.csproj
21+
configuration: ${{ parameters.Configuration }}
22+
msbuildArguments: '/t:SignPublishedFiles /p:PublishPath=$(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin'
23+
env: {
24+
"SIGN_TYPE": "$(SignType)"
25+
}
26+
1727
- script: |
18-
copy ${{ parameters.SignedBinariesFolder }}\Release\vscode\OpenDebugAD7.exe $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
1928
copy ${{ parameters.SignedBinariesFolder }}\Release\vscode\WindowsDebugLauncher.exe $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
20-
displayName: "Copy OpenDebugAD7.exe and WindowsDebugLauncher.exe"
29+
displayName: "Copy WindowsDebugLauncher.exe"
2130
2231
- template: ../tasks/SignVerify.yml
2332
parameters:

eng/pipelines/templates/VSCode-release.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
parameters:
3-
rids: ["win7-x86", "win-x64", "win10-arm64", "osx-x64", "linux-x64", "linux-arm", "linux-arm64", "linux-musl-x64" ]
3+
rids: ["win-x86", "win10-arm64", "osx-x64", "linux-x64", "linux-arm", "linux-arm64", "linux-musl-x64" ]
44

55
steps:
66
- checkout: self

src/DebugEngineHost.VSCode/DebugEngineHost.VSCode.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<OutputPath>$(MIDefaultOutputPath)\vscode</OutputPath>
1919
<DropSubDir>vscode</DropSubDir>
2020
<TargetFramework>netstandard2.0</TargetFramework>
21-
<Prefer32Bit>false</Prefer32Bit>
2221
</PropertyGroup>
2322

2423
<ItemGroup Label="Compile Shared Interfaces">

src/MICore/MICore.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
would take a fair amount of work.-->
1818
<NoWarn>$(NoWarn);1591</NoWarn>
1919
<TargetFramework>netstandard2.0</TargetFramework>
20-
<Prefer32Bit>false</Prefer32Bit>
2120
</PropertyGroup>
2221
<ItemGroup>
2322
<None Include="SGEN_SHA2_SIGNATUREKEY" />

src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
746746
commands.Add(new LaunchCommand("-target-attach " + _launchOptions.ProcessId.Value.ToString(CultureInfo.InvariantCulture), ignoreFailures: false, failureHandler: failureHandler));
747747
}
748748

749-
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
749+
if (_launchOptions.PostRemoteConnectCommands != null)
750+
{
751+
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
752+
}
753+
750754

751755
if (this.MICommandFactory.Mode == MIMode.Lldb)
752756
{
@@ -832,7 +836,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
832836
}
833837

834838
}
835-
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
839+
840+
if (_launchOptions.PostRemoteConnectCommands != null)
841+
{
842+
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
843+
}
836844

837845
// Environment variables are set for the debuggee only with the modes that support that
838846
foreach (EnvironmentEntry envEntry in _launchOptions.Environment)

src/MIDebugEngine/MIDebugEngine.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1313
<OutputPath>$(MIDefaultOutputPath)</OutputPath>
1414
<TargetFramework>netstandard2.0</TargetFramework>
15-
<Prefer32Bit>false</Prefer32Bit>
1615
</PropertyGroup>
1716

1817
<ItemGroup>

src/OpenDebugAD7/AD7DebugSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ protected override void HandleInitializeRequestAsync(IRequestResponder<Initializ
822822
SupportsModulesRequest = true,
823823
AdditionalModuleColumns = additionalModuleColumns,
824824
SupportsGotoTargetsRequest = true,
825-
SupportsDisassembleRequest = true,
825+
SupportsDisassembleRequest = m_engine is IDebugMemoryBytesDAP,
826826
SupportsValueFormattingOptions = true,
827827
SupportsSteppingGranularity = true,
828828
};

src/OpenDebugAD7/OpenDebugAD7.csproj

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<OutputType>Exe</OutputType>
1616
<DropSubDir>vscode</DropSubDir>
1717
<TargetFramework>net5.0</TargetFramework>
18-
<Prefer32Bit>false</Prefer32Bit>
1918

2019
<!--
2120
For non-Windows platforms, .NET Core depends on libicu for data about locales and international settings.
@@ -75,7 +74,6 @@
7574
<ItemGroup Label="Drop Files">
7675
<DropSignedFile Include="$(OutputPath)\OpenDebugAD7.dll" />
7776
<DropUnsignedFile Include="$(OutputPath)\OpenDebugAD7.pdb" />
78-
<DropSignedFile Condition="$([MSBuild]::IsOSPlatform('windows')) AND ('$(RuntimeIdentifier)' == '' OR $(RuntimeIdentifier.Contains('win')))" Include="$(OutputPath)\OpenDebugAD7.exe" />
7977
<!-- We will build OpenDebugAD7 via publish for non-windows -->
8078
<DropThirdPartySignedFile Include="$(OutputPath)\Newtonsoft.Json.dll" />
8179
<DropUnsignedFile Include="$(OutputPath)\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll" />
@@ -90,4 +88,40 @@
9088
<OutputType>Exe</OutputType>
9189
</PropertyGroup>
9290
</Target>
91+
92+
<!--
93+
Run Target to Sign Published Files if we have:
94+
1. The Microbuild Tools
95+
2. On Windows without an RID or targeting Windows RIDs
96+
97+
This target needs to be run directly with /t and /p:PublishPath needs to be set.
98+
-->
99+
<Target Name="SignPublishedFiles" BeforeTargets="" AfterTargets="">
100+
<Error
101+
Condition="'$(PkgMicrosoft_VisualStudioEng_MicroBuild_Core)'=='' and '$(Lab)'!='false' and '$(TEST_LAB_BUILD)'=='' and '$(BUILD_BUILDURI)'!=''"
102+
Text="Microsoft.VisualStudioEng.MicroBuild.Core needs to be added as a PackageReference for SignFiles."
103+
/>
104+
<Error Condition="'$(PublishPath)'==''" Text="PublishPath needs to be set for SignPublishedFiles target." />
105+
106+
<ItemGroup>
107+
<PublishFileToSign Include="$(PublishPath)\OpenDebugAD7.exe" />
108+
</ItemGroup>
109+
110+
<ItemGroup Condition="'$(SIGN_TYPE)' == 'real'">
111+
<!-- Real Signed -->
112+
<PublishedFilesToSign Include="@(PublishFileToSign)">
113+
<Authenticode>Microsoft400</Authenticode>
114+
<StrongName>StrongNameSHA2</StrongName>
115+
</PublishedFilesToSign>
116+
</ItemGroup>
117+
118+
<ItemGroup Condition="'$(SIGN_TYPE)' != 'real'">
119+
<!-- Test Signed -->
120+
<PublishedFilesToSign Include="@(PublishFileToSign)">
121+
<Authenticode>Microsoft400</Authenticode>
122+
</PublishedFilesToSign>
123+
</ItemGroup>
124+
125+
<SignFiles Files="@(PublishedFilesToSign)" Type="$(SIGN_TYPE)" BinariesDirectory="$(PublishPath)" IntermediatesDirectory="$(IntermediateOutputPath)" ESRPSigning="$(ESRPSigning)" UseBearerToken="$(UseBearerToken)" />
126+
</Target>
93127
</Project>

0 commit comments

Comments
 (0)