using Microsoft.Diagnostics.Runtime;
using Microsoft.Diagnostics.Runtime.Utilities;
+using Microsoft.FileFormats;
using Microsoft.FileFormats.ELF;
using Microsoft.FileFormats.MachO;
+using Microsoft.FileFormats.PE;
using System;
using System.Collections.Immutable;
using System.Diagnostics;
+using System.IO;
using System.Reflection.PortableExecutable;
using System.Runtime.InteropServices;
using FileVersionInfo = Microsoft.Diagnostics.Runtime.Utilities.FileVersionInfo;
/// <summary>
/// Module base implementation
/// </summary>
- public abstract class Module : IModule, IDisposable
+ public abstract class Module : IModule, IExportSymbols, IDisposable
{
[Flags]
public enum Flags : byte
ServiceProvider.RemoveService(typeof(ELFFile));
ServiceProvider.RemoveService(typeof(PEReader));
});
+ ServiceProvider.AddService<IExportSymbols>(this);
}
public void Dispose()
#endregion
+ #region IExportSymbols
+
+ bool IExportSymbols.TryGetSymbolAddress(string name, out ulong address)
+ {
+ if (Target.OperatingSystem == OSPlatform.Windows)
+ {
+ Stream stream = Target.Services.GetService<IMemoryService>().CreateMemoryStream(ImageBase, ImageSize);
+ PEFile image = new(new StreamAddressSpace(stream), isDataSourceVirtualAddressSpace: true);
+ if (image.IsValid())
+ {
+ if (image.TryGetExportSymbol(name, out ulong offset))
+ {
+ address = ImageBase + offset;
+ return true;
+ }
+ address = 0;
+ return false;
+ }
+ }
+ else if (Target.OperatingSystem == OSPlatform.Linux)
+ {
+ try
+ {
+ Stream stream = Target.Services.GetService<IMemoryService>().CreateMemoryStream(ImageBase, ImageSize);
+ ElfFile elfFile = new(stream, position: ImageBase, leaveOpen: false, isVirtual: true);
+ if (elfFile.Header.IsValid)
+ {
+ if (elfFile.TryGetExportSymbol(name, out ulong offset))
+ {
+ address = ImageBase + offset;
+ return true;
+ }
+ address = 0;
+ return false;
+ }
+ }
+ catch (InvalidDataException)
+ {
+ }
+ }
+ return TryGetSymbolAddressInner(name, out address);
+ }
+
+ protected virtual bool TryGetSymbolAddressInner(string name, out ulong address)
+ {
+ address = 0;
+ return false;
+ }
+
+ #endregion
+
protected VersionData GetVersion()
{
VersionData versionData = null;
/// </summary>
public class ModuleServiceFromDataReader : ModuleService
{
- class ModuleFromDataReader : Module, IExportSymbols
+ class ModuleFromDataReader : Module
{
// This is what clrmd returns for non-PE modules that don't have a timestamp
private const uint InvalidTimeStamp = 0;
_imageSize = imageSize;
_exportReader = exportReader;
ModuleIndex = moduleIndex;
- if (exportReader is not null)
- {
- ServiceProvider.AddService<IExportSymbols>(this);
- }
}
#region IModule
#endregion
- #region IExportSymbols
-
- public bool TryGetSymbolAddress(string name, out ulong address)
+ protected override bool TryGetSymbolAddressInner(string name, out ulong address)
{
if (_exportReader is not null)
{
- // Some exceptions are escaping from the clrmd ELF dump reader. This will be
- // fixed in a clrmd update.
- try
- {
- return _exportReader.TryGetSymbolAddress(ImageBase, name, out address);
- }
- catch (IOException)
- {
- }
+ return _exportReader.TryGetSymbolAddress(ImageBase, name, out address);
}
address = 0;
return false;
}
- #endregion
-
protected override ModuleService ModuleService => _moduleService;
}
public class RuntimeService : IRuntimeService, IDataReader, IExportReader
{
private readonly ITarget _target;
- private readonly bool _exportReaderEnabled;
private readonly IDisposable _onFlushEvent;
private DataTarget _dataTarget;
private List<Runtime> _runtimes;
public RuntimeService(ITarget target)
{
_target = target;
- // TODO - mikem 4/30/21 - remove when dbgeng services doesn't take so long looking up exports (attempts to load PDBs).
- _exportReaderEnabled = target.Host.HostType != HostType.DbgEng || Environment.GetEnvironmentVariable("DOTNET_ENABLE_SOS_SINGLEFILE") == "1";
_onFlushEvent = target.OnFlushEvent.Register(() => {
if (_runtimes is not null && _runtimes.Count == 0)
{
bool IExportReader.TryGetSymbolAddress(ulong baseAddress, string name, out ulong offset)
{
- if (_exportReaderEnabled)
+ try
{
- try
- {
- IExportSymbols exportSymbols = ModuleService.GetModuleFromBaseAddress(baseAddress).Services.GetService<IExportSymbols>();
- if (exportSymbols is not null)
- {
- return exportSymbols.TryGetSymbolAddress(name, out offset);
- }
- }
- catch (DiagnosticsException)
+ IExportSymbols exportSymbols = ModuleService.GetModuleFromBaseAddress(baseAddress).Services.GetService<IExportSymbols>();
+ if (exportSymbols is not null)
{
+ return exportSymbols.TryGetSymbolAddress(name, out offset);
}
}
+ catch (DiagnosticsException)
+ {
+ }
offset = 0;
return false;
}
/// <summary>
/// Symbol server URLs
/// </summary>
- public const string MsdlSymbolServer = "http://msdl.microsoft.com/download/symbols/";
- public const string SymwebSymbolServer = "http://symweb.corp.microsoft.com/";
+ public const string MsdlSymbolServer = "https://msdl.microsoft.com/download/symbols/";
+ public const string SymwebSymbolServer = "https://symweb.corp.microsoft.com/";
private readonly IHost _host;
private string _defaultSymbolCache;
protected static string GetDebuggeeBinaryDllPath(TestConfiguration config, string debuggeeBinaryDirPath, string debuggeeName)
{
- return config.IsNETCore ? Path.Combine(debuggeeBinaryDirPath, debuggeeName + (config.PublishSingleFile ? "" : ".dll")) : null;
+ return config.IsNETCore ? Path.Combine(debuggeeBinaryDirPath, debuggeeName + ".dll") : null;
}
protected static string GetDebuggeeBinaryExePath(TestConfiguration config, string debuggeeBinaryDirPath, string debuggeeName)
{
- return config.IsDesktop ? Path.Combine(debuggeeBinaryDirPath, debuggeeName + ".exe") : null;
+ return config.IsDesktop || config.PublishSingleFile ? Path.Combine(debuggeeBinaryDirPath, debuggeeName + (OS.Kind == OSKind.Windows ? ".exe" : "")) : null;
}
protected static string GetLogPath(TestConfiguration config, string framework, string runtime, string debuggeeName)
{
Debug.Assert(runtimeIdentifier != null);
buildProperties.Add("PublishSingleFile", "true");
+ buildProperties.Add("SelfContained", "true");
}
string debugType = config.DebugType;
if (debugType == null)
GetDebuggeeNativeLibDirPath(config, debuggeeName),
GetBuildProperties(config, runtimeIdentifier),
runtimeIdentifier,
+ config.BuildProjectFramework,
config.LinkerPackageVersion,
debuggeeName,
debuggeeSolutionDirPath,
string debuggeeNativeLibDirPath,
Dictionary<string,string> buildProperties,
string runtimeIdentifier,
+ string runtimeFramework,
string linkerPackageVersion,
string debuggeeName,
string debuggeeSolutionDirPath,
{
BuildProperties = buildProperties;
RuntimeIdentifier = runtimeIdentifier;
+ RuntimeFramework = runtimeFramework;
DebuggeeName = debuggeeName;
ProjectTemplateFileName = debuggeeName + ".csproj";
LinkerPackageVersion = linkerPackageVersion;
/// </summary>
public IDictionary<string,string> BuildProperties { get; }
public string RuntimeIdentifier { get; }
+ public string RuntimeFramework { get; }
public string DebuggeeName { get; }
public string LinkerPackageVersion { get; }
public override string ProjectTemplateFileName { get; }
string extraArgs = "";
if (RuntimeIdentifier != null)
{
- extraArgs = " --runtime " + RuntimeIdentifier;
+ extraArgs += " --runtime " + RuntimeIdentifier;
}
foreach (var prop in BuildProperties)
{
protected override async Task Build(ITestOutputHelper output)
{
string publishArgs = "publish";
+ if (RuntimeFramework != null)
+ {
+ publishArgs += " --framework " + RuntimeFramework;
+ }
if (RuntimeIdentifier != null)
{
publishArgs += " --runtime " + RuntimeIdentifier;
+ publishArgs += " --self-contained true";
}
foreach (var prop in BuildProperties)
{
# This prevents inclusion of standard C compiler headers
add_compile_options(-nostdinc)
endif(CLR_CMAKE_PLATFORM_UNIX)
-
-add_subdirectory(debugshim)
/// </summary>
internal class ModuleServiceFromDebuggerServices : ModuleService
{
- class ModuleFromDebuggerServices : Module, IExportSymbols, IModuleSymbols
+ class ModuleFromDebuggerServices : Module, IModuleSymbols
{
// This is what dbgeng/IDebuggerServices returns for non-PE modules that don't have a timestamp
private const uint InvalidTimeStamp = 0xFFFFFFFE;
IndexFileSize = indexTimeStamp == InvalidTimeStamp ? null : indexFileSize;
IndexTimeStamp = indexTimeStamp == InvalidTimeStamp ? null : indexTimeStamp;
- ServiceProvider.AddService<IExportSymbols>(this);
ServiceProvider.AddService<IModuleSymbols>(this);
}
#endregion
- #region IExportSymbols/IModuleSymbols
+ #region IModuleSymbols
- public bool TryGetSymbolName(ulong address, out string symbol, out ulong displacement)
+ bool IModuleSymbols.TryGetSymbolName(ulong address, out string symbol, out ulong displacement)
{
return _moduleService._debuggerServices.GetSymbolByOffset(ModuleIndex, address, out symbol, out displacement) == HResult.S_OK;
}
- public bool TryGetSymbolAddress(string name, out ulong address)
+ bool IModuleSymbols.TryGetSymbolAddress(string name, out ulong address)
{
return _moduleService._debuggerServices.GetOffsetBySymbol(ModuleIndex, name, out address) == HResult.S_OK;
}
#endregion
+ protected override bool TryGetSymbolAddressInner(string name, out ulong address)
+ {
+ return _moduleService._debuggerServices.GetOffsetBySymbol(ModuleIndex, name, out address) == HResult.S_OK;
+ }
+
protected override ModuleService ModuleService => _moduleService;
}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SOSInitializeDelegate(
- IntPtr IHost);
+ IntPtr IHost,
+ IntPtr IDebuggerServices);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate void SOSUninitializeDelegate();
{
throw new EntryPointNotFoundException($"Can not find SOS module initialization function: {SOSInitialize}");
}
- int result = initializeFunc(_hostWrapper.IHost);
+ int result = initializeFunc(_hostWrapper.IHost, IntPtr.Zero);
if (result != 0)
{
throw new InvalidOperationException($"SOS initialization FAILED 0x{result:X8}");
<LogDir>$(RootBinDir)/TestResults/$(TargetConfiguration)/sos.unittests_$(Timestamp)</LogDir>
<DumpDir>$(RootBinDir)/tmp/$(TargetConfiguration)\dumps</DumpDir>
+ <OSRid>linux</OSRid>
+ <OSRid Condition="$(OS) == OSX">osx</OSRid>
+
<TestWebApp3>true</TestWebApp3>
<TestWebApp3 Condition="'$(InternalReleaseTesting)' == 'true'">false</TestWebApp3>
</NuGetPackageFeeds>
<Options>
+ <!--
+ Single file (debuggees cli built)
+ -->
+ <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</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>$(OSRid)-$(TargetArchitecture)</BuildProjectRuntime>
+ </Option>
<!--
Default (prebuilt)
-->
<TestName>SOS.StackAndOtherTests</TestName>
<Options>
<Option Condition="'$(RuntimeVersionLatest)' != ''">
- <Options>
- <Option>
- <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
- </Option>
- </Options>
+ <DebuggeeBuildRoot>$(RootBinDir)/Debuggees/SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <SetSymbolServer>-ms</SetSymbolServer>
+ <BuildProjectRuntime>$(OSRid)-$(TargetArchitecture)</BuildProjectRuntime>
+ </Option>
+ <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
<Option Condition="'$(RuntimeVersion50)' != ''">
<BuildProjectFramework>net5.0</BuildProjectFramework>
</Option>
</Options>
</Option>
- <!--
- DotnetDumpCommands (runs on every runtime except netcore2.1 on Linux)
- -->
- <Option>
- <Options>
- <Option>
- <TestName>DotnetDumpCommands</TestName>
- </Option>
- </Options>
- <Options>
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
- <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
- <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
- </Option>
- <Option Condition="'$(RuntimeVersion50)' != ''">
- <BuildProjectFramework>net5.0</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
- </Option>
- <Option Condition="'$(RuntimeVersion31)' != ''">
- <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
- <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
- </Option>
- </Options>
- </Option>
</Options>
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">$(RuntimeFrameworkVersion)</FrameworkVersion>
<DumpDir>$(RootBinDir)\tmp\$(TargetConfiguration)\dumps</DumpDir>
<CDBHelperExtension>$(InstallDir)\runcommand.dll</CDBHelperExtension>
- <TestWebApp>true</TestWebApp>
- <TestWebApp Condition="'$(PrivateBuildTesting)' == 'true'">false</TestWebApp>
- <TestWebApp Condition="'$(InternalReleaseTesting)' == 'true'">false</TestWebApp>
-
<TestWebApp3>true</TestWebApp3>
<TestWebApp3 Condition="'$(InternalReleaseTesting)' == 'true'">false</TestWebApp3>
<Option>
<TestProduct>ProjectK</TestProduct>
<Options>
+ <!--
+ Single file (debuggees cli built)
+ -->
+ <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</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>win-$(TargetArchitecture)</BuildProjectRuntime>
+ </Option>
<!--
Default (prebuilt)
-->
<DebuggeeBuildRoot>$(RootBinDir)\Debuggees</DebuggeeBuildRoot>
<TestName>SOS.StackAndOtherTests</TestName>
<Options>
+ <Option Condition="'$(RuntimeVersionLatest)' != ''">
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <SetSymbolServer>-ms</SetSymbolServer>
+ <BuildProjectRuntime>win-$(TargetArchitecture)</BuildProjectRuntime>
+ </Option>
<Option Condition="'$(RuntimeVersionLatest)' != ''">
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
<Option>
<TestName>SOS.DualRuntimes</TestName>
+ <SetSymbolServer>-ms</SetSymbolServer>
<!-- The assembly path, class and function name of the desktop test code to load/run -->
<DesktopTestParameters>$(RootBinDir)\bin\SymbolTestDll\$(TargetConfiguration)\$(DesktopFramework)\SymbolTestDll.dll SymbolTestDll.TestClass ThrowException</DesktopTestParameters>
</Option>
</Options>
<Options>
+ <Option Condition="'$(AspNetCoreVersionLatest)' != ''">
+ <DebuggeeBuildProcess>cli</DebuggeeBuildProcess>
+ <DebuggeeBuildRoot>$(RootBinDir)\Debuggees\SingleFile</DebuggeeBuildRoot>
+ <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
+ <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
+ <PublishSingleFile>true</PublishSingleFile>
+ <SetSymbolServer>-ms</SetSymbolServer>
+ <BuildProjectRuntime>win-$(TargetArchitecture)</BuildProjectRuntime>
+ </Option>
<Option Condition="'$(AspNetCoreVersionLatest)' != ''">
<BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
<RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
</Option>
</Options>
</Option>
- <Option>
- <Options>
- <Option>
- <TestName>DotnetDumpCommands</TestName>
- </Option>
- </Options>
- <Options>
- <Option Condition="'$(RuntimeVersionLatest)' != ''">
- <BuildProjectFramework>$(BuildProjectFrameworkLatest)</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersionLatest)</RuntimeFrameworkVersion>
- <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
- </Option>
- <Option Condition="'$(RuntimeVersion50)' != ''">
- <BuildProjectFramework>net5.0</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersion50)</RuntimeFrameworkVersion>
- </Option>
- <Option Condition="'$(RuntimeVersion31)' != ''">
- <BuildProjectFramework>netcoreapp3.1</BuildProjectFramework>
- <RuntimeFrameworkVersion>$(RuntimeVersion31)</RuntimeFrameworkVersion>
- <SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
- </Option>
- </Options>
- </Option>
</Options>
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">$(RuntimeFrameworkVersion)</FrameworkVersion>
<RuntimeSymbolsPath>$(DotNetRoot)\shared\Microsoft.NETCore.App\$(RuntimeFrameworkVersion)</RuntimeSymbolsPath>
- <HostExe>$(DotNetRoot)\dotnet.exe</HostExe>
- <HostArgs>--fx-version $(FrameworkVersion)</HostArgs>
+
+ <!-- Single-file debuggees don't need the host -->
+ <HostExe Condition="'$(PublishSingleFile)' != 'true'">$(DotNetRoot)\dotnet.exe</HostExe>
+ <HostArgs Condition="'$(PublishSingleFile)' != 'true'">--fx-version $(FrameworkVersion)</HostArgs>
</Option>
<!--
Desktop Runtime (debuggees cli built)
{
public static void Main(string[] args)
{
- string dllPath = args[0];
+ string dllPath = args.Length > 0 ? args[0] : string.Empty;
Console.WriteLine("SymbolTestApp starting {0}", dllPath);
Foo1(42, dllPath);
}
Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder => {
webBuilder.ConfigureKestrel(serverOptions => {
serverOptions.ConfigureHttpsDefaults(httpsOptions => {
- string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ string directory = Path.GetDirectoryName(AppContext.BaseDirectory);
httpsOptions.ServerCertificate = new X509Certificate2(Path.Combine(directory, "testCert.pfx"), "testPassword");
});
});
}
}
- private async Task RunTest(string scriptName, bool testLive = true, bool testDump = true, SOSRunner.TestInformation information = null)
+ private async Task RunTest(string scriptName, SOSRunner.TestInformation information)
{
information.OutputHelper = Output;
- if (testLive)
+ if (information.TestLive)
{
// Live
using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.Live))
}
}
- if (testDump)
+ if (information.TestDump)
{
string dumpName = null;
- // Create and test dumps on OSX or Alpine only if the runtime is 6.0 or greater
- if (!(OS.Kind == OSKind.OSX || OS.IsAlpine) || information.TestConfiguration.RuntimeFrameworkVersionMajor > 5)
+ // Generate a crash dump.
+ if (information.DebuggeeDumpOutputRootDir != null)
{
- // Generate a crash dump.
- if (information.DebuggeeDumpOutputRootDir != null)
+ dumpName = await SOSRunner.CreateDump(information);
+ }
+
+ // Test against a crash dump.
+ if (information.DebuggeeDumpInputRootDir != null)
+ {
+ // With cdb (Windows) or lldb (Linux)
+ using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDump))
{
- dumpName = await SOSRunner.CreateDump(information);
+ await runner.RunScript(scriptName);
}
- // Test against a crash dump.
- if (information.DebuggeeDumpInputRootDir != null)
+ // Using the dotnet-dump analyze tool if the path exists in the config file.
+ // TODO: dotnet-dump currently doesn't support macho core dumps that the MacOS createdump generates
+ if (information.TestConfiguration.DotNetDumpPath() != null && OS.Kind != OSKind.OSX)
{
- // With cdb (Windows) or lldb (Linux)
- using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDump))
- {
- await runner.RunScript(scriptName);
- }
-
- // Using the dotnet-dump analyze tool if the path exists in the config file.
- // TODO: dotnet-dump currently doesn't support macho core dumps that the MacOS createdump generates
- if (information.TestConfiguration.DotNetDumpPath() != null && OS.Kind != OSKind.OSX)
+ // Don't test dotnet-dump on triage dumps when running on desktop CLR.
+ if (information.TestConfiguration.IsNETCore || information.DumpType != SOSRunner.DumpType.Triage)
{
- // Don't test dotnet-dump on triage dumps when running on desktop CLR.
- if (information.TestConfiguration.IsNETCore || information.DumpType != SOSRunner.DumpType.Triage)
+ using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDumpWithDotNetDump))
{
- using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDumpWithDotNetDump))
- {
- await runner.RunScript(scriptName);
- }
+ await runner.RunScript(scriptName);
}
}
}
+ }
- // Test the crash report json file
- if (dumpName != null && information.TestCrashReport)
- {
- TestCrashReport(dumpName, information);
- }
+ // Test the crash report json file
+ if (dumpName != null && information.TestCrashReport)
+ {
+ TestCrashReport(dumpName, information);
}
}
}
private async Task RunTest(TestConfiguration config, string debuggeeName, string scriptName, string testName = null, bool testLive = true, bool testDump = true, bool testTriage = false)
{
- await RunTest(scriptName, testLive, testDump, new SOSRunner.TestInformation {
+ await RunTest(scriptName, new SOSRunner.TestInformation {
TestConfiguration = config,
TestName = testName,
+ TestLive = testLive,
+ TestDump = testDump,
DebuggeeName = debuggeeName,
DumpType = SOSRunner.DumpType.Heap
});
- if (testTriage)
+ // All single-file dumps are currently forced to "full" so skip triage
+ // Issue: https://github.com/dotnet/diagnostics/issues/2515
+ if (testTriage && !config.PublishSingleFile)
{
- await RunTest(scriptName, testLive: false, testDump, new SOSRunner.TestInformation {
+ await RunTest(scriptName, new SOSRunner.TestInformation {
TestConfiguration = config,
TestName = testName,
+ TestLive = false,
+ TestDump = testDump,
DebuggeeName = debuggeeName,
DumpType = SOSRunner.DumpType.Triage
});
[SkippableTheory, MemberData(nameof(Configurations))]
public async Task Overflow(TestConfiguration config)
{
- // The .NET Core createdump facility may not catch stack overflow so use gdb to generate dump
- await RunTest("Overflow.script", information: new SOSRunner.TestInformation {
+ await RunTest("Overflow.script", new SOSRunner.TestInformation {
TestConfiguration = config,
DebuggeeName = "Overflow",
// Generating the logging for overflow test causes so much output from createdump that it hangs/timesout the test run
DumpDiagnostics = config.IsNETCore && config.RuntimeFrameworkVersionMajor >= 6,
+ // Single file dumps don't capture the overflow exception info so disable testing against a dump
+ // Issue: https://github.com/dotnet/diagnostics/issues/2515
+ TestDump = !config.PublishSingleFile,
+ // The .NET Core createdump facility may not catch stack overflow so use gdb to generate dump
DumpGenerator = config.StackOverflowCreatesDump ? SOSRunner.DumpGenerator.CreateDump : SOSRunner.DumpGenerator.NativeDebugger
});
}
public async Task OtherCommands(TestConfiguration config)
{
// This debuggee needs the directory of the exes/dlls to load the SymbolTestDll assembly.
- await RunTest("OtherCommands.script", information: new SOSRunner.TestInformation {
+ await RunTest("OtherCommands.script", new SOSRunner.TestInformation {
TestConfiguration = config,
TestName = "SOS.OtherCommands",
DebuggeeName = "SymbolTestApp",
- DebuggeeArguments = "%DEBUG_ROOT%",
+ // Assumes that SymbolTestDll.dll that is dynamically loaded is the parent directory of the single file app
+ DebuggeeArguments = config.PublishSingleFile ? Path.Combine("%DEBUG_ROOT%", "..") : "%DEBUG_ROOT%"
});
}
{
foreach (TestConfiguration currentConfig in TestRunner.EnumeratePdbTypeConfigs(config))
{
+ // Assumes that SymbolTestDll.dll that is dynamically loaded is the parent directory of the single file app
+ string debuggeeArguments = currentConfig.PublishSingleFile ? Path.Combine("%DEBUG_ROOT%", "..") : "%DEBUG_ROOT%";
string debuggeeDumpOutputRootDir = Path.Combine(currentConfig.DebuggeeDumpOutputRootDir(), currentConfig.DebugType);
string debuggeeDumpInputRootDir = Path.Combine(currentConfig.DebuggeeDumpInputRootDir(), currentConfig.DebugType);
// This debuggee needs the directory of the exes/dlls to load the SymbolTestDll assembly.
- await RunTest("StackAndOtherTests.script", information: new SOSRunner.TestInformation {
+ await RunTest("StackAndOtherTests.script", new SOSRunner.TestInformation {
TestConfiguration = currentConfig,
TestName = "SOS.StackAndOtherTests",
DebuggeeName = "SymbolTestApp",
- DebuggeeArguments = "%DEBUG_ROOT%",
+ DebuggeeArguments = debuggeeArguments,
DumpNameSuffix = currentConfig.DebugType,
DebuggeeDumpOutputRootDir = debuggeeDumpOutputRootDir,
DebuggeeDumpInputRootDir = debuggeeDumpInputRootDir,
var settings = new Dictionary<string, string>(currentConfig.AllSettings) {
["SetHostRuntime"] = "-none"
};
- await RunTest("StackAndOtherTests.script", information: new SOSRunner.TestInformation {
+ await RunTest("StackAndOtherTests.script", new SOSRunner.TestInformation {
TestConfiguration = new TestConfiguration(settings),
TestName = "SOS.StackAndOtherTests",
DebuggeeName = "SymbolTestApp",
- DebuggeeArguments = "%DEBUG_ROOT%",
+ DebuggeeArguments = debuggeeArguments,
DumpNameSuffix = currentConfig.DebugType,
DebuggeeDumpOutputRootDir = debuggeeDumpOutputRootDir,
DebuggeeDumpInputRootDir = debuggeeDumpInputRootDir,
}
}
- [SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "SOS.WebApp")]
- public async Task WebApp(TestConfiguration config)
- {
- await RunTest("WebApp.script", testLive: false, information: new SOSRunner.TestInformation {
- TestConfiguration = config,
- DebuggeeName = "WebApp",
- UsePipeSync = true,
- DumpGenerator = SOSRunner.DumpGenerator.DotNetDump
- });
- }
-
[SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "SOS.WebApp3")]
public async Task WebApp3(TestConfiguration config)
{
- await RunTest("WebApp.script", testLive: false, information: new SOSRunner.TestInformation {
+ await RunTest("WebApp.script", new SOSRunner.TestInformation {
TestConfiguration = config,
+ TestLive = false,
DebuggeeName = "WebApp3",
UsePipeSync = true,
DumpGenerator = SOSRunner.DumpGenerator.DotNetDump
[SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "SOS.DualRuntimes")]
public async Task DualRuntimes(TestConfiguration config)
{
+ if (config.PublishSingleFile)
+ {
+ throw new SkipTestException("Single file not supported");
+ }
// The assembly path, class and function name of the desktop test code to load/run
string desktopTestParameters = TestConfiguration.MakeCanonicalPath(config.GetValue("DesktopTestParameters"));
if (string.IsNullOrEmpty(desktopTestParameters))
{
throw new SkipTestException("DesktopTestParameters config value does not exists");
}
- await RunTest("DualRuntimes.script", testLive: false, information: new SOSRunner.TestInformation {
+ await RunTest("DualRuntimes.script", new SOSRunner.TestInformation {
TestConfiguration = config,
+ TestLive = false,
TestName = "SOS.DualRuntimes",
DebuggeeName = "WebApp3",
DebuggeeArguments = desktopTestParameters,
});
}
- [SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "DotnetDumpCommands")]
+ [SkippableTheory, MemberData(nameof(Configurations))]
public async Task ConcurrentDictionaries(TestConfiguration config)
{
- await RunTest("ConcurrentDictionaries.script", testLive: false, information: new SOSRunner.TestInformation
- {
+ await RunTest("ConcurrentDictionaries.script", new SOSRunner.TestInformation {
TestConfiguration = config,
+ TestLive = false,
DebuggeeName = "DotnetDumpCommands",
DebuggeeArguments = "dcd",
DumpNameSuffix = "dcd",
});
}
- [SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "DotnetDumpCommands")]
+ [SkippableTheory, MemberData(nameof(Configurations))]
public async Task DumpGen(TestConfiguration config)
{
- await RunTest("DumpGen.script", testLive: false, information: new SOSRunner.TestInformation
- {
+ await RunTest("DumpGen.script", new SOSRunner.TestInformation {
TestConfiguration = config,
+ TestLive = false,
DebuggeeName = "DotnetDumpCommands",
DebuggeeArguments = "dumpgen",
DumpNameSuffix = "dumpgen",
public class TestInformation
{
private string _testName;
+ private bool _testLive = true;
+ private bool _testDump = true;
private bool _testCrashReport = true;
private DumpGenerator _dumpGenerator = DumpGenerator.CreateDump;
+ private DumpType _dumpType = DumpType.Heap;
private string _debuggeeDumpOutputRootDir;
private string _debuggeeDumpInputRootDir;
public ITestOutputHelper OutputHelper { get; set; }
+ public bool TestLive
+ {
+ // Don't test single file on Alpine. lldb 10.0 can't launch them.
+ get { return _testLive && !(TestConfiguration.PublishSingleFile && OS.IsAlpine); }
+ set { _testLive = value; }
+ }
+
+ public bool TestDump
+ {
+ get
+ {
+ return _testDump &&
+ // Only single file dumps on Windows
+ (!TestConfiguration.PublishSingleFile || OS.Kind == OSKind.Windows) &&
+ // Generate and test dumps if on OSX or Alpine only if the runtime is 6.0 or greater
+ (!(OS.Kind == OSKind.OSX || OS.IsAlpine) || TestConfiguration.RuntimeFrameworkVersionMajor > 5);
+ }
+ set { _testDump = value; }
+ }
+
public string TestName
{
get { return _testName ?? "SOS." + DebuggeeName; }
public DumpGenerator DumpGenerator
{
- get {
+ get
+ {
DumpGenerator dumpGeneration = _dumpGenerator;
if (dumpGeneration == DumpGenerator.CreateDump)
{
- if (!TestConfiguration.CreateDumpExists || TestConfiguration.GenerateDumpWithLLDB() || TestConfiguration.GenerateDumpWithGDB())
+ if (!TestConfiguration.CreateDumpExists ||
+ TestConfiguration.PublishSingleFile ||
+ TestConfiguration.GenerateDumpWithLLDB() ||
+ TestConfiguration.GenerateDumpWithGDB())
{
dumpGeneration = DumpGenerator.NativeDebugger;
}
set { _dumpGenerator = value; }
}
- public DumpType DumpType { get; set; } = DumpType.Heap;
+ public DumpType DumpType
+ {
+ get
+ {
+ // Currently neither cdb or dotnet-dump collect generates valid dumps on Windows for an single file app
+ // Issue: https://github.com/dotnet/diagnostics/issues/2515
+ return TestConfiguration.PublishSingleFile ? SOSRunner.DumpType.Full : _dumpType;
+ }
+ set { _dumpType = value; }
+ }
public bool UsePipeSync { get; set; } = false;
if (dumpGeneration == DumpGenerator.NativeDebugger)
{
- // Force the dump type to full for .NET Core 1.1 because the heap dumps are broken (can't read ThreadStore).
- if (config.IsNETCore && config.RuntimeFrameworkVersionMajor == 1)
- {
- information.DumpType = DumpType.Full;
- }
using SOSRunner runner = await SOSRunner.StartDebugger(information, DebuggerAction.GenerateDump);
dumpName = runner.ReplaceVariables("%DUMP_NAME%");
try
}
else
{
- var sb = new StringBuilder("settings set -- target.run-args");
+ var sb = new StringBuilder();
if (!string.IsNullOrWhiteSpace(config.HostArgs))
{
string[] args = ReplaceVariables(variables, config.HostArgs).Trim().Split(' ');
}
}
initialCommands.Add($@"target create ""{debuggeeTarget}""");
- initialCommands.Add(sb.ToString());
+ string targetRunArgs = sb.ToString();
+ if (!string.IsNullOrWhiteSpace(targetRunArgs))
+ {
+ initialCommands.Add($"settings set -- target.run-args {targetRunArgs}");
+ }
initialCommands.Add("process launch -s");
// .NET Core 1.1 or less don't catch stack overflow and abort so need to catch SIGSEGV
public async Task LoadSosExtension()
{
+ string runtimeSymbolsPath = _config.RuntimeSymbolsPath;
string setHostRuntime = _config.SetHostRuntime();
+ string setSymbolServer = _config.SetSymbolServer();
string sosPath = _config.SOSPath();
List<string> commands = new List<string>();
+ bool isHostRuntimeNone = false;
if (!string.IsNullOrEmpty(setHostRuntime))
{
switch (setHostRuntime)
{
+ case "-none":
+ isHostRuntimeNone = true;
+ break;
case "-netfx":
case "-netcore":
- case "-none":
case "-clear":
break;
default:
if (_config.IsDesktop)
{
// Force the desktop sos to be loaded and then unload it.
- commands.Add(".cordll -l");
- commands.Add(".unload sos");
+ if (!string.IsNullOrEmpty(runtimeSymbolsPath))
+ {
+ commands.Add($".cordll -lp {runtimeSymbolsPath}");
+ }
+ else
+ {
+ commands.Add(".cordll -l");
+ }
}
+ commands.Add(".unload sos");
commands.Add($".load {sosPath}");
commands.Add(".reload");
commands.Add(".chain");
{
commands.Add($"!SetHostRuntime {setHostRuntime}");
}
- // Add the path to runtime so SOS can find DAC/DBI for triage dumps
- if (_dumpType.HasValue && _dumpType == DumpType.Triage)
+ // If there is no host runtime and a single-file app or a triage dump, add the path to runtime so SOS can find DAC/DBI.
+ if ((isHostRuntimeNone && _config.PublishSingleFile) ||
+ (_dumpType.HasValue && _dumpType.Value == DumpType.Triage))
{
- string runtimeSymbolsPath = _config.RuntimeSymbolsPath;
- if (runtimeSymbolsPath != null)
+ if (!string.IsNullOrEmpty(runtimeSymbolsPath))
{
- commands.Add("!SetClrPath " + runtimeSymbolsPath);
+ commands.Add($"!SetClrPath {runtimeSymbolsPath}");
}
}
+ if (!isHostRuntimeNone && !string.IsNullOrEmpty(setSymbolServer))
+ {
+ commands.Add($"!SetSymbolServer {setSymbolServer}");
+ }
break;
case NativeDebugger.Lldb:
commands.Add($"plugin load {sosPath}");
{
commands.Add($"sethostruntime {setHostRuntime}");
}
+ // If there is no host runtime and a single-file app, add the path to runtime so SOS can find DAC/DBI.
+ if (isHostRuntimeNone && _config.PublishSingleFile)
+ {
+ if (!string.IsNullOrEmpty(runtimeSymbolsPath))
+ {
+ commands.Add($"setclrpath {runtimeSymbolsPath}");
+ }
+ }
+ if (!isHostRuntimeNone && !string.IsNullOrEmpty(setSymbolServer))
+ {
+ commands.Add($"setsymbolserver {setSymbolServer}");
+ }
SwitchToExceptionThread();
break;
case NativeDebugger.Gdb:
break;
case NativeDebugger.DotNetDump:
+ if (!string.IsNullOrEmpty(setSymbolServer))
+ {
+ commands.Add($"setsymbolserver {setSymbolServer}");
+ }
SwitchToExceptionThread();
break;
default:
sb.Append(information.TestName);
sb.Append(".");
sb.Append(information.DumpType.ToString());
+ if (information.TestConfiguration.PublishSingleFile)
+ {
+ sb.Append(".SingleFile");
+ }
if (information.DumpNameSuffix != null)
{
sb.Append(".");
if (_config.PublishSingleFile)
{
defines.Add("SINGLE_FILE_APP");
+ if (OS.Kind == OSKind.Linux || OS.Kind == OSKind.OSX)
+ {
+ defines.Add("UNIX_SINGLE_FILE_APP");
+ }
}
return defines;
}
return config.GetValue("SetHostRuntime");
}
+ public static string SetSymbolServer(this TestConfiguration config)
+ {
+ return config.GetValue("SetSymbolServer");
+ }
+
public static string DesktopRuntimePath(this TestConfiguration config)
{
return TestConfiguration.MakeCanonicalPath(config.GetValue("DesktopRuntimePath"));
VERIFY:StackTrace \(generated\):\s+
VERIFY:\s+SP\s+IP\s+\s+Function\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Dd]iv[Zz]ero.*!C\.DivideByZero(\(.*\))?\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?DivZero[\\|/]DivZero\.cs @ 12\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*DivZero[\\|/]DivZero\.cs @ 12\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Dd]iv[Zz]ero.*!C\.F3(\(.*\))?\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?DivZero[\\|/]DivZero\.cs @ 21\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*DivZero[\\|/]DivZero\.cs @ 21\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Dd]iv[Zz]ero.*!C\.F2(\(.*\))?\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?DivZero[\\|/]DivZero\.cs @ 33\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*DivZero[\\|/]DivZero\.cs @ 33\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Dd]iv[Zz]ero.*!C\.Main(\(.*\))?\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?DivZero[\\|/]DivZero\.cs @ (54|53)\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*DivZero[\\|/]DivZero\.cs @ (54|53)\s*\]\s*
# Verify that Threads (clrthreads) works
IFDEF:DOTNETDUMP
LOADSOS
-SOSCOMMAND:SetSymbolServer -ms
-
#
# First test the .NET Core runtime that WebApp3 was started
#
VERIFY:<HEXVAL>\s+<HEXVAL>\s+System.IO.StringWriter\s+
SOSCOMMAND:DumpObj <POUT>\w+\s+(<HEXVAL>)\s+(System.IO.StringWriter!\$0_)*System.IO.StringWriter\s+<POUT>
-IFDEF:MAJOR_RUNTIME_VERSION_1
-VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+<HEXVAL>\s+System\.IO.TextWriter\s+<DECVAL>\s+shared\s+static\s+Null\s+
-VERIFY:\s+>>\s+Domain:Value\s+<HEXVAL>:(<HEXVAL>|NotInit)\s+<<\s+
-ENDIF:MAJOR_RUNTIME_VERSION_1
IFDEF:MAJOR_RUNTIME_VERSION_2
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+<HEXVAL>\s+System\.IO.TextWriter\s+<DECVAL>\s+shared\s+static\s+Null\s+
VERIFY:\s+>>\s+Domain:Value\s+<HEXVAL>:(<HEXVAL>|NotInit)\s+<<\s+
VERIFY:StackTrace\s+\(generated\):\s+
VERIFY:\s+SP\s+IP\s+Function\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums.*!LineNums\.Program\.Bar.*\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 25\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 25\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums.*!LineNums\.Program\.Foo.*\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 16\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 16\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums.*!LineNums\.Program\.Main.*\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 10\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 10\s*\]\s*
# Verify that Threads (clrthreads) works
IFDEF:DOTNETDUMP
VERIFY:.*OS Thread Id:\s+0x<HEXVAL>\s+.*
VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums\.Program\.Bar\(\).*\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 25\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 25\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums\.Program\.Foo\(\).*\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 16\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 16\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+LineNums\.Program\.Main\(System.String\[\]\).*\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/]LineNums[\\|/]Program\.cs @ 10\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*LineNums[\\|/]Program\.cs @ 10\s*\]\s*
# Verify that bpmd works
IFDEF:LIVE
-!IFDEF:MAJOR_RUNTIME_VERSION_1
# Issue: https://github.com/dotnet/diagnostics/issues/2459
!IFDEF:ALPINE
+# Issue: https://github.com/dotnet/diagnostics/issues/2673
+!IFDEF:UNIX_SINGLE_FILE_APP
IFDEF:DESKTOP
SOSCOMMAND:bpmd NestedExceptionTest.exe NestedExceptionTest.Program.Main
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+NestedExceptionTest\.Program\.Main(\(.*\))?\s*
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ 8\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ 8\s*\]\s*
+ENDIF:UNIX_SINGLE_FILE_APP
ENDIF:ALPINE
-ENDIF:MAJOR_RUNTIME_VERSION_1
ENDIF:LIVE
CONTINUE
VERIFY:StackTrace \(generated\):
VERIFY:\s+SP\s+IP\s+Function\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Nn]ested[Ee]xception[Tt]est.*!NestedExceptionTest\.Program\.Main(\(.*\))?\+0x<HEXVAL>\s*
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ (8|17)\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ (8|17)\s*\]\s*
VERIFY:(StackTraceString: <none>\s+)?
VERIFY:HResult:\s+80131509\s+
VERIFY:There are nested exceptions on this thread. Run with -nested for details
VERIFY:.*OS Thread Id:\s+0x<HEXVAL>\s+.*
VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+NestedExceptionTest\.Program\.Main(\(.*\))?\s*
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ (8|17)\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ (8|17)\s*\]\s*
# Verify that bpmd works
IFDEF:LIVE
-!IFDEF:MAJOR_RUNTIME_VERSION_1
# Issue: https://github.com/dotnet/diagnostics/issues/2459
!IFDEF:ALPINE
+# Issue: https://github.com/dotnet/diagnostics/issues/2673
+!IFDEF:UNIX_SINGLE_FILE_APP
IFDEF:DESKTOP
SOSCOMMAND:bpmd SymbolTestApp.exe SymbolTestApp.Program.Main
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 16\]\s*
+SOSCOMMAND:bpmd -clearall
SOSCOMMAND:bpmd SymbolTestApp.cs:29
IFDEF:DESKTOP
SOSCOMMAND:bpmd SymbolTestApp.dll SymbolTestApp.Program.Foo4
ENDIF:DESKTOP
-!IFDEF:DESKTOP
-CONTINUE
-SOSCOMMAND:ClrStack
-VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 16\]\s*
-ENDIF:DESKTOP
-
CONTINUE
SOSCOMMAND:ClrStack
IFDEF:DESKTOP
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Foo4\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 34\]\s*
+ENDIF:UNIX_SINGLE_FILE_APP
ENDIF:ALPINE
-ENDIF:MAJOR_RUNTIME_VERSION_1
ENDIF:LIVE
CONTINUE
-SOSCOMMAND:SetSymbolServer -ms
-
EXTCOMMAND:clrmodules
VERIFY:\s*<HEXVAL>.*
VERIFY:\s*LowFrequencyHeap:\s+<HEXVAL>\s+
VERIFY:\s*HighFrequencyHeap:\s+<HEXVAL>\s+
VERIFY:\s*Domain 1:\s+<HEXVAL>\s+
+!IFDEF:SINGLE_FILE_APP
VERIFY:\s*Assembly:\s+<HEXVAL>\s+\[.*(System\.Private\.CoreLib(\.ni)?\.dll|mscorlib.dll)\]\s+
SOSCOMMAND:DumpAssembly <POUT>\s*Assembly:\s+(<HEXVAL>)\s+\[.*<POUT>
VERIFY:\s*Parent Domain:\s+<HEXVAL>\s+
VERIFY:\s*Name:\s+.*(System\.Private\.CoreLib(\.ni)?\.dll|mscorlib.dll)\s+
+ENDIF:SINGLE_FILE_APP
SOSCOMMAND:DumpModule <POUT>\s+Module\s+(<HEXVAL>)\s+.*<POUT>
VERIFY:\s*PEFile:\s+<HEXVAL>\s+
VERIFY:InnerException:\s+System\.Exception, Use !PrintException <HEXVAL> to see more\.\s+
VERIFY:StackTrace \(generated\):\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Rr]eflection[Tt]est.*!(\$0_)?RefLoader\.Loader\.Main(\(\))?\+0x<HEXVAL>\s*
-VERIFY:[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Rr]eflection[Tt]est[\\|/][Rr]eflection[Tt]est\.cs @ 32\s*\]
+VERIFY:[.*[\\|/]Debuggees[\\|/].*[Rr]eflection[Tt]est[\\|/][Rr]eflection[Tt]est\.cs @ 32\s*\]
VERIFY:(StackTraceString: <none>\s+)?
VERIFY:HResult:\s+80131604
VERIFY:.*OS Thread Id:\s+0x<HEXVAL>\s+.*
VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+(\*\*\* WARNING: Unable to verify checksum for ReflectionTest.exe\s*)?RefLoader\.Loader\.Main(\(\))?\s*
-VERIFY:[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Rr]eflection[Tt]est[\\|/][Rr]eflection[Tt]est\.cs @ 32\s*\]
+VERIFY:[.*[\\|/]Debuggees[\\|/].*[Rr]eflection[Tt]est[\\|/][Rr]eflection[Tt]est\.cs @ 32\s*\]
VERIFY:StackTrace\s+\(generated\):\s+
VERIFY:\s+SP\s+IP\s+Function\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Ss]imple[Tt]hrow.*!(\$0_)?UserObject\.UseObject.*\+0x<HEXVAL>\s*
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?SimpleThrow[\\|/]UserObject\.cs @ 16\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*SimpleThrow[\\|/]UserObject\.cs @ 16\s*\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+[Ss]imple[Tt]hrow.*!(\$0_)?Simple\.Main.*\+0x<HEXVAL>\s+
-VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?SimpleThrow[\\|/]SimpleThrow\.cs @ 9\s*\]\s*
+VERIFY:\[.*[\\|/]Debuggees[\\|/].*SimpleThrow[\\|/]SimpleThrow\.cs @ 9\s*\]\s*
# Verify that Threads (clrthreads) works
IFDEF:DOTNETDUMP
VERIFY:.*OS Thread Id:\s+0x<HEXVAL>\s+.*
VERIFY:\s+Child\s+SP\s+IP\s+Call Site\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+(\*\*\* WARNING: Unable to verify checksum for SimpleThrow.exe\s*)?UserObject\.UseObject.*\s+
-VERIFY:[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?SimpleThrow[\\|/]UserObject\.cs @ 16\s*\]
+VERIFY:[.*[\\|/]Debuggees[\\|/].*SimpleThrow[\\|/]UserObject\.cs @ 16\s*\]
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+Simple\.Main\(\)\s+
-VERIFY:[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?SimpleThrow[\\|/]SimpleThrow\.cs @ 9\s*\]
+VERIFY:[.*[\\|/]Debuggees[\\|/].*SimpleThrow[\\|/]SimpleThrow\.cs @ 9\s*\]
# Verify that bpmd works
IFDEF:LIVE
-!IFDEF:MAJOR_RUNTIME_VERSION_1
# Issue: https://github.com/dotnet/diagnostics/issues/2459
!IFDEF:ALPINE
+# Issue: https://github.com/dotnet/diagnostics/issues/2673
+!IFDEF:UNIX_SINGLE_FILE_APP
IFDEF:DESKTOP
SOSCOMMAND:bpmd SymbolTestApp.exe SymbolTestApp.Program.Main
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 16\]\s*
+SOSCOMMAND:bpmd -clearall
SOSCOMMAND:bpmd SymbolTestApp.cs:29
IFDEF:DESKTOP
SOSCOMMAND:bpmd SymbolTestApp.dll SymbolTestApp.Program.Foo4
ENDIF:DESKTOP
-!IFDEF:DESKTOP
-CONTINUE
-SOSCOMMAND:ClrStack
-VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 16\]\s*
-ENDIF:DESKTOP
-
CONTINUE
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Foo2\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ (28|29)\]\s*
SOSCOMMAND:ClrStack
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Foo4\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 34\]\s*
+ENDIF:UNIX_SINGLE_FILE_APP
ENDIF:ALPINE
-ENDIF:MAJOR_RUNTIME_VERSION_1
ENDIF:LIVE
CONTINUE
-SOSCOMMAND:SetSymbolServer -ms
-
!IFDEF:DOTNETDUMP
IFDEF:WINDOWS
SOSCOMMAND:SetHostRuntime
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo2\(.*\)\s+\+\s+<DECVAL>\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 29\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Foo1\(.*\)\s+\+\s+<DECVAL>\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 24\]\s*
VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.(dll|exe)!SymbolTestApp\.Program\.Main\(.*\)\s+\+\s+<DECVAL>\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 19\]\s*
-SOSCOMMAND:SetSymbolServer -disable
# Verify that ClrStack all option works (locals/params)
SOSCOMMAND:ClrStack -a
VERIFY:\s+PARAMETERS:\s+
VERIFY:\s+\+ string dllPath\s+=\s+".*"\s+
VERIFY:\s+LOCALS:\s+
-!IFDEF:MAJOR_RUNTIME_VERSION_1
+!IFDEF:SINGLE_FILE_APP
VERIFY:\s+\+ System.RuntimeType dllType @ 0x<HEXVAL>
-ENDIF:MAJOR_RUNTIME_VERSION_1
+ENDIF:SINGLE_FILE_APP
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] I4 SymbolTestApp\.Program\.Foo2\(.*\)\s+\(.*\)\s+
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] I4 SymbolTestApp\.Program\.Foo1\(.*\)\s+\(.*\)\s+
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] Void SymbolTestApp\.Program\.Main\(.*\)\s+\(.*\)\s+
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+NestedExceptionTest\.Program\.Main\(.*\)\s+\[(?i:.*[\\|/]NestedExceptionTest\.cs) @ 13\s*\]\s+
ENDIF:64BIT
+!IFDEF:WINDOWS
SOSCOMMAND:SetSymbolServer -ms -loadsymbols
+ENDIF:WINDOWS
+
!IFDEF:DOTNETDUMP
IFDEF:WINDOWS
SOSCOMMAND:SetHostRuntime
IFDEF:64BIT
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+(?i:NestedExceptionTest.*)!NestedExceptionTest\.Program\.Main\(.*\)\s+\+\s+<DECVAL>\s+\[(?i:.*[\\|/]NestedExceptionTest\.cs) @ 13\s*\]\s+
ENDIF:64BIT
-SOSCOMMAND:SetSymbolServer -disable
# 3) Verifying that ClrStack all option works (locals/params)
SOSCOMMAND:ClrStack -a
VERIFY:\s+PARAMETERS:\s+
VERIFY:\s+\+ string\[\] args\s+\(empty\)\s+
VERIFY:\s+LOCALS:\s+
+!IFDEF:SINGLE_FILE_APP
VERIFY:\s+\+ System.FormatException ex @ 0x<HEXVAL>\s+
+ENDIF:SINGLE_FILE_APP
VERIFY:.*\s+<HEXVAL>\s+<HEXVAL>\s+\[DEFAULT\] Void NestedExceptionTest\.Program\.Main\(.*\)\s+\(.*\)\s+
VERIFY:.*\s+Stack walk complete.\s+
VERIFY:\s+<HEXVAL>\s+<HEXVAL>.+RandomTest(::|\.)RandomUserTask\.<\.ctor>.+\+0x<HEXVAL>\s*
!IFDEF:DESKTOP
!IFDEF:TRIAGE_DUMP
-VERIFY:[.+[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ (16|23)\]
+VERIFY:[.+[\\|/]Debuggees[\\|/].*[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ (16|23)\]
ENDIF:TRIAGE_DUMP
ENDIF:DESKTOP
VERIFY:\s+<HEXVAL>\s+<HEXVAL>.+RandomTest(::|\.)RandomUserTask\.InnerException(\(\))?\+0x<HEXVAL>\s*
!IFDEF:DESKTOP
!IFDEF:TRIAGE_DUMP
-VERIFY:[.+[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ (34|35)\]
+VERIFY:[.+[\\|/]Debuggees[\\|/].*[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ (34|35)\]
ENDIF:TRIAGE_DUMP
ENDIF:DESKTOP
VERIFY:\s+<HEXVAL>\s+<HEXVAL>.+RandomTest(::|\.)RandomUserTask\.<\.ctor>.+\+0x<HEXVAL>\s*
!IFDEF:DESKTOP
!IFDEF:TRIAGE_DUMP
-VERIFY:[.+[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ 19\]
+VERIFY:[.+[\\|/]Debuggees[\\|/].*[Tt]ask[Nn]ested[Ee]xception[\\|/][Rr]andom[Uu]ser[Ll]ibrary[\\|/][Rr]andom[Uu]ser[Tt]ask\.cs @ 19\]
ENDIF:TRIAGE_DUMP
ENDIF:DESKTOP
LOADSOS
-SOSCOMMAND:SetSymbolServer -ms
-
!IFDEF:DOTNETDUMP
IFDEF:WINDOWS
SOSCOMMAND:SetHostRuntime
include_directories(${ROOT_DIR}/src/SOS/inc)
include_directories(${ROOT_DIR}/src/SOS/extensions)
include_directories(${ROOT_DIR}/src/SOS/gcdump)
-include_directories(${ROOT_DIR}/src/SOS/debugshim)
include_directories(platform)
if(WIN32)
set(SOS_LIBRARY
extensions
corguids
- debugshim
dbgutil
${STATIC_MT_CRT_LIB}
${STATIC_MT_CPP_LIB}
set(SOS_LIBRARY
extensions
corguids
- debugshim
dbgutil
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>$(SolutionDir)src\SOS\Strike\platform;$(SolutionDir)src\SOS\inc;$(SolutionDir)src\inc;$(SolutionDir)src\pal\prebuilt\inc;$(SolutionDir)src\SOS\extensions;$(SolutionDir)src\SOS\gcdump;$(SolutionDir)src\SOS\debugshim;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(SolutionDir)src\SOS\Strike\platform;$(SolutionDir)src\SOS\inc;$(SolutionDir)src\inc;$(SolutionDir)src\pal\prebuilt\inc;$(SolutionDir)src\SOS\extensions;$(SolutionDir)src\SOS\gcdump;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8 /homeparams</AdditionalOptions>
<AssemblerListingLocation>Debug/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR=\"Debug\";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<MASM>
<PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR="Debug";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
+ <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
</MASM>
<Midl>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
- <AdditionalDependencies>..\..\inc\Debug\corguids.lib;..\debugshim\Debug\debugshim.lib;..\dbgutil\Debug\dbgutil.lib;libcmtd.lib;libcpmtd.lib;libvcruntimed.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
+ <AdditionalDependencies>..\..\inc\Debug\corguids.lib;;..\dbgutil\Debug\dbgutil.lib;libcmtd.lib;libcpmtd.lib;libvcruntimed.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64 /GUARD:CF /SUBSYSTEM:WINDOWS,6.01 /PDBCOMPRESS /IGNORE:4197,4013,4254,4070,4221 /NOVCFEATURE</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
<AssemblerListingLocation>Checked/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR=\"Checked\";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<MASM>
<PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR="Checked";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
+ <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
</MASM>
<Midl>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
- <AdditionalDependencies>..\..\inc\Checked\corguids.lib;..\debugshim\Checked\debugshim.lib;..\dbgutil\Checked\dbgutil.lib;libcmtd.lib;libcpmtd.lib;libvcruntimed.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
+ <AdditionalDependencies>..\..\inc\Checked\corguids.lib;..\dbgutil\Checked\dbgutil.lib;libcmtd.lib;libcpmtd.lib;libvcruntimed.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64 /GUARD:CF /SUBSYSTEM:WINDOWS,6.01 /PDBCOMPRESS /IGNORE:4197,4013,4254,4070,4221 /NOVCFEATURE</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
<AssemblerListingLocation>Release/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR=\"Release\";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\Strike;..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\Strike;..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<MASM>
<PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR="Release";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
+ <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
</MASM>
<Midl>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
- <AdditionalDependencies>..\..\inc\Release\corguids.lib;..\debugshim\Release\debugshim.lib;..\dbgutil\Release\dbgutil.lib;libcmt.lib;libcpmt.lib;libvcruntime.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
+ <AdditionalDependencies>..\..\inc\Release\corguids.lib;..\dbgutil\Release\dbgutil.lib;libcmt.lib;libcpmt.lib;libvcruntime.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64 /GUARD:CF /SUBSYSTEM:WINDOWS,6.01 /PDBCOMPRESS /IGNORE:4197,4013,4254,4070,4221 /DEFAULTLIB:ucrt.lib</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
<AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR=\"RelWithDebInfo\";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<MASM>
<PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_CORESYSTEM;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;_TARGET_WIN64_=1;SOS_TARGET_AMD64=1;SOS_TARGET_ARM64=1;STRIKE;USE_STL;FX_VER_INTERNALNAME_STR=SOS.dll;CMAKE_INTDIR="RelWithDebInfo";sos_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
+ <IncludePaths>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(IncludePaths)</IncludePaths>
</MASM>
<Midl>
- <AdditionalIncludeDirectories>Strike;..\..\pal\prebuilt\inc;..\..\inc;..\gcdump;..\..\SOS\debugshim;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>Strike;..\..\pal\prebuilt\inc;..\..\inc;..\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
<HeaderFileName>%(Filename).h</HeaderFileName>
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
- <AdditionalDependencies>..\..\inc\RelWithDebInfo\corguids.lib;..\debugshim\RelWithDebInfo\debugshim.lib;..\dbgutil\RelWithDebInfo\dbgutil.lib;libcmt.lib;libcpmt.lib;libvcruntime.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
+ <AdditionalDependencies>..\..\inc\RelWithDebInfo\corguids.lib;..\dbgutil\RelWithDebInfo\dbgutil.lib;libcmt.lib;libcpmt.lib;libvcruntime.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;dbghelp.lib;uuid.lib;version.lib;dbgeng.lib;advapi32.lib;psapi.lib;ntdll.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64 /GUARD:CF /SUBSYSTEM:WINDOWS,6.01 /PDBCOMPRESS /IGNORE:4197,4013,4254,4070,4221 /DEFAULTLIB:ucrt.lib</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ClInclude Include="ntinfo.h" />
<ClInclude Include="platformspecific.h" />
<ClInclude Include="platform\cordebugdatatarget.h" />
- <ClInclude Include="platform\cordebuglibraryprovider.h" />
<ClInclude Include="platform\datatarget.h" />
<ClInclude Include="platform\hostimpl.h" />
<ClInclude Include="platform\runtimeimpl.h" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
<ClInclude Include="platform\cordebugdatatarget.h">
<Filter>platform</Filter>
</ClInclude>
- <ClInclude Include="platform\cordebuglibraryprovider.h">
- <Filter>platform</Filter>
- </ClInclude>
<ClInclude Include="platform\datatarget.h">
<Filter>platform</Filter>
</ClInclude>
if (m_pDebuggerServices != nullptr)
{
((DbgEngServices*)m_pDebuggerServices)->Uninitialize();
+ m_pDebuggerServices->Release();
+ m_pDebuggerServices = nullptr;
}
}
#endif
public:
-#ifdef FEATURE_PAL
- static HRESULT Initialize()
- {
- if (s_extensions == nullptr)
- {
- s_extensions = new SOSExtensions(nullptr, nullptr);
- }
- return S_OK;
- }
-#else
+#ifndef FEATURE_PAL
static HRESULT Initialize(IDebugClient* client)
{
if (s_extensions == nullptr)
}
#endif
- static HRESULT Initialize(IHost* host)
+ static HRESULT Initialize(IHost* host, IDebuggerServices* debuggerServices)
{
if (s_extensions == nullptr)
{
- s_extensions = new SOSExtensions(nullptr, host);
+ s_extensions = new SOSExtensions(debuggerServices, host);
}
return S_OK;
}
class CorDebugDataTarget : public ICorDebugMutableDataTarget, public ICorDebugMetaDataLocator, public ICorDebugDataTarget4
{
public:
- CorDebugDataTarget() : m_ref(0)
+ CorDebugDataTarget() : m_ref(1)
{
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#ifndef __cordebuglibraryprovider_h__
-#define __cordebuglibraryprovider_h__
-
-#ifndef FEATURE_PAL
-extern HMODULE LoadLibraryAndCheck(PCWSTR filename, DWORD timestamp, DWORD filesize);
-#endif
-
-/**********************************************************************\
- * Provides a way for the public CLR debugging interface to find the
- * appropriate mscordbi.dll, DAC, etc.
-\**********************************************************************/
-class CorDebugLibraryProvider : public ICLRDebuggingLibraryProvider, ICLRDebuggingLibraryProvider2
-{
-public:
- CorDebugLibraryProvider(Runtime* pRuntime) :
- m_ref(0),
- m_pRuntime(pRuntime)
- {
- }
-
- virtual ~CorDebugLibraryProvider() {}
-
- virtual HRESULT STDMETHODCALLTYPE QueryInterface(
- REFIID InterfaceId,
- PVOID* pInterface)
- {
- if (InterfaceId == IID_IUnknown)
- {
- *pInterface = static_cast<IUnknown *>(static_cast<ICLRDebuggingLibraryProvider*>(this));
- }
-#ifndef FEATURE_PAL
- else if (InterfaceId == IID_ICLRDebuggingLibraryProvider)
- {
- *pInterface = static_cast<ICLRDebuggingLibraryProvider *>(this);
- }
-#endif
- else if (InterfaceId == IID_ICLRDebuggingLibraryProvider2)
- {
- *pInterface = static_cast<ICLRDebuggingLibraryProvider2 *>(this);
- }
- else
- {
- *pInterface = NULL;
- return E_NOINTERFACE;
- }
-
- AddRef();
- return S_OK;
- }
-
- virtual ULONG STDMETHODCALLTYPE AddRef()
- {
- return InterlockedIncrement(&m_ref);
- }
-
- virtual ULONG STDMETHODCALLTYPE Release()
- {
- LONG ref = InterlockedDecrement(&m_ref);
- if (ref == 0)
- {
- delete this;
- }
- return ref;
- }
-
- HRESULT ProvideLibraryInternal(
- const WCHAR* pwszFileName,
- DWORD dwTimestamp,
- DWORD dwSizeOfImage,
- HMODULE* phModule,
- LPWSTR* ppResolvedModulePath)
- {
- const char* filePath = nullptr;
-
- if (_wcsncmp(pwszFileName, m_pRuntime->GetDacDllNameW(), _wcslen(m_pRuntime->GetDacDllNameW())) == 0)
- {
- filePath = m_pRuntime->GetDacFilePath();
- }
- else if (_wcsncmp(pwszFileName, NET_DBI_DLL_NAME_W, _wcslen(NET_DBI_DLL_NAME_W)) == 0)
- {
- filePath = m_pRuntime->GetDbiFilePath();
- }
-
- ArrayHolder<WCHAR> modulePath = new WCHAR[MAX_LONGPATH + 1];
- if (filePath != nullptr)
- {
- int length = MultiByteToWideChar(CP_ACP, 0, filePath, -1, modulePath, MAX_LONGPATH);
- if (0 >= length)
- {
- ExtErr("MultiByteToWideChar(filePath) failed. Last error = 0x%x\n", GetLastError());
- return HRESULT_FROM_WIN32(GetLastError());
- }
- }
- else
- {
- LPCSTR runtimeDirectory = m_pRuntime->GetRuntimeDirectory();
- if (runtimeDirectory == nullptr)
- {
- ExtErr("Runtime not loaded\n");
- return E_FAIL;
- }
- int length = MultiByteToWideChar(CP_ACP, 0, runtimeDirectory, -1, modulePath, MAX_LONGPATH);
- if (0 >= length)
- {
- ExtErr("MultiByteToWideChar(runtimeDirectory) failed. Last error = 0x%x\n", GetLastError());
- return HRESULT_FROM_WIN32(GetLastError());
- }
- wcscat_s(modulePath, MAX_LONGPATH, pwszFileName);
- }
-
- ExtOut("Loaded %S\n", modulePath.GetPtr());
-
-#ifndef FEATURE_PAL
- if (phModule != NULL)
- {
- *phModule = LoadLibraryAndCheck(modulePath.GetPtr(), dwTimestamp, dwSizeOfImage);
- }
-#endif
- if (ppResolvedModulePath != NULL)
- {
- *ppResolvedModulePath = modulePath.Detach();
- }
- return S_OK;
- }
-
- // Called by the shim to locate and load dac and dbi
- // Parameters:
- // pwszFileName - the name of the file to load
- // dwTimestamp - the expected timestamp of the file
- // dwSizeOfImage - the expected SizeOfImage (a PE header data value)
- // phModule - a handle to loaded module
- //
- // Return Value
- // S_OK if the file was loaded, or any error if not
- virtual HRESULT STDMETHODCALLTYPE ProvideLibrary(
- const WCHAR * pwszFileName,
- DWORD dwTimestamp,
- DWORD dwSizeOfImage,
- HMODULE* phModule)
- {
- if ((phModule == NULL) || (pwszFileName == NULL))
- {
- return E_INVALIDARG;
- }
- return ProvideLibraryInternal(pwszFileName, dwTimestamp, dwSizeOfImage, phModule, NULL);
- }
-
- virtual HRESULT STDMETHODCALLTYPE ProvideLibrary2(
- const WCHAR* pwszFileName,
- DWORD dwTimestamp,
- DWORD dwSizeOfImage,
- LPWSTR* ppResolvedModulePath)
- {
- if ((pwszFileName == NULL) || (ppResolvedModulePath == NULL))
- {
- return E_INVALIDARG;
- }
- return ProvideLibraryInternal(pwszFileName, dwTimestamp, dwSizeOfImage, NULL, ppResolvedModulePath);
- }
-
-protected:
- LONG m_ref;
- Runtime* m_pRuntime;
-};
-
-#endif // __cordebuglibraryprovider_h__
#include <psapi.h>
#include <clrinternal.h>
#include <metahost.h>
-#include "debugshim.h"
#include "runtimeimpl.h"
#include "datatarget.h"
#include "cordebugdatatarget.h"
-#include "cordebuglibraryprovider.h"
#include "runtimeinfo.h"
#ifdef FEATURE_PAL
#include <unistd.h>
#endif // !FEATURE_PAL
+typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcessImpl2FnPtr)(ULONG64 clrInstanceId,
+ IUnknown * pDataTarget,
+ LPCWSTR pDacModulePath,
+ CLR_DEBUGGING_VERSION * pMaxDebuggerSupportedVersion,
+ REFIID riid,
+ IUnknown ** ppInstance,
+ CLR_DEBUGGING_PROCESS_FLAGS * pdwFlags);
+
+typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcessImplFnPtr)(ULONG64 clrInstanceId,
+ IUnknown * pDataTarget,
+ HMODULE hDacDll,
+ CLR_DEBUGGING_VERSION * pMaxDebuggerSupportedVersion,
+ REFIID riid,
+ IUnknown ** ppInstance,
+ CLR_DEBUGGING_PROCESS_FLAGS * pdwFlags);
+
+typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcess2FnPtr)(ULONG64 clrInstanceId,
+ IUnknown * pDataTarget,
+ HMODULE hDacDll,
+ REFIID riid,
+ IUnknown ** ppInstance,
+ CLR_DEBUGGING_PROCESS_FLAGS * pdwFlags);
+
+typedef HMODULE (STDAPICALLTYPE *LoadLibraryWFnPtr)(LPCWSTR lpLibFileName);
+
// Current runtime instance
IRuntime* g_pRuntime = nullptr;
return SUCCEEDED(g_ExtData->ReadVirtual((ULONG64)address, buffer, (ULONG)size, &read));
}
+#endif // !defined(__APPLE__)
+
/**********************************************************************\
* Search all the modules in the process for the single-file host
\**********************************************************************/
-static HRESULT GetSingleFileInfo(PULONG pModuleIndex, PULONG64 pModuleAddress, RuntimeInfo** ppRuntimeInfo)
+static HRESULT GetSingleFileInfo(ITarget* target, PULONG pModuleIndex, PULONG64 pModuleAddress, RuntimeInfo** ppRuntimeInfo)
{
_ASSERTE(pModuleIndex != nullptr);
_ASSERTE(pModuleAddress != nullptr);
+ // No debugger service instance means that SOS is hosted by dotnet-dump,
+ // which does runtime enumeration in CLRMD. We should never get here.
+ IDebuggerServices* debuggerServices = GetDebuggerServices();
+ if (debuggerServices == nullptr) {
+ return E_NOINTERFACE;
+ }
+
ULONG loaded, unloaded;
HRESULT hr = g_ExtSymbols->GetNumberModules(&loaded, &unloaded);
if (FAILED(hr)) {
return hr;
}
+ const char* symbolName = "DotNetRuntimeInfo";
for (ULONG index = 0; index < loaded; index++)
{
ULONG64 baseAddress;
return hr;
}
ULONG64 symbolAddress;
- if (TryGetSymbol(baseAddress, "DotNetRuntimeInfo", &symbolAddress))
+#if !defined(__APPLE__)
+ if (target->GetOperatingSystem() == ITarget::OperatingSystem::Linux)
{
- ULONG read = 0;
- ArrayHolder<BYTE> buffer = new BYTE[sizeof(RuntimeInfo)];
- hr = g_ExtData->ReadVirtual(symbolAddress, buffer, sizeof(RuntimeInfo), &read);
- if (FAILED(hr)) {
- return hr;
+ if (!TryGetSymbol(baseAddress, symbolName, &symbolAddress)) {
+ continue;
}
- if (strcmp(((RuntimeInfo*)buffer.GetPtr())->Signature, "DotNetRuntimeInfo") != 0) {
- break;
+ }
+ else
+#endif // !defined(__APPLE__)
+ {
+ hr = debuggerServices->GetOffsetBySymbol(index, symbolName, &symbolAddress);
+ if (FAILED(hr)) {
+ continue;
}
- *pModuleIndex = index;
- *pModuleAddress = baseAddress;
- *ppRuntimeInfo = (RuntimeInfo*)buffer.Detach();
- return S_OK;
}
+ ULONG read = 0;
+ ArrayHolder<BYTE> buffer = new BYTE[sizeof(RuntimeInfo)];
+ hr = g_ExtData->ReadVirtual(symbolAddress, buffer, sizeof(RuntimeInfo), &read);
+ if (FAILED(hr)) {
+ return hr;
+ }
+ if (strcmp(((RuntimeInfo*)buffer.GetPtr())->Signature, "DotNetRuntimeInfo") != 0) {
+ break;
+ }
+ *pModuleIndex = index;
+ *pModuleAddress = baseAddress;
+ *ppRuntimeInfo = (RuntimeInfo*)buffer.Detach();
+ return S_OK;
}
return E_FAIL;
}
-#endif // !defined(__APPLE__)
-
/**********************************************************************\
* Creates a desktop or .NET Core instance of the runtime class
\**********************************************************************/
{
// Check if the normal runtime module (coreclr.dll, libcoreclr.so, etc.) is loaded
hr = g_ExtSymbols->GetModuleByModuleName(runtimeModuleName, 0, &moduleIndex, &moduleAddress);
-#if !defined(__APPLE__)
if (FAILED(hr))
{
// If the standard runtime module isn't loaded, try looking for a single-file program
- if (configuration == IRuntime::UnixCore)
+ if (configuration != IRuntime::WindowsDesktop)
{
- hr = GetSingleFileInfo(&moduleIndex, &moduleAddress, &runtimeInfo);
+ hr = GetSingleFileInfo(target, &moduleIndex, &moduleAddress, &runtimeInfo);
}
}
-#endif // !defined(__APPLE__)
// If the previous operations were successful, get the size of the runtime module
if (SUCCEEDED(hr))
HMODULE hdac = LoadLibraryA(dacFilePath);
if (hdac == NULL)
{
- ExtDbgOut("LoadLibrary(%s) FAILED %08x\n", dacFilePath, HRESULT_FROM_WIN32(GetLastError()));
+ ExtDbgOut("LoadLibraryA(%s) FAILED %08x\n", dacFilePath, HRESULT_FROM_WIN32(GetLastError()));
return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
}
PFN_CLRDataCreateInstance pfnCLRDataCreateInstance = (PFN_CLRDataCreateInstance)GetProcAddress(hdac, "CLRDataCreateInstance");
\**********************************************************************/
HRESULT Runtime::GetCorDebugInterface(ICorDebugProcess** ppCorDebugProcess)
{
- HMODULE hModule = NULL;
HRESULT hr;
- ToRelease<ICLRDebugging> pClrDebugging;
// We may already have an ICorDebug instance we can use
if (m_pCorDebugProcess != nullptr)
m_pCorDebugProcess->Release();
m_pCorDebugProcess = nullptr;
}
-
- // SOS now has a statically linked version of the loader code that is normally found in mscoree/mscoreei.dll
- // Its not much code and takes a big step towards 0 install dependencies
- // Need to pick the appropriate SKU of CLR to detect
#if defined(FEATURE_CORESYSTEM)
GUID skuId = CLR_ID_ONECORE_CLR;
#else
skuId = CLR_ID_V4_DESKTOP;
}
#endif
- CLRDebuggingImpl* pDebuggingImpl = new CLRDebuggingImpl(skuId, IsWindowsTarget());
- hr = pDebuggingImpl->QueryInterface(IID_ICLRDebugging, (LPVOID *)&pClrDebugging);
- if (FAILED(hr))
+ const char* dacFilePath = GetDacFilePath();
+ if (dacFilePath == nullptr)
+ {
+ ExtErr("Could not find matching DAC\n");
+ return CORDBG_E_NO_IMAGE_AVAILABLE;
+ }
+ ArrayHolder<WCHAR> pDacModulePath = new WCHAR[MAX_LONGPATH + 1];
+ int length = MultiByteToWideChar(CP_ACP, 0, dacFilePath, -1, pDacModulePath, MAX_LONGPATH);
+ if (0 >= length)
{
- delete pDebuggingImpl;
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ ExtErr("MultiByteToWideChar() DAC FAILED %08x\n", hr);
return hr;
}
-
- ToRelease<ICorDebugMutableDataTarget> pCorDebugDataTarget = new CorDebugDataTarget;
- pCorDebugDataTarget->AddRef();
-
- ToRelease<ICLRDebuggingLibraryProvider> pCorDebugLibraryProvider = new CorDebugLibraryProvider(this);
- pCorDebugLibraryProvider->AddRef();
-
- CLR_DEBUGGING_VERSION clrDebuggingVersionRequested = {0};
- clrDebuggingVersionRequested.wMajor = 4;
-
- CLR_DEBUGGING_VERSION clrDebuggingVersionActual = {0};
-
+ const char* dbiFilePath = GetDbiFilePath();
+ if (dbiFilePath == nullptr)
+ {
+ ExtErr("Could not find matching DBI\n");
+ return CORDBG_E_NO_IMAGE_AVAILABLE;
+ }
+ HMODULE hDbi = LoadLibraryA(dbiFilePath);
+ if (hDbi == NULL)
+ {
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ ExtErr("LoadLibraryA(%s) FAILED %08x\n", dbiFilePath, hr);
+ return hr;
+ }
+ CLR_DEBUGGING_VERSION clrDebuggingVersionRequested = {0, 4, 0, 0, 0};
CLR_DEBUGGING_PROCESS_FLAGS clrDebuggingFlags = (CLR_DEBUGGING_PROCESS_FLAGS)0;
+ ToRelease<ICorDebugMutableDataTarget> pDataTarget = new CorDebugDataTarget;
+ ToRelease<IUnknown> pUnkProcess = nullptr;
- ToRelease<IUnknown> pUnkProcess;
- hr = pClrDebugging->OpenVirtualProcess(
- GetModuleAddress(),
- pCorDebugDataTarget,
- pCorDebugLibraryProvider,
- &clrDebuggingVersionRequested,
- IID_ICorDebugProcess,
- &pUnkProcess,
- &clrDebuggingVersionActual,
- &clrDebuggingFlags);
+ // Get access to the latest OVP implementation and call it
+ OpenVirtualProcessImpl2FnPtr ovpFn = (OpenVirtualProcessImpl2FnPtr)GetProcAddress(hDbi, "OpenVirtualProcessImpl2");
+ if (ovpFn != nullptr)
+ {
+ hr = ovpFn(GetModuleAddress(), pDataTarget, pDacModulePath, &clrDebuggingVersionRequested, IID_ICorDebugProcess, &pUnkProcess, &clrDebuggingFlags);
+ if (FAILED(hr)) {
+ ExtErr("DBI OpenVirtualProcessImpl2 FAILED %08x\n", hr);
+ return hr;
+ }
+ }
+ else
+ {
+ HMODULE hDac = LoadLibraryA(dacFilePath);
+ if (hDac == NULL)
+ {
+ ExtErr("LoadLibraryA(%s) FAILED %08x\n", dacFilePath, HRESULT_FROM_WIN32(GetLastError()));
+ return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
+ }
+#ifdef FEATURE_PAL
+ // On Linux/MacOS the DAC module handle needs to be re-created using the DAC PAL instance
+ // before being passed to DBI's OpenVirtualProcess* implementation. The DBI and DAC share
+ // the same PAL where dbgshim has it's own.
+ LoadLibraryWFnPtr loadLibraryWFn = (LoadLibraryWFnPtr)GetProcAddress(hDac, "LoadLibraryW");
+ if (loadLibraryWFn != nullptr)
+ {
+ hDac = loadLibraryWFn(pDacModulePath);
+ if (hDac == NULL)
+ {
+ ExtErr("DBI LoadLibraryW(%S) FAILED\n", pDacModulePath.GetPtr());
+ return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
+ }
+ }
+ else
+ {
+ ExtErr("DBI GetProcAddress(LoadLibraryW) FAILED\n");
+ return CORDBG_E_MISSING_DEBUGGER_EXPORTS;
+ }
+#endif // FEATURE_PAL
- if (FAILED(hr)) {
- return hr;
+ // Get access to OVP and call it
+ OpenVirtualProcessImplFnPtr ovpFn = (OpenVirtualProcessImplFnPtr)GetProcAddress(hDbi, "OpenVirtualProcessImpl");
+ if (ovpFn != nullptr)
+ {
+ // Have a CLR v4 Beta2+ DBI, call it and let it do the version check
+ hr = ovpFn(GetModuleAddress(), pDataTarget, hDac, &clrDebuggingVersionRequested, IID_ICorDebugProcess, &pUnkProcess, &clrDebuggingFlags);
+ if (FAILED(hr)) {
+ ExtErr("DBI OpenVirtualProcessImpl FAILED %08x\n", hr);
+ return hr;
+ }
+ }
+ else
+ {
+ // Fallback to CLR v4 Beta1 path, but skip some of the checking we'd normally do (maxSupportedVersion, etc.)
+ OpenVirtualProcess2FnPtr ovp2Fn = (OpenVirtualProcess2FnPtr)GetProcAddress(hDbi, "OpenVirtualProcess2");
+ if (ovp2Fn != nullptr)
+ {
+ hr = ovp2Fn(GetModuleAddress(), pDataTarget, hDac, IID_ICorDebugProcess, &pUnkProcess, &clrDebuggingFlags);
+ }
+ else
+ {
+ hr = CORDBG_E_LIBRARY_PROVIDER_ERROR;
+ }
+ if (FAILED(hr)) {
+ ExtErr("DBI OpenVirtualProcess2 FAILED %08x\n", hr);
+ return hr;
+ }
+ }
}
+ _ASSERTE(pUnkProcess != nullptr);
hr = pUnkProcess->QueryInterface(IID_ICorDebugProcess, (PVOID*)&m_pCorDebugProcess);
if (FAILED(hr)) {
return hr;
SetDbiFilePath(symbolFilePath);
return;
}
-}
-
-#ifndef FEATURE_PAL
-
-/**********************************************************************\
- * Internal function to load and check the version of the module
-\**********************************************************************/
-HMODULE LoadLibraryAndCheck(
- PCWSTR filename,
- DWORD timestamp,
- DWORD filesize)
-{
- HMODULE hModule = LoadLibraryExW(
- filename,
- NULL, // __reserved
- LOAD_WITH_ALTERED_SEARCH_PATH); // Ensure we check the dir in wszFullPath first
-
- if (hModule == NULL)
- {
- ExtOut("Unable to load '%S'. hr = 0x%x.\n", filename, HRESULT_FROM_WIN32(GetLastError()));
- return NULL;
- }
-
- // Did we load the right one?
- MODULEINFO modInfo = {0};
- if (!GetModuleInformation(
- GetCurrentProcess(),
- hModule,
- &modInfo,
- sizeof(modInfo)))
- {
- ExtOut("Failed to read module information for '%S'. hr = 0x%x.\n", filename, HRESULT_FROM_WIN32(GetLastError()));
- FreeLibrary(hModule);
- return NULL;
- }
-
- IMAGE_DOS_HEADER * pDOSHeader = (IMAGE_DOS_HEADER *) modInfo.lpBaseOfDll;
- IMAGE_NT_HEADERS * pNTHeaders = (IMAGE_NT_HEADERS *) (((LPBYTE) modInfo.lpBaseOfDll) + pDOSHeader->e_lfanew);
- DWORD dwSizeActual = pNTHeaders->OptionalHeader.SizeOfImage;
- DWORD dwTimeStampActual = pNTHeaders->FileHeader.TimeDateStamp;
- if ((dwSizeActual != filesize) || (dwTimeStampActual != timestamp))
- {
- ExtOut("Found '%S', but it does not match the CLR being debugged.\n", filename);
- ExtOut("Size: Expected '0x%x', Actual '0x%x'\n", filesize, dwSizeActual);
- ExtOut("Time stamp: Expected '0x%x', Actual '0x%x'\n", timestamp, dwTimeStampActual);
- FreeLibrary(hModule);
- return NULL;
- }
-
- return hModule;
-}
-
-#endif // FEATURE_PAL
+}
\ No newline at end of file
{
return target->GetOperatingSystem() == ITarget::OperatingSystem::Windows;
}
- return ITarget::OperatingSystem::Unknown;
+ return false;
}
/**********************************************************************\
* Called when the managed host or plug-in loads/initializes SOS.
\**********************************************************************/
-extern "C" HRESULT STDMETHODCALLTYPE SOSInitializeByHost(IUnknown* punk)
+extern "C" HRESULT STDMETHODCALLTYPE SOSInitializeByHost(IUnknown* punk, IDebuggerServices* debuggerServices)
{
IHost* host = nullptr;
HRESULT hr;
return hr;
}
}
- hr = SOSExtensions::Initialize(host);
+ hr = SOSExtensions::Initialize(host, debuggerServices);
if (FAILED(hr)) {
return hr;
}
- return InitializeSymbolService();
+ // Ignore error so the C++ hosting fallback doesn't fail because there is no symbol service
+ InitializeSymbolService();
+ return S_OK;
}
/**********************************************************************\
#include <metahost.h>
#include <mscoree.h>
#include <tchar.h>
-#include "debugshim.h"
#include "gcinfo.h"
#ifndef STRESS_LOG
return Extensions::GetInstance()->GetHost();
}
+inline IDebuggerServices* GetDebuggerServices()
+{
+ return Extensions::GetInstance()->GetDebuggerServices();
+}
+
inline ITarget* GetTarget()
{
return Extensions::GetInstance()->GetTarget();
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>$(SolutionDir)src\SOS\inc;$(SolutionDir)src\SOS\extensions;$(SolutionDir)src\SOS\gcdump;$(SolutionDir)src\SOS\debugshim;$(SolutionDir)src\inc;$(SolutionDir)src\pal\prebuilt\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(SolutionDir)src\SOS\inc;$(SolutionDir)src\SOS\extensions;$(SolutionDir)src\SOS\gcdump;$(SolutionDir)src\inc;$(SolutionDir)src\pal\prebuilt\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8 /homeparams</AdditionalOptions>
<AssemblerListingLocation>Debug/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
InitializeFunc initializeFunc = (InitializeFunc)dlsym(g_sosHandle, SOSInitialize);
if (initializeFunc)
{
- HRESULT hr = initializeFunc(GetHost());
+ HRESULT hr = initializeFunc(GetHost(), GetDebuggerServices());
if (hr != S_OK)
{
g_services->Output(DEBUG_OUTPUT_ERROR, SOSInitialize " failed %08x\n", hr);
#define SOSInitialize "SOSInitializeByHost"
typedef HRESULT (*CommandFunc)(ILLDBServices* services, const char* args);
-typedef HRESULT (*InitializeFunc)(IUnknown* punk);
+typedef HRESULT (*InitializeFunc)(IUnknown* punk, IDebuggerServices* debuggerServices);
extern char *g_coreclrDirectory;
extern LLDBServices* g_services;
Assert.Equal(defaultPath, symbolService.FormatSymbolStores());
symbolService.DisableSymbolStore();
- Assert.True(symbolService.ParseSymbolPath("srv*http://msdl.microsoft.com/download/symbols/"));
+ Assert.True(symbolService.ParseSymbolPath("srv*https://msdl.microsoft.com/download/symbols/"));
Assert.Equal(defaultServer, symbolService.FormatSymbolStores());
symbolService.DisableSymbolStore();