<Uri>https://github.com/dotnet/symstore</Uri>
<Sha>3ed87724fe4e98c7ecc77617720591783ee2e676</Sha>
</Dependency>
- <Dependency Name="Microsoft.Diagnostics.Runtime" Version="2.0.220602">
- <Uri>https://github.com/Microsoft/clrmd</Uri>
- <Sha>c7cd5b047b78f383530b4694e083535babb60c60</Sha>
+ <Dependency Name="Microsoft.Diagnostics.Runtime" Version="2.0.225302">
+ <Uri>https://github.com/microsoft/clrmd</Uri>
+ <Sha>d0409daab70c27dcf4c8b8d39cf91c11ae0773e6</Sha>
</Dependency>
- <Dependency Name="Microsoft.Diagnostics.Runtime.Utilities" Version="2.0.220602">
- <Uri>https://github.com/Microsoft/clrmd</Uri>
- <Sha>c7cd5b047b78f383530b4694e083535babb60c60</Sha>
+ <Dependency Name="Microsoft.Diagnostics.Runtime.Utilities" Version="2.0.225302">
+ <Uri>https://github.com/microsoft/clrmd</Uri>
+ <Sha>d0409daab70c27dcf4c8b8d39cf91c11ae0773e6</Sha>
</Dependency>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.1.21103.13">
<Uri>https://github.com/dotnet/installer</Uri>
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
<!-- Other libs -->
<MicrosoftBclAsyncInterfacesVersion>1.1.0</MicrosoftBclAsyncInterfacesVersion>
- <MicrosoftDiagnosticsRuntimeVersion>2.0.220602</MicrosoftDiagnosticsRuntimeVersion>
- <MicrosoftDiagnosticsRuntimeUtilitiesVersion>2.0.220602</MicrosoftDiagnosticsRuntimeUtilitiesVersion>
+ <MicrosoftDiagnosticsRuntimeVersion>2.0.225302</MicrosoftDiagnosticsRuntimeVersion>
+ <MicrosoftDiagnosticsRuntimeUtilitiesVersion>2.0.225302</MicrosoftDiagnosticsRuntimeUtilitiesVersion>
<MicrosoftDiaSymReaderNativePackageVersion>1.7.0</MicrosoftDiaSymReaderNativePackageVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>2.0.64</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftExtensionsLoggingVersion>2.1.1</MicrosoftExtensionsLoggingVersion>
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
{
if (_exportReader is not null)
{
- return _exportReader.TryGetSymbolAddress(ImageBase, name, out address);
+ // 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)
+ {
+ }
}
address = 0;
return false;
AddRef();
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("HostServices.Destroy");
+ }
+
#region IHost
public IServiceEvent OnShutdownEvent { get; } = new ServiceEvent();
builder.Complete();
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("CorDebugDataTargetWrapper.Destroy");
+ }
+
#region ICorDebugDataTarget
private int GetPlatform(
builder.AddMethod(new FreeVirtualDelegate(FreeVirtual));
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("DataTargetWrapper.Destroy");
+ }
+
#region ICLRDataTarget
private HResult GetMachineType(
using Microsoft.Diagnostics.Runtime.Utilities;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Runtime.InteropServices;
namespace SOS.Hosting
AddRef();
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("HostWrapper.Destroy");
+ }
+
/// <summary>
/// Add service instance factory
/// </summary>
{
if (_targetWrapper != null)
{
- _targetWrapper.Destroy();
_targetWrapper.Release();
_targetWrapper = null;
}
using Microsoft.Diagnostics.Runtime.Utilities;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
AddRef();
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("LLDBServices.Destroy");
+ }
+
#region ILLDBServices
string GetCoreClrDirectory(
namespace SOS.Hosting
{
- internal sealed unsafe class RuntimeWrapper : COMCallableIUnknown, IDisposable
+ internal sealed unsafe class RuntimeWrapper : COMCallableIUnknown
{
/// <summary>
/// The runtime OS and type. Must match IRuntime::RuntimeConfiguration in runtime.h.
AddRef();
}
- public void Dispose()
+ protected override void Destroy()
{
+ Trace.TraceInformation("RuntimeWrapper.Destroy");
_onFlushEvent.Dispose();
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
- ~RuntimeWrapper()
- {
- Dispose(false);
- }
-
- private void Dispose(bool _)
- {
if (_dacHandle != IntPtr.Zero)
{
DataTarget.PlatformFunctions.FreeLibrary(_dacHandle);
/// <summary>
/// Helper code to hosting SOS under ClrMD
/// </summary>
- public sealed class SOSHost
+ public sealed class SOSHost : IDisposable
{
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SOSCommandDelegate(
private readonly HostWrapper _hostWrapper;
private readonly ulong _ignoreAddressBitsMask;
private IntPtr _sosLibrary = IntPtr.Zero;
+ private bool _disposed;
/// <summary>
/// The native SOS binaries path. Default is OS/architecture (RID) named directory in the same directory as this assembly.
}
}
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ ~SOSHost()
+ {
+ Dispose(false);
+ }
+
+ private void Dispose(bool _)
+ {
+ if (!_disposed)
+ {
+ Trace.TraceInformation("SOSHost.Dispose");
+ _disposed = true;
+ COMHelper.Release(_interface);
+ }
+ }
+
/// <summary>
/// Shutdown/clean up the native SOS.
/// </summary>
builder.AddMethod(new GetMetadataLocatorDelegate(GetMetadataLocator));
builder.AddMethod(new GetICorDebugMetadataLocatorDelegate(GetICorDebugMetadataLocator));
builder.Complete();
+ AddRef();
+ }
+
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("SymbolServiceWrapper.Destroy");
}
/// <summary>
AddRef();
}
- public void Destroy()
+ protected override void Destroy()
{
+ Trace.TraceInformation("TargetWrapper.Destroy");
foreach (RuntimeWrapper wrapper in _wrappers.Values)
{
- wrapper.Dispose();
wrapper.Release();
}
_wrappers.Clear();
using Microsoft.Diagnostics.Runtime.Interop;
using Microsoft.Diagnostics.Runtime.Utilities;
using System;
+using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
AddRef();
}
+ protected override void Destroy()
+ {
+ Trace.TraceInformation("DebugClient.Destroy");
+ }
+
private static void AddDebugClient(VTableBuilder builder, SOSHost soshost)
{
builder.AddMethod(new AttachKernelDelegate((self, flags, connectOptions) => NotImplemented));