--- /dev/null
+Param(
+ [switch] $Restore,
+ [string] $RepoRoot
+)
+$windowsNode = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
+$relevantNodeName = "MiniDumpSettings"
+$relevantNode = "$windowsNode\$relevantNodeName"
+$propName = "DisableAuxProviderSignatureCheck"
+$stateFileDirectory = "$RepoRoot\artifacts\tmp"
+$stateFileName = "$stateFileDirectory\SignatureCheck.state"
+
+if ($Restore)
+{
+ if (Test-Path $stateFileName)
+ {
+ Write-Host "Restoring state"
+ $value = Get-Content -Path $stateFileName
+ Write-Host "Restoring state: Set-ItemProperty $relevantNode -Name $propName -Value $value"
+ Set-ItemProperty $relevantNode -Name $propName -Value $value -Type "DWORD"
+ Write-Host "Restoring state: after Set-ItemProperty"
+ }
+}
+else
+{
+ $value = 0
+ if (Test-Path $relevantNode)
+ {
+ try
+ {
+ Write-Host "Disabling state: Get-ItemPropertyValue -Path $relevantNode -Name $propName"
+ $value = Get-ItemPropertyValue -Path $relevantNode -Name $propName
+ }
+ catch
+ {
+ Write-Host "Disabling state: exception"
+ }
+ }
+ else
+ {
+ Write-Host "Disabling state: New-Item -Path $windowsNode -Name $relevantNodeName"
+ New-Item -Path $windowsNode -Name $relevantNodeName | Out-Null
+ }
+ New-Item -Path $stateFileDirectory -Force -ItemType 'Directory' | Out-Null
+ Write-Host "Disabling state: Writing state $value file to $stateFileName"
+ Out-File -Encoding ascii -InputObject $value -FilePath $stateFileName
+ Write-Host "Disabling state: Set-ItemProperty $relevantNode -Name $propName -Value 1"
+ Set-ItemProperty $relevantNode -Name $propName -Value 1 -Type "DWORD"
+ Write-Host "Disabling state: after Set-ItemProperty"
+}
$(MicrosoftDotnetSdkInternalVersion) - .NET SDK to use for testing
- $(VSRedistCommonNetCoreSharedFrameworkx6470Version) - latest dotnet runtime package version (the version to install)
+ $(VSRedistCommonNetCoreSharedFrameworkx6480Version) - latest dotnet runtime package version (the version to install)
$(MicrosoftNETCoreAppRuntimewinx64Version) - latest dotnet runtime stable version (the version that actually is installed)
$(MicrosoftAspNetCoreAppRefInternalVersion) - latest dotnet aspnetcore package version (the version to install)
$(MicrosoftAspNetCoreAppRefVersion) - latest dotnet aspnetcore stable version (the version that actually is installed)
+ $(MicrosoftNETCoreApp70Version) $(MicrosoftAspNetCoreApp70Version) - 7.0 version
$(MicrosoftNETCoreApp60Version) $(MicrosoftAspNetCoreApp60Version) - 6.0 version
$(SingleFileRuntimeLatestVersion) - The latest version of the runtime used to build single-file apps
+ $(SingleFileRuntime70Version) - The 7.0.x version of the runtime used to build single-file apps
$(SingleFileRuntime60Version) - The 6.0.x version of the runtime used to build single-file apps
From Arcade:
<RegeditCommand>regedit.exe</RegeditCommand>
</PropertyGroup>
- <PropertyGroup>
- <Enable31Testing>true</Enable31Testing>
- <Enable31Testing Condition="'$(BuildArch)' == 'arm64' and $([MSBuild]::IsOsPlatform(OSX))">false</Enable31Testing>
- </PropertyGroup>
-
<Choose>
<When Condition="$([MSBuild]::IsOsPlatform(Windows))">
<PropertyGroup>
</Choose>
<ItemGroup Condition="!$(InternalReleaseTesting) and !$(PrivateBuildTesting)">
- <TestVersions Include="Latest" RuntimeVersion="$(VSRedistCommonNetCoreSharedFrameworkx6470Version)" AspNetVersion="$(MicrosoftAspNetCoreAppRefInternalVersion)" />
+ <TestVersions Include="Latest" RuntimeVersion="$(VSRedistCommonNetCoreSharedFrameworkx6480Version)" AspNetVersion="$(MicrosoftAspNetCoreAppRefInternalVersion)" />
+ <TestVersions Include="70" RuntimeVersion="$(MicrosoftNETCoreApp70Version)" AspNetVersion="$(MicrosoftAspNetCoreApp70Version)" />
+ <TestVersions Include="SingleFile70" RuntimeVersion="$(SingleFileRuntime70Version)" />
<TestVersions Include="60" RuntimeVersion="$(MicrosoftNETCoreApp60Version)" AspNetVersion="$(MicrosoftAspNetCoreApp60Version)" />
+ <TestVersions Include="SingleFile60" RuntimeVersion="$(SingleFileRuntime60Version)" />
</ItemGroup>
<!-- Local private build testing -->
<ItemGroup Condition="$(PrivateBuildTesting)">
- <TestVersions Include="Latest" RuntimeVersion="$(VSRedistCommonNetCoreSharedFrameworkx6470Version)" AspNetVersion="$(MicrosoftAspNetCoreAppRefInternalVersion)" />
+ <TestVersions Include="Latest" RuntimeVersion="$(VSRedistCommonNetCoreSharedFrameworkx6480Version)" AspNetVersion="$(MicrosoftAspNetCoreAppRefInternalVersion)" />
</ItemGroup>
<!-- Internal service release testing -->
<PropertyGroup Condition="'$(PrivateBuildTesting)' != 'true' AND '$(InternalReleaseTesting)' != 'true'">
<RuntimeVersion60>$(MicrosoftNETCoreApp60Version)</RuntimeVersion60>
<AspNetCoreVersion60>$(MicrosoftAspNetCoreApp60Version)</AspNetCoreVersion60>
- <!-- TODO: Add others -->
+ <RuntimeVersion70>$(MicrosoftNETCoreApp70Version)</RuntimeVersion70>
+ <AspNetCoreVersion70>$(MicrosoftAspNetCoreApp70Version)</AspNetCoreVersion70>
</PropertyGroup>
<PropertyGroup>
<PrivateBuildTesting>$(PrivateBuildTesting)</PrivateBuildTesting>
<InternalReleaseTesting>$(InternalReleaseTesting)</InternalReleaseTesting>
- <RuntimeVersion31>$(RuntimeVersion31)</RuntimeVersion31>
- <AspNetCoreVersion31>$(AspNetCoreVersion31)</AspNetCoreVersion31>
-
<RuntimeVersion60>$(RuntimeVersion60)</RuntimeVersion60>
<AspNetCoreVersion60>$(AspNetCoreVersion60)</AspNetCoreVersion60>
+ <RuntimeVersion70>$(RuntimeVersion70)</RuntimeVersion70>
+ <AspNetCoreVersion70>$(AspNetCoreVersion70)</AspNetCoreVersion70>
+
<RuntimeVersionLatest>$(RuntimeVersionLatest)</RuntimeVersionLatest>
<AspNetCoreVersionLatest>$(AspNetCoreVersionLatest)</AspNetCoreVersionLatest>
<SingleFileRuntimeLatestVersion>$(SingleFileRuntimeLatestVersion)</SingleFileRuntimeLatestVersion>
<SingleFileRuntime60Version>$(SingleFileRuntime60Version)</SingleFileRuntime60Version>
+ <SingleFileRuntime70Version>$(SingleFileRuntime70Version)</SingleFileRuntime70Version>
</Configuration>
]]>
</TestConfigFileLines>
<!-- Latest symstore version updated by darc -->
<MicrosoftSymbolStoreVersion>1.0.410601</MicrosoftSymbolStoreVersion>
<!-- Latest shared runtime version updated by darc -->
- <VSRedistCommonNetCoreSharedFrameworkx6470Version>7.0.2</VSRedistCommonNetCoreSharedFrameworkx6470Version>
- <MicrosoftNETCoreAppRuntimewinx64Version>7.0.2</MicrosoftNETCoreAppRuntimewinx64Version>
+ <VSRedistCommonNetCoreSharedFrameworkx6480Version>8.0.0-alpha.1.23080.2</VSRedistCommonNetCoreSharedFrameworkx6480Version>
+ <MicrosoftNETCoreAppRuntimewinx64Version>8.0.0-alpha.1.23080.2</MicrosoftNETCoreAppRuntimewinx64Version>
<!-- Latest shared aspnetcore version updated by darc -->
- <MicrosoftAspNetCoreAppRefInternalVersion>7.0.2</MicrosoftAspNetCoreAppRefInternalVersion>
- <MicrosoftAspNetCoreAppRefVersion>7.0.2</MicrosoftAspNetCoreAppRefVersion>
+ <MicrosoftAspNetCoreAppRefInternalVersion>8.0.0-alpha.1.23079.1</MicrosoftAspNetCoreAppRefInternalVersion>
+ <MicrosoftAspNetCoreAppRefVersion>8.0.0-alpha.1.23079.1</MicrosoftAspNetCoreAppRefVersion>
<!-- dotnet/installer: Testing version of the SDK. Needed for the signed & entitled host. -->
- <MicrosoftDotnetSdkInternalVersion>7.0.103-servicing.23073.22</MicrosoftDotnetSdkInternalVersion>
+ <MicrosoftDotnetSdkInternalVersion>8.0.100-alpha.1.23080.8</MicrosoftDotnetSdkInternalVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Runtime versions to test -->
- <MicrosoftNETCoreApp60Version>6.0.8</MicrosoftNETCoreApp60Version>
+ <MicrosoftNETCoreApp60Version>6.0.12</MicrosoftNETCoreApp60Version>
<MicrosoftAspNetCoreApp60Version>$(MicrosoftNETCoreApp60Version)</MicrosoftAspNetCoreApp60Version>
+ <MicrosoftNETCoreApp70Version>7.0.2</MicrosoftNETCoreApp70Version>
+ <MicrosoftAspNetCoreApp70Version>$(MicrosoftNETCoreApp70Version)</MicrosoftAspNetCoreApp70Version>
<!-- The SDK runtime version used to build single-file apps (currently hardcoded) -->
- <SingleFileRuntime60Version>6.0.8</SingleFileRuntime60Version>
- <SingleFileRuntimeLatestVersion>7.0.2</SingleFileRuntimeLatestVersion>
+ <SingleFileRuntime60Version>$(MicrosoftNETCoreApp60Version)</SingleFileRuntime60Version>
+ <SingleFileRuntime70Version>$(MicrosoftNETCoreApp70Version)</SingleFileRuntime70Version>
+ <SingleFileRuntimeLatestVersion>8.0.0-alpha.1.23076.9</SingleFileRuntimeLatestVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Opt-in/out repo features -->
{
"tools": {
- "dotnet": "7.0.101",
+ "dotnet": "8.0.100-alpha.1.23063.11",
"runtimes": {
- "dotnet/x64": [
+ "dotnet": [
"$(MicrosoftNETCoreApp60Version)",
- "$(VSRedistCommonNetCoreSharedFrameworkx6470Version)"
+ "$(MicrosoftNETCoreApp70Version)",
+ "$(VSRedistCommonNetCoreSharedFrameworkx6480Version)"
],
"dotnet/x86": [
"$(MicrosoftNETCoreApp60Version)",
- "$(VSRedistCommonNetCoreSharedFrameworkx6470Version)"
- ],
- "dotnet/arm64": [
- "$(MicrosoftNETCoreApp60Version)",
- "$(VSRedistCommonNetCoreSharedFrameworkx6470Version)"
+ "$(MicrosoftNETCoreApp70Version)",
+ "$(VSRedistCommonNetCoreSharedFrameworkx6480Version)"
]
}
},
}
/// <summary>
- /// The framework type/version used to build the debuggee like "netcoreapp3.1" or "netstandard2.0".
+ /// The framework type/version used to build the debuggee like "net6.0" or "net7.0"
/// </summary>
public string BuildProjectFramework
{
<TestWebApp3>true</TestWebApp3>
<TestWebApp3 Condition="'$(InternalReleaseTesting)' == 'true'">false</TestWebApp3>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
<CliPath>$(DotNetRoot)/dotnet</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
<!--
Single file (debuggees cli built)
-->
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <!-- Add the symbol server so SOS can find DAC/DBI for single file apps which
- may not have been built with the runtime pointed by RuntimeSymbolsPath
- since we use the arcade provided SDK (in .dotnet) to build them. -->
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
- <Option Condition="'$(RuntimeVersion60)' != ''">
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
<DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
<!--
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
<SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees</DebuggeeBuildRoot>
<TestName>SOS.StackAndOtherTests</TestName>
<Options>
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
- <Option Condition="'$(RuntimeVersion60)' != ''">
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
<Option Condition="'$(RuntimeVersionLatest)' != ''">
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(AspNetCoreVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ <FrameworkVersion>$(AspNetCoreVersion70)</FrameworkVersion>
+ </Option>
<Option Condition="'$(AspNetCoreVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<TestDesktop Condition="'$(InternalReleaseTesting)' == 'true'">false</TestDesktop>
<TestDesktop Condition="'$(TargetArchitecture)' == 'arm64'">false</TestDesktop>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
- <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">net5.0</BuildProjectFrameworkLatest>
<DesktopFrameworkPath Condition="$(TargetArchitecture) == x64">$(WinDir)\Microsoft.Net\Framework64\v4.0.30319\</DesktopFrameworkPath>
<DesktopFrameworkPath Condition="$(TargetArchitecture) != x64">$(WinDir)\Microsoft.Net\Framework\v4.0.30319\</DesktopFrameworkPath>
<CliPath>$(DotNetRoot)\dotnet.exe</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
<!--
Single file (debuggees cli built)
-->
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <!-- Add the symbol server so SOS can find DAC/DBI for single file apps which
- may not have been built with the runtime pointed by RuntimeSymbolsPath
- since we use the arcade provided SDK (in .dotnet) to build them. -->
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
- <Option Condition="'$(RuntimeVersion60)' != ''">
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
<DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
<!--
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
<SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees</DebuggeeBuildRoot>
<TestName>SOS.StackAndOtherTests</TestName>
<Options>
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
- <Option Condition="'$(RuntimeVersion60)' != ''">
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
<Option Condition="'$(RuntimeVersionLatest)' != ''">
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
</Option>
</Options>
<Options>
- <Option Condition="'$(AspNetCoreVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
<PublishSingleFile>true</PublishSingleFile>
- <SetSymbolServer>-ms</SetSymbolServer>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
</Option>
<Option Condition="'$(AspNetCoreVersionLatest)' != ''">
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(AspNetCoreVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ <FrameworkVersion>$(AspNetCoreVersion70)</FrameworkVersion>
+ </Option>
<Option Condition="'$(AspNetCoreVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net6.0)
install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net7.0)
+install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net8.0)
<DebugType Condition="'$(TargetFramework)' == 'net462'">full</DebugType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>false</Optimize>
- <BuildTargetFrameworks>net6.0;net7.0</BuildTargetFrameworks>
+ <BuildTargetFrameworks>net6.0;net7.0;net8.0</BuildTargetFrameworks>
</PropertyGroup>
</Project>
--- /dev/null
+using Microsoft.Diagnostics.TestHelpers;
+using Microsoft.Win32;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using Xunit;
+
+public class DumpGenerationFixture : IDisposable
+{
+ private static readonly string _root = RuntimeInformation.ProcessArchitecture == Architecture.X86 ? @"SOFTWARE\WOW6432Node\" : @"SOFTWARE\";
+ private static readonly string _nodePath = _root + @"Microsoft\Windows NT\CurrentVersion\";
+ private static readonly string _auxiliaryNode = _nodePath + "MiniDumpAuxiliaryDlls";
+ private static readonly string _knownNode = _nodePath + "KnownManagedDebuggingDlls";
+
+ private HashSet<string> _paths;
+
+ public DumpGenerationFixture()
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ // Create a unique list of all the runtime paths used by the tests
+ HashSet<string> paths = new();
+ foreach (TestConfiguration config in TestRunConfiguration.Instance.Configurations)
+ {
+ if (config.IsNETCore && config.RuntimeFrameworkVersionMajor >= 8)
+ {
+ string path = config.RuntimeSymbolsPath;
+ if (!string.IsNullOrEmpty(path))
+ {
+ paths.Add(path);
+ }
+ }
+ }
+
+ try
+ {
+ using RegistryKey auxiliaryKey = Registry.LocalMachine.CreateSubKey(_auxiliaryNode, writable: true);
+ using RegistryKey knownKey = Registry.LocalMachine.CreateSubKey(_knownNode, writable: true);
+
+ foreach (string path in paths)
+ {
+ string dacPath = Path.Combine(path, "mscordaccore.dll");
+ string runtimePath = Path.Combine(path, "coreclr.dll");
+ knownKey.SetValue(dacPath, 0, RegistryValueKind.DWord);
+ auxiliaryKey.SetValue(runtimePath, dacPath, RegistryValueKind.String);
+ }
+
+ // Save the paths after writing them successfully to registry
+ _paths = paths;
+ }
+ catch (Exception ex) when (ex is UnauthorizedAccessException)
+ {
+ }
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_paths is not null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ try
+ {
+ IEnumerable<string> paths = _paths;
+ _paths = null;
+
+ using RegistryKey auxiliaryKey = Registry.LocalMachine.CreateSubKey(_auxiliaryNode, writable: true);
+ using RegistryKey knownKey = Registry.LocalMachine.CreateSubKey(_knownNode, writable: true);
+
+ foreach (string path in paths)
+ {
+ string dacPath = Path.Combine(path, "mscordaccore.dll");
+ string runtimePath = Path.Combine(path, "coreclr.dll");
+ knownKey.DeleteValue(dacPath);
+ auxiliaryKey.DeleteValue(runtimePath);
+ }
+ }
+ catch (Exception ex) when (ex is ArgumentException || ex is IOException || ex is UnauthorizedAccessException)
+ {
+ }
+ }
+ }
+}
+
+[CollectionDefinition("Windows Dump Generation")]
+public class DumpGenerationCollection : ICollectionFixture<DumpGenerationFixture>
+{
+}
commands.Add($"!SetClrPath {runtimeSymbolsPath}");
}
}
- if (!isHostRuntimeNone && !string.IsNullOrEmpty(setSymbolServer))
+ if (!isHostRuntimeNone)
{
- commands.Add($"!SetSymbolServer {setSymbolServer}");
+ // If single-file app, add the debuggee directory containing the PDBs and
+ // add the symbol server so SOS can find DAC/DBI for single file apps which
+ // may not have been built with the runtime pointed by RuntimeSymbolsPath
+ // since we use the arcade provided SDK (in .dotnet) to build them.
+ if (_config.PublishSingleFile)
+ {
+ string appRootDir = ReplaceVariables(_variables, "%DEBUG_ROOT%");
+ commands.Add($"!SetSymbolServer -ms -directory {appRootDir}");
+ }
+ if (!string.IsNullOrEmpty(setSymbolServer))
+ {
+ commands.Add($"!SetSymbolServer {setSymbolServer}");
+ }
}
break;
case NativeDebugger.Lldb:
}
}
#endif
- if (!isHostRuntimeNone && !string.IsNullOrEmpty(setSymbolServer))
+ if (!isHostRuntimeNone)
{
- commands.Add($"setsymbolserver {setSymbolServer}");
+ // If single-file app, add the debuggee directory containing the PDBs and
+ // add the symbol server so SOS can find DAC/DBI for single file apps which
+ // may not have been built with the runtime pointed by RuntimeSymbolsPath
+ // since we use the arcade provided SDK (in .dotnet) to build them.
+ if (_config.PublishSingleFile)
+ {
+ string appRootDir = ReplaceVariables(_variables, "%DEBUG_ROOT%");
+ commands.Add($"setsymbolserver -ms -directory {appRootDir}");
+ }
+ if (!string.IsNullOrEmpty(setSymbolServer))
+ {
+ commands.Add($"setsymbolserver {setSymbolServer}");
+ }
}
SwitchToExceptionThread();
break;
throw new Exception(poutTag + " can't be used when there is no previous command output");
}
int startRegexIndex = firstPOUT + poutTag.Length;
- string poutRegex = input.Substring(startRegexIndex, secondPOUT - startRegexIndex);
+ string poutRegex = input[startRegexIndex..secondPOUT];
Match m = Regex.Match(_lastCommandOutput, ReplaceVariables(poutRegex), RegexOptions.Multiline);
if (!m.Success)
{
{
command = ProcessCommand(command);
}
+ if (Debugger == NativeDebugger.Lldb)
+ {
+ // Back quotes need to be escaped so lldb passes them through
+ command = command.Replace("`", "'`");
+ }
_processRunner.StandardInputWriteLine(command);
ScriptLogger.CommandResult result = await _scriptLogger.WaitForCommandOutput();
_lastCommandOutput = result.CommandOutput;
-
+ if (Debugger == NativeDebugger.Cdb)
+ {
+ // Remove the cdb prompt because it interferes with script's regex's
+ _lastCommandOutput = _lastCommandOutput?.Replace("0:000>", string.Empty);
+ }
return result.CommandSucceeded;
}
# 3) Take a dump of the executable before it exits
# 4) Open the dump, find concurrent dictionaries and compare the output
-!IFDEF:CDB
-!IFDEF:LLDB
IFDEF:NETCORE_OR_DOTNETDUMP
# Load SOS even though it doesn't actually load the sos module on dotnet-dump but it runs some initial settings/commands.
LOADSOS
-COMMAND: dcd
+EXTCOMMAND: dcd
VERIFY: Missing ConcurrentDictionary address
-COMMAND: dcd abcdefgh
+EXTCOMMAND: dcd abcdefgh
VERIFY: Hexadecimal address expected
-COMMAND: dcd 0000000000000001
+EXTCOMMAND: dcd 0000000000000001
VERIFY: is not referencing an object
# Checks on ConcurrentDictionary<int, string[]>
!IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.Int32, System.Private.CoreLib\],\[System.String\[\], System.Private.CoreLib\]\]<POUT>
ENDIF:DESKTOP
-COMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
+EXTCOMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
VERIFY: 2 items
VERIFY: Key: 2
-COMMAND: dumparray <POUT>Key: 1\s+Value: dumparray (<HEXVAL>)<POUT>
+EXTCOMMAND: dumparray <POUT>Key: 1\s+Value: dumparray (<HEXVAL>)<POUT>
VERIFY: Name:\s+System.String\[\]
VERIFY: Number of elements 4
# Checks on ConcurrentDictionary<int, int>
-SOSCOMMAND: dumpheap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
+SOSCOMMAND: DumpHeap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.Int32, mscorlib\],\[System.Int32, mscorlib\]\]<POUT>
ENDIF:DESKTOP
!IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.Int32, System.Private.CoreLib\],\[System.Int32, System.Private.CoreLib\]\]<POUT>
ENDIF:DESKTOP
-COMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
+EXTCOMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
VERIFY: 3 items
VERIFY: Key: 0\s+Value: 1
VERIFY: Key: 31\s+Value: 17
VERIFY: Key: 1521482\s+Value: 512487
# Checks on ConcurrentDictionary<string, bool>
-SOSCOMMAND: dumpheap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
+SOSCOMMAND: DumpHeap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.String, mscorlib\],\[System.Boolean, mscorlib\]\]<POUT>
ENDIF:DESKTOP
!IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.String, System.Private.CoreLib\],\[System.Boolean, System.Private.CoreLib\]\]<POUT>
ENDIF:DESKTOP
-COMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
+EXTCOMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
VERIFY: 3 items
VERIFY: Key: "String true"\s+Value: True
VERIFY: Key: "String false"\s+Value: False
VERIFY: Key: "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\.\.\.\s+Value: False
# Checks on ConcurrentDictionary<DumpSampleStruct, DumpSampleClass>
-SOSCOMMAND: dumpheap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
+SOSCOMMAND: DumpHeap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[DotnetDumpCommands\.Program\+DumpSampleStruct, DotnetDumpCommands\],\[DotnetDumpCommands\.Program\+DumpSampleClass, DotnetDumpCommands\]\]<POUT>
-COMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
+EXTCOMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
VERIFY: 2 items
VERIFY: Key: dumpvc <HEXVAL> <HEXVAL>\s+Value: null
VERIFY: Key: dumpvc <HEXVAL> <HEXVAL>\s+Value: dumpobj <HEXVAL>
ENDIF:32BIT
# Checks on ConcurrentDictionary<int, DumpSampleStruct>
-SOSCOMMAND: dumpheap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
+SOSCOMMAND: DumpHeap -stat -type System.Collections.Concurrent.ConcurrentDictionary`2[[
IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.Int32, mscorlib\],\[DotnetDumpCommands\.Program\+DumpSampleStruct, DotnetDumpCommands\]\]<POUT>
ENDIF:DESKTOP
!IFDEF:DESKTOP
SOSCOMMAND: DumpHeap -mt <POUT>^(<HEXVAL>) .*System.Collections.Concurrent.ConcurrentDictionary`2\[\[System.Int32, System.Private.CoreLib\],\[DotnetDumpCommands\.Program\+DumpSampleStruct, DotnetDumpCommands\]\]<POUT>
ENDIF:DESKTOP
-COMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
+EXTCOMMAND: dcd <POUT>^(<HEXVAL>)\s+<HEXVAL>\s+\d+<POUT>
VERIFY: 1 items
VERIFY: Key: 0\s+Value: dumpvc <HEXVAL> <HEXVAL>
SOSCOMMAND: dumpvc <POUT>dumpvc (<HEXVAL> <HEXVAL>)<POUT>
VERIFY: instance\s+12\s+IntValue
VERIFY: instance\s+<HEXVAL>\s+StringValue
VERIFY: instance\s+<HEXVAL>\s+Date
-ENDIF:NETCORE_OR_DOTNETDUMP
-ENDIF:LLDB
-ENDIF:CDB
\ No newline at end of file
+
+ENDIF:NETCORE_OR_DOTNETDUMP
\ No newline at end of file
-# Concurrent dictionaries dump command
+# Test the dumpgen command
# 1) Load the executable
# 2) Run the executable
# 3) Take a dump of the executable before it exits
# 4) Open the dump, find objects in different generations and compare the output
-!IFDEF:CDB
-!IFDEF:LLDB
IFDEF:NETCORE_OR_DOTNETDUMP
# Load SOS even though it doesn't actually load the sos module on dotnet-dump but it runs some initial settings/commands.
LOADSOS
-COMMAND: dumpgen
+EXTCOMMAND: dumpgen
VERIFY: Generation argument is missing
-COMMAND: dumpgen invalid
+EXTCOMMAND: dumpgen invalid
VERIFY: invalid is not a supported generation
-COMMAND: dumpgen gen0 -mt
+!IFDEF:LLDB
+EXTCOMMAND: dumpgen gen0 -mt
VERIFY: Required argument missing for option: -mt
-COMMAND: dumpgen gen1 -mt zzzzz
+EXTCOMMAND: dumpgen gen1 -mt zzzzz
VERIFY: Hexadecimal address expected for -mt option
+ENDIF:LLDB
-COMMAND: dumpgen gen0
+EXTCOMMAND: dumpgen gen0
VERIFY: ^\s+MT\s+Count\s+TotalSize\s+Class Name
VERIFY: ^<HEXVAL>\s+10\s+<DECVAL>\s+DotnetDumpCommands\.Program\+DumpSampleClass
-COMMAND: dumpgen gen0 -type DotnetDumpCommands
+EXTCOMMAND: dumpgen gen0 -type DotnetDumpCommands
VERIFY: ^<HEXVAL>\s+10\s+<DECVAL>\s+DotnetDumpCommands\.Program\+DumpSampleClass
VERIFY: Total 10 objects
-COMMAND: dumpgen gen0 -mt <POUT>^(<HEXVAL>)<POUT>
+EXTCOMMAND: dumpgen gen0 -mt <POUT>^(<HEXVAL>)<POUT>
VERIFY: ^\s+Address\s+MT\s+Size
VERIFY: Total 10 objects
VERIFY: (<HEXVAL>\s+<HEXVAL>\s+<DECVAL>){10}
-COMMAND: dumpgen gen0 -mt 00000001
+EXTCOMMAND: dumpgen gen0 -mt 00000001
VERIFY: Total 0 objects
-COMMAND: dumpgen gen0 -type NoMatchingType
+EXTCOMMAND: dumpgen gen0 -type NoMatchingType
VERIFY: Total 0 objects
-COMMAND: dumpgen gen1
+EXTCOMMAND: dumpgen gen1
VERIFY: ^<HEXVAL>\s+3\s+<DECVAL>\s+DotnetDumpCommands\.Program\+DumpSampleClass
-COMMAND: dumpgen gen2
+EXTCOMMAND: dumpgen gen2
VERIFY: ^<HEXVAL>\s+5\s+<DECVAL>\s+DotnetDumpCommands\.Program\+DumpSampleClass
!VERIFY: ^<HEXVAL>\s+1\s+100<DECVAL>\s+System.Byte\[\]
-COMMAND: dumpgen loh
+EXTCOMMAND: dumpgen loh
VERIFY: ^<HEXVAL>\s+1\s+<DECVAL>\s+DotnetDumpCommands\.Program\+DumpSampleClass\[\]
IFDEF:MAJOR_RUNTIME_VERSION_GE_5
-COMMAND: dumpgen poh
+EXTCOMMAND: dumpgen poh
VERIFY: ^<HEXVAL>\s+1\s+100<DECVAL>\s+System.Byte\[\]
ENDIF:MAJOR_RUNTIME_VERSION_GE_5
SOSCOMMAND: dumpheap -stat
-ENDIF:NETCORE_OR_DOTNETDUMP
-ENDIF:LLDB
-ENDIF:CDB
\ No newline at end of file
+ENDIF:NETCORE_OR_DOTNETDUMP
\ No newline at end of file
VERIFY:\s*File:\s+.*SymbolTestApp\.(dll|exe)\s+
ENDIF:MAJOR_RUNTIME_VERSION_GE_7
+IFDEF:MAJOR_RUNTIME_VERSION_GE_8
+SOSCOMMAND:DumpMT <POUT>\s*Method Table:\s+(<HEXVAL>)\s+<POUT>
+VERIFY:\s*Name:\s+SymbolTestApp.Program\s+
+VERIFY:\s*File:\s+.*SymbolTestApp\.(dll|exe)\s+
+ENDIF:MAJOR_RUNTIME_VERSION_GE_8
+
SOSCOMMAND:FinalizeQueue
VERIFY:\s*SyncBlocks to be cleaned up:\s+<DECVAL>\s+
VERIFY:(\s*Free-Threaded Interfaces to be released:\s+<DECVAL>\s+)?
}
size_t card = (objAddr - card_table_lowest_addr) / card_size;
+ TADDR card_addr = card_table + (card_word(card) * sizeof(DWORD));
DWORD value;
- if (MOVE(value, card_table + card_word(card)*sizeof(DWORD)) != S_OK)
+ if (MOVE(value, card_addr) != S_OK)
{
- ExtErr("Error reading card bits\n");
+ ExtErr("Error reading card bits - obj %p card %08x card_addr %p card_table %p\n", objAddr, card, card_addr, card_table);
return FALSE;
}
// there are no SyncBlocks in the process.
DacpSyncBlockData syncBlockData;
if (SUCCEEDED(syncBlockData.Request(g_sos, 1)))
+ {
mTotal = syncBlockData.SyncBlockCount;
-
- mSyncBlk = mCurr;
+ mSyncBlk = mCurr;
+ }
}
GCHeap::GCHeap()
ExtOut ("\n");
}
- return Status;
+ return S_OK;
}
DECLARE_API(FindAppDomain)
}
// As it turns out the lldb ReadMemory API doesn't do partial reads and the SOS
- // caching depends on that behavior. Round up to the next page boundry and attempt
- // to read up to the page boundries.
- nextPageStart = (offset + PAGE_SIZE - 1) & PAGE_MASK;
+ // caching depends on that behavior. Round up to the next page boundary and attempt
+ // to read up to the page boundaries.
+ nextPageStart = (offset + PAGE_SIZE) & PAGE_MASK;
+ bytesRead = 0;
while (bufferSize > 0)
{
<LogDir>$(RootBinDir)/TestResults/$(TargetConfiguration)/common.unittests_$(Timestamp)</LogDir>
<!-- Build the debuggee for this framework version but run it on latest -->
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
- <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">net5.0</BuildProjectFrameworkLatest>
<TestProduct>ProjectK</TestProduct>
<DebuggeeSourceRoot>$(RepoRootDir)/src/tests</DebuggeeSourceRoot>
<CliPath>$(DotNetRoot)/dotnet</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
+ dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
dotnet-public=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<LogDir>$(RootBinDir)\TestResults\$(TargetConfiguration)\common.unittests_$(Timestamp)</LogDir>
<!-- Build the debuggee for this framework version but run it on latest -->
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
- <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">net5.0</BuildProjectFrameworkLatest>
<TestProduct>ProjectK</TestProduct>
<DebuggeeSourceRoot>$(RepoRootDir)\src\tests</DebuggeeSourceRoot>
<CliPath>$(DotNetRoot)\dotnet.exe</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
+ dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
dotnet-public=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<BuildProjectFramework>net6.0</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersion60)</RuntimeFrameworkVersion>
<InstallDir>$(RootBinDir)/bin/$(OS).$(TargetArchitecture).$(TargetConfiguration)</InstallDir>
<LogDir>$(RootBinDir)/TestResults/$(TargetConfiguration)/dbgshim.unittests_$(Timestamp)</LogDir>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
<CliPath>$(DotNetRoot)/dotnet</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
<!--
Single file
-->
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<PublishSingleFile>true</PublishSingleFile>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net6.0</BuildProjectFramework>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
+ </Option>
<!--
Default
-->
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)/Debuggees</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<InstallDir>$(RootBinDir)\bin\Windows_NT.$(TargetArchitecture).$(TargetConfiguration)</InstallDir>
<LogDir>$(RootBinDir)\TestResults\$(TargetConfiguration)\dbgshim.unittests_$(Timestamp)</LogDir>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '8')">net8.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '7')">net7.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net6.0</BuildProjectFrameworkLatest>
<CliPath>$(DotNetRoot)\dotnet.exe</CliPath>
<NuGetPackageFeeds>
+ dotnet8=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json;
dotnet7=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet7/nuget/v3/index.json;
dotnet6=https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json;
dotnet-core=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
<!--
Single file
-->
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <Option Condition="'$(SingleFileRuntimeLatestVersion)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<PublishSingleFile>true</PublishSingleFile>
<BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
<RuntimeFrameworkVersion>$(SingleFileRuntimeLatestVersion)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(SingleFileRuntime70Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime70Version)</RuntimeFrameworkVersion>
+ </Option>
+ <Option Condition="'$(SingleFileRuntime60Version)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>net6.0</BuildProjectFramework>
+ <PublishSingleFile>true</PublishSingleFile>
+ <BuildProjectRuntime>$(TargetRid)</BuildProjectRuntime>
+ <RuntimeFrameworkVersion>$(SingleFileRuntime60Version)</RuntimeFrameworkVersion>
+ </Option>
<!--
Default
-->
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
+ <Option Condition="'$(RuntimeVersion70)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees</DebuggeeBuildRoot>
+ <BuildProjectFramework>net7.0</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersion70)</RuntimeFrameworkVersion>
+ </Option>
<Option Condition="'$(RuntimeVersion60)' != ''">
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees</DebuggeeBuildRoot>
<BuildProjectFramework>net6.0</BuildProjectFramework>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
using System.Diagnostics;
using System.IO.Pipes;
using System.Linq;
+using System.Threading;
namespace EventPipeTracee
{
while (DateTime.UtcNow < targetDateTime)
{
acc++;
- if (acc % 1_000_000 == 0)
+ if (acc % 10_000_000 == 0)
{
Console.WriteLine($"{pid} Spin waiting...");
}
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Project>
{
processInfoBeforeResume = await clientShim.GetProcessInfo();
ValidateProcessInfo(runner.Pid, processInfoBeforeResume);
- Assert.True(string.IsNullOrEmpty(processInfoBeforeResume.ManagedEntrypointAssemblyName));
+ Assert.True((config.RuntimeFrameworkVersionMajor < 8) == string.IsNullOrEmpty(processInfoBeforeResume.ManagedEntrypointAssemblyName));
await clientShim.ResumeRuntime();
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Project>