diff --git a/src/SOS/SOS.Extensions/DebuggerServices.cs b/src/SOS/SOS.Extensions/DebuggerServices.cs index 98ba7995d8..a6ebabb0c3 100644 --- a/src/SOS/SOS.Extensions/DebuggerServices.cs +++ b/src/SOS/SOS.Extensions/DebuggerServices.cs @@ -365,32 +365,32 @@ public HResult AddModuleSymbol(string symbolFileName) [StructLayout(LayoutKind.Sequential)] private readonly unsafe struct IDebuggerServicesVTable { - public readonly delegate* unmanaged[Stdcall] GetOperatingSystem; - public readonly delegate* unmanaged[Stdcall] GetDebuggeeType; - public readonly delegate* unmanaged[Stdcall] GetExecutingProcessorType; - public readonly delegate* unmanaged[Stdcall] AddCommand; + public readonly delegate* unmanaged[Stdcall] GetOperatingSystem; + public readonly delegate* unmanaged[Stdcall] GetDebuggeeType; + public readonly delegate* unmanaged[Stdcall] GetExecutingProcessorType; + public readonly delegate* unmanaged[Stdcall] AddCommand; public readonly delegate* unmanaged[Stdcall] OutputString; - public readonly delegate* unmanaged[Stdcall] ReadVirtual; - public readonly delegate* unmanaged[Stdcall] WriteVirtual; - public readonly delegate* unmanaged[Stdcall] GetNumberModules; - public readonly delegate* unmanaged[Stdcall] GetModuleNames; - public readonly delegate* unmanaged[Stdcall] GetModuleInfo; - public readonly delegate* unmanaged[Stdcall] GetModuleVersionInformation; - public readonly delegate* unmanaged[Stdcall] GetNumberThreads; - public readonly delegate* unmanaged[Stdcall] GetThreadIdsByIndex; - public readonly delegate* unmanaged[Stdcall] GetThreadContextBySystemId; - public readonly delegate* unmanaged[Stdcall] GetCurrentProcessSystemId; - public readonly delegate* unmanaged[Stdcall] GetCurrentThreadSystemId; - public readonly delegate* unmanaged[Stdcall] SetCurrentThreadSystemId; - public readonly delegate* unmanaged[Stdcall] GetThreadTeb; - public readonly delegate* unmanaged[Stdcall] VirtualUnwind; - public readonly delegate* unmanaged[Stdcall] GetSymbolPath; - public readonly delegate* unmanaged[Stdcall] GetSymbolByOffset; - public readonly delegate* unmanaged[Stdcall] GetOffsetBySymbol; + public readonly delegate* unmanaged[Stdcall] ReadVirtual; + public readonly delegate* unmanaged[Stdcall] WriteVirtual; + public readonly delegate* unmanaged[Stdcall] GetNumberModules; + public readonly delegate* unmanaged[Stdcall] GetModuleNames; + public readonly delegate* unmanaged[Stdcall] GetModuleInfo; + public readonly delegate* unmanaged[Stdcall] GetModuleVersionInformation; + public readonly delegate* unmanaged[Stdcall] GetNumberThreads; + public readonly delegate* unmanaged[Stdcall] GetThreadIdsByIndex; + public readonly delegate* unmanaged[Stdcall] GetThreadContextBySystemId; + public readonly delegate* unmanaged[Stdcall] GetCurrentProcessSystemId; + public readonly delegate* unmanaged[Stdcall] GetCurrentThreadSystemId; + public readonly delegate* unmanaged[Stdcall] SetCurrentThreadSystemId; + public readonly delegate* unmanaged[Stdcall] GetThreadTeb; + public readonly delegate* unmanaged[Stdcall] VirtualUnwind; + public readonly delegate* unmanaged[Stdcall] GetSymbolPath; + public readonly delegate* unmanaged[Stdcall] GetSymbolByOffset; + public readonly delegate* unmanaged[Stdcall] GetOffsetBySymbol; public readonly delegate* unmanaged[Stdcall] GetOutputWidth; - public readonly delegate* unmanaged[Stdcall] SupportsDml; + public readonly delegate* unmanaged[Stdcall] SupportsDml; public readonly delegate* unmanaged[Stdcall] OutputDmlString; - public readonly delegate* unmanaged[Stdcall] AddModuleSymbol; + public readonly delegate* unmanaged[Stdcall] AddModuleSymbol; } } } diff --git a/src/SOS/SOS.Extensions/RemoteMemoryService.cs b/src/SOS/SOS.Extensions/RemoteMemoryService.cs index 70aa7598ef..307b657444 100644 --- a/src/SOS/SOS.Extensions/RemoteMemoryService.cs +++ b/src/SOS/SOS.Extensions/RemoteMemoryService.cs @@ -35,8 +35,8 @@ public bool FreeMemory(ulong address, uint size, uint typeFlags) [StructLayout(LayoutKind.Sequential)] private readonly unsafe struct IRemoteMemoryServiceVTable { - public readonly delegate* unmanaged[Stdcall] AllocVirtual; - public readonly delegate* unmanaged[Stdcall] FreeVirtual; + public readonly delegate* unmanaged[Stdcall] AllocVirtual; + public readonly delegate* unmanaged[Stdcall] FreeVirtual; } } } diff --git a/src/SOS/SOS.Hosting/DataTargetWrapper.cs b/src/SOS/SOS.Hosting/DataTargetWrapper.cs index 48e4e2fbb3..826143d224 100644 --- a/src/SOS/SOS.Hosting/DataTargetWrapper.cs +++ b/src/SOS/SOS.Hosting/DataTargetWrapper.cs @@ -101,7 +101,7 @@ protected override void Destroy() #region ICLRDataTarget - private HResult GetMachineType( + private int GetMachineType( IntPtr self, out IMAGE_FILE_MACHINE machineType) { @@ -121,7 +121,7 @@ private HResult GetMachineType( return HResult.S_OK; } - private HResult GetPointerSize( + private int GetPointerSize( IntPtr self, out int pointerSize) { @@ -129,7 +129,7 @@ private HResult GetPointerSize( return HResult.S_OK; } - private HResult GetImageBase( + private int GetImageBase( IntPtr self, string imagePath, out ulong baseAddress) @@ -144,7 +144,7 @@ private HResult GetImageBase( return HResult.E_FAIL; } - private HResult ReadVirtual( + private int ReadVirtual( IntPtr self, ulong address, IntPtr buffer, @@ -163,7 +163,7 @@ private HResult ReadVirtual( return HResult.S_OK; } - private HResult WriteVirtual( + private int WriteVirtual( IntPtr self, ulong address, IntPtr buffer, @@ -180,7 +180,7 @@ private HResult WriteVirtual( return HResult.S_OK; } - private HResult GetTLSValue( + private int GetTLSValue( IntPtr self, uint threadId, uint index, @@ -189,7 +189,7 @@ private HResult GetTLSValue( return HResult.E_NOTIMPL; } - private HResult SetTLSValue( + private int SetTLSValue( IntPtr self, uint threadId, uint index, @@ -198,7 +198,7 @@ private HResult SetTLSValue( return HResult.E_NOTIMPL; } - private HResult GetCurrentThreadID( + private int GetCurrentThreadID( IntPtr self, out uint threadId) { @@ -212,7 +212,7 @@ private HResult GetCurrentThreadID( return HResult.E_FAIL; } - private HResult GetThreadContext( + private int GetThreadContext( IntPtr self, uint threadId, uint contextFlags, @@ -241,7 +241,7 @@ private HResult GetThreadContext( return HResult.S_OK; } - private HResult SetThreadContext( + private int SetThreadContext( IntPtr self, uint threadId, int contextSize, @@ -250,7 +250,7 @@ private HResult SetThreadContext( return HResult.E_NOTIMPL; } - private HResult Request( + private int Request( IntPtr self, uint reqCode, uint inBufferSize, @@ -265,7 +265,7 @@ private HResult Request( #region ICLRDataTarget2 - private HResult AllocVirtual( + private int AllocVirtual( IntPtr self, ulong address, uint size, @@ -283,7 +283,7 @@ private HResult AllocVirtual( return HResult.S_OK; } - private HResult FreeVirtual( + private int FreeVirtual( IntPtr self, ulong address, uint size, @@ -325,7 +325,7 @@ private int VirtualUnwind( #region ICLRMetadataLocator - private HResult GetMetadata( + private int GetMetadata( IntPtr self, string fileName, uint imageTimestamp, @@ -344,7 +344,7 @@ private HResult GetMetadata( #region ICLRRuntimeLocator - private HResult GetRuntimeBase( + private int GetRuntimeBase( IntPtr self, out ulong address) { @@ -357,23 +357,23 @@ private HResult GetRuntimeBase( #region ICLRDataTarget delegates [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetMachineTypeDelegate( + private delegate int GetMachineTypeDelegate( [In] IntPtr self, [Out] out IMAGE_FILE_MACHINE machineType); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetPointerSizeDelegate( + private delegate int GetPointerSizeDelegate( [In] IntPtr self, [Out] out int pointerSize); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetImageBaseDelegate( + private delegate int GetImageBaseDelegate( [In] IntPtr self, [In][MarshalAs(UnmanagedType.LPWStr)] string imagePath, [Out] out ulong baseAddress); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult ReadVirtualDelegate( + private delegate int ReadVirtualDelegate( [In] IntPtr self, [In] ulong address, [In] IntPtr buffer, @@ -381,7 +381,7 @@ private delegate HResult ReadVirtualDelegate( [Out] uint* bytesRead); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult WriteVirtualDelegate( + private delegate int WriteVirtualDelegate( [In] IntPtr self, [In] ulong address, [In] IntPtr buffer, @@ -389,26 +389,26 @@ private delegate HResult WriteVirtualDelegate( [Out] uint* bytesWritten); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetTLSValueDelegate( + private delegate int GetTLSValueDelegate( [In] IntPtr self, [In] uint threadId, [In] uint index, [Out] ulong* value); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult SetTLSValueDelegate( + private delegate int SetTLSValueDelegate( [In] IntPtr self, [In] uint threadId, [In] uint index, [In] ulong value); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetCurrentThreadIDDelegate( + private delegate int GetCurrentThreadIDDelegate( [In] IntPtr self, [Out] out uint threadId); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetThreadContextDelegate( + private delegate int GetThreadContextDelegate( [In] IntPtr self, [In] uint threadId, [In] uint contextFlags, @@ -416,14 +416,14 @@ private delegate HResult GetThreadContextDelegate( [Out] IntPtr context); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult SetThreadContextDelegate( + private delegate int SetThreadContextDelegate( [In] IntPtr self, [In] uint threadId, [In] int contextSize, [In] IntPtr context); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult RequestDelegate( + private delegate int RequestDelegate( [In] IntPtr self, [In] uint reqCode, [In] uint inBufferSize, @@ -436,7 +436,7 @@ private delegate HResult RequestDelegate( #region ICLRDataTarget2 delegates [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult AllocVirtualDelegate( + private delegate int AllocVirtualDelegate( [In] IntPtr self, [In] ulong address, [In] uint size, @@ -445,7 +445,7 @@ private delegate HResult AllocVirtualDelegate( [Out] ulong* buffer); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult FreeVirtualDelegate( + private delegate int FreeVirtualDelegate( [In] IntPtr self, [In] ulong address, [In] uint size, @@ -467,7 +467,7 @@ private delegate int VirtualUnwindDelegate( #region ICLRMetadataLocator delegate [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetMetadataDelegate( + private delegate int GetMetadataDelegate( [In] IntPtr self, [In][MarshalAs(UnmanagedType.LPWStr)] string fileName, [In] uint imageTimestamp, @@ -484,7 +484,7 @@ [In] [MarshalAs(UnmanagedType.LPArray, SizeConst = 16)] byte[] mvid, #region ICLRRuntimeLocator delegate [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetRuntimeBaseDelegate( + private delegate int GetRuntimeBaseDelegate( [In] IntPtr self, [Out] out ulong address); diff --git a/src/SOS/SOS.Hosting/HostWrapper.cs b/src/SOS/SOS.Hosting/HostWrapper.cs index e1fb16bb27..5b9a2c17de 100644 --- a/src/SOS/SOS.Hosting/HostWrapper.cs +++ b/src/SOS/SOS.Hosting/HostWrapper.cs @@ -48,7 +48,7 @@ public HostWrapper(IHost host, Func getTarget) /// /// target wrapper address returned /// S_OK - private HResult GetCurrentTarget(IntPtr self, out IntPtr targetWrapper) + private int GetCurrentTarget(IntPtr self, out IntPtr targetWrapper) { TargetWrapper wrapper = _getTarget(); if (wrapper == null) @@ -70,13 +70,13 @@ private delegate HostType GetHostTypeDelegate( [In] IntPtr self); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - internal delegate HResult GetServiceDelegate( + internal delegate int GetServiceDelegate( [In] IntPtr self, [In] in Guid guid, [Out] out IntPtr ptr); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetCurrentTargetDelegate( + private delegate int GetCurrentTargetDelegate( [In] IntPtr self, [Out] out IntPtr target); diff --git a/src/SOS/SOS.Hosting/ServiceWrapper.cs b/src/SOS/SOS.Hosting/ServiceWrapper.cs index 7dbf7dc016..43ac85e9a6 100644 --- a/src/SOS/SOS.Hosting/ServiceWrapper.cs +++ b/src/SOS/SOS.Hosting/ServiceWrapper.cs @@ -87,7 +87,7 @@ public COMCallableIUnknown GetServiceWrapper(in Guid serviceId) /// guid of the service /// pointer to return service instance /// S_OK or E_NOINTERFACE - public HResult GetService(IntPtr self, in Guid guid, out IntPtr ptr) + public int GetService(IntPtr self, in Guid guid, out IntPtr ptr) { ptr = IntPtr.Zero; diff --git a/src/SOS/SOS.Hosting/TargetWrapper.cs b/src/SOS/SOS.Hosting/TargetWrapper.cs index e20be17d98..6a5531814f 100644 --- a/src/SOS/SOS.Hosting/TargetWrapper.cs +++ b/src/SOS/SOS.Hosting/TargetWrapper.cs @@ -82,7 +82,7 @@ private string GetTempDirectory( return _target.GetTempDirectory(); } - private HResult GetRuntime( + private int GetRuntime( IntPtr self, IntPtr* ppRuntime) { @@ -120,7 +120,7 @@ private delegate string GetTempDirectoryDelegate( [In] IntPtr self); [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate HResult GetRuntimeDelegate( + private delegate int GetRuntimeDelegate( [In] IntPtr self, [Out] IntPtr* ppRuntime);