提交 1d8a3256 编写于 作者: T Tomas Matousek

Remove DiaSymReader source, it's been moved to dotnet/symreader repo

上级 7e4f3149
......@@ -3,51 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.DiaSymReader", "Microsoft.DiaSymReader\Microsoft.DiaSymReader.shproj", "{F9127F0F-95C8-4576-8081-96E004C1652F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DiaSymReader.NetFX20", "Microsoft.DiaSymReader\NetFX20\Microsoft.DiaSymReader.NetFX20.csproj", "{FA2C8969-BD1F-457A-A6E3-CA772135FF73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DiaSymReader.Portable", "Microsoft.DiaSymReader\Portable\Microsoft.DiaSymReader.Portable.csproj", "{316FD2AD-8514-41BD-98D5-61A821F3320E}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Microsoft.DiaSymReader\Microsoft.DiaSymReader.projitems*{fa2c8969-bd1f-457a-a6e3-ca772135ff73}*SharedItemsImports = 4
Microsoft.DiaSymReader\Microsoft.DiaSymReader.projitems*{316fd2ad-8514-41bd-98d5-61a821f3320e}*SharedItemsImports = 4
Microsoft.DiaSymReader\Microsoft.DiaSymReader.projitems*{f9127f0f-95c8-4576-8081-96e004c1652f}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|ARM.ActiveCfg = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|ARM.Build.0 = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|Any CPU.Build.0 = Release|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|ARM.ActiveCfg = Release|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|ARM.Build.0 = Release|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FA2C8969-BD1F-457A-A6E3-CA772135FF73}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|ARM.ActiveCfg = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|ARM.Build.0 = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|Any CPU.Build.0 = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|ARM.ActiveCfg = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|ARM.Build.0 = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{316FD2AD-8514-41BD-98D5-61A821F3320E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("EDF3A293-A10D-4F4A-A609-38D5EDE35F89")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface IMetadataImportProvider
{
/// <summary>
/// Gets an instance of IMetadataImport.
/// </summary>
/// <remarks>
/// The implementer is responsible for managing the lifetime of the resulting object.
/// </remarks>
[return: MarshalAs(UnmanagedType.Interface)]
object GetMetadataImport();
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("85E891DA-A631-4c76-ACA2-A44A39C46B8C")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymEncUnmanagedMethod
{
/// <summary>
/// Get the file name for the line associated with offset dwOffset.
/// </summary>
[PreserveSig]
int GetFileNameFromOffset(
int offset,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
/// <summary>
/// Get the Line information associated with <paramref name="offset"/>.
/// </summary>
/// <remarks>
/// If <paramref name="offset"/> is not a sequence point it is associated with the previous one.
/// <paramref name="sequencePointOffset"/> provides the associated sequence point.
/// </remarks>
[PreserveSig]
int GetLineFromOffset(
int offset,
out int startLine,
out int startColumn,
out int endLine,
out int endColumn,
out int sequencePointOffset);
/// <summary>
/// Get the number of Documents that this method has lines in.
/// </summary>
[PreserveSig]
int GetDocumentsForMethodCount(out int count);
/// <summary>
/// Get the documents this method has lines in.
/// </summary>
[PreserveSig]
int GetDocumentsForMethod(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)]ISymUnmanagedDocument[] documents);
/// <summary>
/// Get the smallest start line and largest end line, for the method, in a specific document.
/// </summary>
[PreserveSig]
int GetSourceExtentInDocument(ISymUnmanagedDocument document, out int startLine, out int endLine);
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("B20D55B3-532E-4906-87E7-25BD5734ABD2")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedAsyncMethod
{
[PreserveSig]
int IsAsyncMethod([MarshalAs(UnmanagedType.Bool)]out bool value);
[PreserveSig]
int GetKickoffMethod(out int kickoffMethodToken);
[PreserveSig]
int HasCatchHandlerILOffset([MarshalAs(UnmanagedType.Bool)]out bool offset);
[PreserveSig]
int GetCatchHandlerILOffset(out int offset);
[PreserveSig]
int GetAsyncStepInfoCount(out int count);
[PreserveSig]
int GetAsyncStepInfo(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] yieldOffsets,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] breakpointOffset,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] breakpointMethod);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("AA544D42-28CB-11d3-BD22-0000F80849BD")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedBinder
{
/// <summary>
/// Given a metadata interface and a file name, returns a new instance of <see cref="ISymUnmanagedReader"/>
/// that will read the debugging symbols associated with the specified PE file.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
int GetReaderForFile(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
/// <summary>
/// Given a metadata interface and a stream that contains
/// the symbol store, returns the <see cref="ISymUnmanagedReader"/>
/// that will read the debugging symbols from the given
/// symbol store.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the corresponding PE file.</param>
/// <param name="stream">PDB stream.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
int GetReaderFromStream(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.Interface)]object stream,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
};
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("ACCEE350-89AF-4ccb-8B40-1C2C4C6F9434")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedBinder2 : ISymUnmanagedBinder
{
#region ISymUnmanagedBinder methods
/// <summary>
/// Given a metadata interface and a file name, returns the
/// correct <see cref="ISymUnmanagedReader"/> that will read the debugging symbols
/// associated with the module.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderForFile(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
/// <summary>
/// Given a metadata interface and a stream that contains
/// the symbol store, returns the <see cref="ISymUnmanagedReader"/>
/// that will read the debugging symbols from the given
/// symbol store.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the corresponding PE file.</param>
/// <param name="stream">PDB stream.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderFromStream(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.Interface)]object stream,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
/// <summary>
/// Given a metadata interface and a file name, returns the
/// <see cref="ISymUnmanagedReader"/> interface that will read the debugging symbols associated
/// with the module.
/// </summary>
/// <remarks>
/// This version of the function can search for the PDB in areas other than
/// right next to the module, controlled by the <paramref name="searchPolicy"/>.
/// If a <paramref name="searchPath"/> is provided, those directories will always be searched.
/// </remarks>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="searchPolicy">Search policy.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
int GetReaderForFile2(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
SymUnmanagedSearchPolicy searchPolicy,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("28AD3D43-B601-4d26-8A1B-25F9165AF9D7")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedBinder3 : ISymUnmanagedBinder2
{
#region ISymUnmanagedBinder methods
/// <summary>
/// Given a metadata interface and a file name, returns the
/// correct <see cref="ISymUnmanagedReader"/> that will read the debugging symbols
/// associated with the module.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderForFile(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
/// <summary>
/// Given a metadata interface and a stream that contains
/// the symbol store, returns the <see cref="ISymUnmanagedReader"/>
/// that will read the debugging symbols from the given
/// symbol store.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the corresponding PE file.</param>
/// <param name="stream">PDB stream.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderFromStream(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.Interface)]object stream,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
#region ISymUnmanagedBinder2 methods
/// <summary>
/// Given a metadata interface and a file name, returns the
/// <see cref="ISymUnmanagedReader"/> interface that will read the debugging symbols associated
/// with the module.
/// </summary>
/// <remarks>
/// This version of the function can search for the PDB in areas other than
/// right next to the module, controlled by the <paramref name="searchPolicy"/>.
/// If a <paramref name="searchPath"/> is provided, those directories will always be searched.
/// </remarks>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="searchPolicy">Search policy.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderForFile2(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
SymUnmanagedSearchPolicy searchPolicy,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
[PreserveSig]
int GetReaderFromCallback(
[In, MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
SymUnmanagedSearchPolicy searchPolicy,
[In, MarshalAs(UnmanagedType.Interface)] object callback,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("F1DC5735-F877-48C9-BBE7-2A5486E84D7C")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedBinder4 : ISymUnmanagedBinder3
{
#region ISymUnmanagedBinder methods
/// <summary>
/// Given a metadata interface and a file name, returns the
/// correct <see cref="ISymUnmanagedReader"/> that will read the debugging symbols
/// associated with the module.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderForFile(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
/// <summary>
/// Given a metadata interface and a stream that contains
/// the symbol store, returns the <see cref="ISymUnmanagedReader"/>
/// that will read the debugging symbols from the given
/// symbol store.
/// </summary>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the corresponding PE file.</param>
/// <param name="stream">PDB stream.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderFromStream(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.Interface)]object stream,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
#region ISymUnmanagedBinder2 methods
/// <summary>
/// Given a metadata interface and a file name, returns the
/// <see cref="ISymUnmanagedReader"/> interface that will read the debugging symbols associated
/// with the module.
/// </summary>
/// <remarks>
/// This version of the function can search for the PDB in areas other than
/// right next to the module, controlled by the <paramref name="searchPolicy"/>.
/// If a <paramref name="searchPath"/> is provided, those directories will always be searched.
/// </remarks>
/// <param name="metadataImporter">An instance of IMetadataImport providing metadata for the specified PE file.</param>
/// <param name="fileName">PE file path.</param>
/// <param name="searchPath">Alternate path to search for debug data.</param>
/// <param name="searchPolicy">Search policy.</param>
/// <param name="reader">The new reader instance.</param>
[PreserveSig]
new int GetReaderForFile2(
[MarshalAs(UnmanagedType.Interface)]object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
SymUnmanagedSearchPolicy searchPolicy,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
#region ISymUnmanagedBinder3 methods
[PreserveSig]
new int GetReaderFromCallback(
[In, MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)]string fileName,
[MarshalAs(UnmanagedType.LPWStr)]string searchPath,
SymUnmanagedSearchPolicy searchPolicy,
[In, MarshalAs(UnmanagedType.Interface)] object callback, // IDiaLoadCallback(2)
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
#region ISymUnmanagedBinder4 methods
/// <summary>
/// Creates a new <see cref="ISymUnmanagedReader"/> for the specified PDB file.
/// </summary>
/// <param name="metadataImportProvider">
/// Provider of a metadata importer for the corresponding PE file.
/// The importer is only constructed if the operation performed on the SymReader requires access
/// to the metadata.
/// </param>
/// <param name="pdbFilePath">PDB file path.</param>
/// <param name="reader">The new reader instance.</param>
/// <returns>
/// E_INVALIDARG
/// <paramref name="metadataImportProvider"/> is null, or
/// <paramref name="pdbFilePath"/> is null or empty.
/// Another error code describing failure to open the file.
/// </returns>
[PreserveSig]
int GetReaderFromPdbFile(
[MarshalAs(UnmanagedType.Interface)]IMetadataImportProvider metadataImportProvider,
[MarshalAs(UnmanagedType.LPWStr)]string pdbFilePath,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
/// <summary>
/// Creates a new <see cref="ISymUnmanagedReader"/> for the specified PDB file.
/// </summary>
/// <param name="metadataImportProvider">
/// Provider of a metadata importer for the corresponding PE file.
/// The importer is only constructed if the operation performed on the SymReader requires access
/// to the metadata.
/// </param>
/// <param name="stream">PDB stream.</param>
/// <param name="reader">The new reader instance.</param>
/// <returns>
/// E_INVALIDARG
/// <paramref name="metadataImportProvider"/> is null, or
/// <paramref name="stream"/> is null.
/// Another error code describing failure to open the file.
/// </returns>
[PreserveSig]
int GetReaderFromPdbStream(
[MarshalAs(UnmanagedType.Interface)]IMetadataImportProvider metadataImportProvider,
[MarshalAs(UnmanagedType.Interface)]object stream,
[MarshalAs(UnmanagedType.Interface)]out ISymUnmanagedReader reader);
#endregion
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("48B25ED8-5BAD-41bc-9CEE-CD62FABC74E9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedConstant
{
[PreserveSig]
int GetName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
int GetValue(out object value);
[PreserveSig]
int GetSignature(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] signature);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("969708D2-05E5-4861-A3B0-96E473CDF63F")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedDispose
{
[PreserveSig]
int Destroy();
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.DiaSymReader
{
[ComImport]
[ComVisible(false)]
[Guid("40DE4037-7C81-3E1E-B022-AE1ABFF2CA08")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISymUnmanagedDocument
{
[PreserveSig]
int GetUrl(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] url);
[PreserveSig]
int GetDocumentType(ref Guid documentType);
[PreserveSig]
int GetLanguage(ref Guid language);
[PreserveSig]
int GetLanguageVendor(ref Guid vendor);
[PreserveSig]
int GetChecksumAlgorithmId(ref Guid algorithm);
[PreserveSig]
int GetChecksum(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] checksum);
[PreserveSig]
int FindClosestLine(int line, out int closestLine);
[PreserveSig]
int HasEmbeddedSource([MarshalAs(UnmanagedType.Bool)]out bool value);
[PreserveSig]
int GetSourceLength(out int length);
[PreserveSig]
int GetSourceRange(
int startLine,
int startColumn,
int endLine,
int endColumn,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] byte[] source);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("B62B923C-B500-3158-A543-24F307A8B7E1")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedMethod
{
[PreserveSig]
int GetToken(out int methodToken);
[PreserveSig]
int GetSequencePointCount(out int count);
[PreserveSig]
int GetRootScope([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope scope);
[PreserveSig]
int GetScopeFromOffset(int offset, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope scope);
/// <summary>
/// Gets the IL offset within the method that corresponds to the specified position.
/// </summary>
/// <param name="document">The document for which the offset is requested. </param>
/// <param name="line">The document line corresponding to the offset. </param>
/// <param name="column">The document column corresponding to the offset. </param>
/// <param name="offset">The offset within the specified document.</param>
/// <returns>HResult.</returns>
[PreserveSig]
int GetOffset(ISymUnmanagedDocument document, int line, int column, out int offset);
/// <summary>
/// Gets an array of start and end offset pairs that correspond to the ranges of IL that a given position covers within this method.
/// </summary>
[PreserveSig]
int GetRanges(
ISymUnmanagedDocument document,
int line,
int column,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] int[] ranges);
/// <summary>
/// Gets method parameters.
/// </summary>
[PreserveSig]
int GetParameters(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] parameters);
[PreserveSig]
int GetNamespace([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedNamespace @namespace);
/// <summary>
/// Gets the start and end positions for the source of the current method.
/// </summary>
/// <param name="documents">The starting and ending source documents.</param>
/// <param name="lines">The starting and ending lines in the corresponding source documents. </param>
/// <param name="columns">The starting and ending columns in the corresponding source documents. </param>
/// <param name="defined">true if the positions were defined; otherwise, false.</param>
/// <returns>HResult</returns>
[PreserveSig]
int GetSourceStartEnd(
ISymUnmanagedDocument[] documents,
[In, Out, MarshalAs(UnmanagedType.LPArray)] int[] lines,
[In, Out, MarshalAs(UnmanagedType.LPArray)] int[] columns,
[MarshalAs(UnmanagedType.Bool)]out bool defined);
[PreserveSig]
int GetSequencePoints(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] offsets,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedDocument[] documents,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] startLines,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] startColumns,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] endLines,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] endColumns);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("0DFF7289-54F8-11d3-BD28-0000F80849BD")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedNamespace
{
[PreserveSig]
int GetName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
[PreserveSig]
int GetVariables(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] variables);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("B4CE6286-2A6B-3712-A3B7-1EE1DAD467B5")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedReader
{
[PreserveSig]
int GetDocument(
[MarshalAs(UnmanagedType.LPWStr)] string url,
Guid language,
Guid languageVendor,
Guid documentType,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocument document);
[PreserveSig]
int GetDocuments(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedDocument[] documents);
[PreserveSig]
int GetUserEntryPoint(out int methodToken);
[PreserveSig]
int GetMethod(int methodToken, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
int GetMethodByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
int GetVariables(
int methodToken,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedVariable[] variables);
[PreserveSig]
int GetGlobalVariables(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] variables);
[PreserveSig]
int GetMethodFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
int GetSymAttribute(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
[PreserveSig]
int Initialize(
[MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)] string fileName,
[MarshalAs(UnmanagedType.LPWStr)] string searchPath,
IStream stream);
[PreserveSig]
int UpdateSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
int ReplaceSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
int GetSymbolStoreFileName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
int GetMethodsFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ISymUnmanagedMethod[] methods);
[PreserveSig]
int GetDocumentVersion(ISymUnmanagedDocument document, out int version, [MarshalAs(UnmanagedType.Bool)]out bool isCurrent);
[PreserveSig]
int GetMethodVersion(ISymUnmanagedMethod method, out int version);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("A09E53B2-2A57-4cca-8F63-B84F7C35D4AA")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedReader2 : ISymUnmanagedReader
{
#region ISymUnmanagedReader methods
[PreserveSig]
new int GetDocument(
[MarshalAs(UnmanagedType.LPWStr)] string url,
Guid language,
Guid languageVendor,
Guid documentType,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocument document);
[PreserveSig]
new int GetDocuments(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedDocument[] documents);
[PreserveSig]
new int GetUserEntryPoint(out int methodToken);
[PreserveSig]
new int GetMethod(int methodToken, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetMethodByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetVariables(
int methodToken,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetGlobalVariables(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetMethodFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetSymAttribute(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
new int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
[PreserveSig]
new int Initialize(
[MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)] string fileName,
[MarshalAs(UnmanagedType.LPWStr)] string searchPath,
IStream stream);
[PreserveSig]
new int UpdateSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int ReplaceSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int GetSymbolStoreFileName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
new int GetMethodsFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ISymUnmanagedMethod[] methods);
[PreserveSig]
new int GetDocumentVersion(ISymUnmanagedDocument document, out int version, [MarshalAs(UnmanagedType.Bool)]out bool isCurrent);
[PreserveSig]
new int GetMethodVersion(ISymUnmanagedMethod method, out int version);
#endregion
#region ISymUnmanagedReader2 methods
[PreserveSig]
int GetMethodByVersionPreRemap(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
int GetSymAttributePreRemap(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
int GetMethodsInDocument(
ISymUnmanagedDocument document,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedMethod[] methods);
#endregion
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("6151CAD9-E1EE-437A-A808-F64838C0D046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedReader3 : ISymUnmanagedReader2
{
#region ISymUnmanagedReader methods
[PreserveSig]
new int GetDocument(
[MarshalAs(UnmanagedType.LPWStr)] string url,
Guid language,
Guid languageVendor,
Guid documentType,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocument document);
[PreserveSig]
new int GetDocuments(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedDocument[] documents);
[PreserveSig]
new int GetUserEntryPoint(out int methodToken);
[PreserveSig]
new int GetMethod(int methodToken, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetMethodByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetVariables(
int methodToken,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetGlobalVariables(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetMethodFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetSymAttribute(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
new int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
[PreserveSig]
new int Initialize(
[MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)] string fileName,
[MarshalAs(UnmanagedType.LPWStr)] string searchPath,
IStream stream);
[PreserveSig]
new int UpdateSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int ReplaceSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int GetSymbolStoreFileName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
new int GetMethodsFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ISymUnmanagedMethod[] methods);
[PreserveSig]
new int GetDocumentVersion(ISymUnmanagedDocument document, out int version, [MarshalAs(UnmanagedType.Bool)]out bool isCurrent);
[PreserveSig]
new int GetMethodVersion(ISymUnmanagedMethod method, out int version);
#endregion
#region ISymUnmanagedReader2 methods
[PreserveSig]
new int GetMethodByVersionPreRemap(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetSymAttributePreRemap(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
new int GetMethodsInDocument(
ISymUnmanagedDocument document,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedMethod[] methods);
#endregion
#region ISymUnmanagedReader3 methods
/// <summary>
/// Gets a custom debug information based upon its name and an EnC 1-based version number.
/// </summary>
[PreserveSig]
int GetSymAttributeByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] customDebugInformation);
/// <summary>
/// Gets a custom debug information based upon its name and an EnC 1-based version number.
/// </summary>
[PreserveSig]
int GetSymAttributeByVersionPreRemap(
int methodToken,
int version,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] customDebugInformation);
#endregion
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("E65C58B7-2948-434D-8A6D-481740A00C16")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedReader4 : ISymUnmanagedReader3
{
#region ISymUnmanagedReader methods
[PreserveSig]
new int GetDocument(
[MarshalAs(UnmanagedType.LPWStr)] string url,
Guid language,
Guid languageVendor,
Guid documentType,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocument document);
[PreserveSig]
new int GetDocuments(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedDocument[] documents);
[PreserveSig]
new int GetUserEntryPoint(out int methodToken);
[PreserveSig]
new int GetMethod(int methodToken, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetMethodByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetVariables(
int methodToken,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetGlobalVariables(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] variables);
[PreserveSig]
new int GetMethodFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetSymAttribute(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
new int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
[PreserveSig]
new int Initialize(
[MarshalAs(UnmanagedType.Interface)] object metadataImporter,
[MarshalAs(UnmanagedType.LPWStr)] string fileName,
[MarshalAs(UnmanagedType.LPWStr)] string searchPath,
IStream stream);
[PreserveSig]
new int UpdateSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int ReplaceSymbolStore([MarshalAs(UnmanagedType.LPWStr)] string fileName, IStream stream);
[PreserveSig]
new int GetSymbolStoreFileName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
new int GetMethodsFromDocumentPosition(
ISymUnmanagedDocument document,
int line,
int column,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ISymUnmanagedMethod[] methods);
[PreserveSig]
new int GetDocumentVersion(ISymUnmanagedDocument document, out int version, [MarshalAs(UnmanagedType.Bool)]out bool isCurrent);
[PreserveSig]
new int GetMethodVersion(ISymUnmanagedMethod method, out int version);
#endregion
#region ISymUnmanagedReader2 methods
[PreserveSig]
new int GetMethodByVersionPreRemap(
int methodToken,
int version,
[MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetSymAttributePreRemap(
int methodToken,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] customDebugInformation);
[PreserveSig]
new int GetMethodsInDocument(
ISymUnmanagedDocument document,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ISymUnmanagedMethod[] methods);
#endregion
#region ISymUnmanagedReader3 methods
/// <summary>
/// Gets a custom debug information based upon its name and an EnC 1-based version number.
/// </summary>
[PreserveSig]
new int GetSymAttributeByVersion(
int methodToken,
int version,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] customDebugInformation);
/// <summary>
/// Gets a custom debug information based upon its name and an EnC 1-based version number.
/// </summary>
[PreserveSig]
new int GetSymAttributeByVersionPreRemap(
int methodToken,
int version,
[MarshalAs(UnmanagedType.LPWStr)] string name,
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] customDebugInformation);
#endregion
#region ISymUnmanagedReader4 methods
/// <summary>
/// Checkes whether the id stored in the PDB matches the PDB ID stored in the PE/COFF Debug Directory.
/// </summary>
[PreserveSig]
int MatchesModule(Guid guid, uint stamp, int age, [MarshalAs(UnmanagedType.Bool)]out bool result);
/// <summary>
/// Returns a pointer to Portable Debug Metadata. Only available for Portable PDBs.
/// </summary>
/// <param name="metadata">
/// A pointer to memory where Portable Debug Metadata start. The memory is owned by the SymReader and
/// valid until <see cref="ISymUnmanagedDispose.Destroy"/> is invoked.
///
/// Null if the PDB is not portable.
/// </param>
/// <param name="size">Size of the metadata block.</param>
[PreserveSig]
unsafe int GetPortableDebugMetadata(out byte* metadata, out int size);
/// <summary>
/// Returns a pointer to Source Server data stored in the PDB.
/// </summary>
/// <param name="data">
/// A pointer to memory where Source Server data start. The memory is owned by the SymReader and
/// valid until <see cref="ISymUnmanagedDispose.Destroy"/> is invoked.
///
/// Null if the PDB doesn't contain Source Server data.
/// </param>
/// <param name="size">Size of the data in bytes.</param>
[PreserveSig]
unsafe int GetSourceServerData(out byte* data, out int size);
#endregion
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("68005D0F-B8E0-3B01-84D5-A11A94154942")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedScope
{
[PreserveSig]
int GetMethod([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
int GetParent([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope scope);
[PreserveSig]
int GetChildren(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedScope[] children);
[PreserveSig]
int GetStartOffset(out int offset);
[PreserveSig]
int GetEndOffset(out int offset);
[PreserveSig]
int GetLocalCount(out int count);
[PreserveSig]
int GetLocals(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] locals);
[PreserveSig]
int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComVisible(false)]
[Guid("AE932FBA-3FD8-4dba-8232-30A2309B02DB")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface ISymUnmanagedScope2 : ISymUnmanagedScope
{
#region ISymUnmanagedScope methods
[PreserveSig]
new int GetMethod([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod method);
[PreserveSig]
new int GetParent([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope scope);
[PreserveSig]
new int GetChildren(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedScope[] children);
[PreserveSig]
new int GetStartOffset(out int offset);
[PreserveSig]
new int GetEndOffset(out int offset);
[PreserveSig]
new int GetLocalCount(out int count);
[PreserveSig]
new int GetLocals(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] locals);
[PreserveSig]
new int GetNamespaces(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
#endregion
#region ISymUnmanagedScope2 methods
[PreserveSig]
int GetConstantCount(out int count);
[PreserveSig]
int GetConstants(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedConstant[] constants);
#endregion
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.DiaSymReader
{
[ComImport]
[Guid("9F60EEBE-2D9A-3F7C-BF58-80BC991C60BB")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComVisible(false)]
public interface ISymUnmanagedVariable
{
[PreserveSig]
int GetName(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] name);
[PreserveSig]
int GetAttributes(out int attributes);
[PreserveSig]
int GetSignature(
int bufferLength,
out int count,
[In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] signature);
[PreserveSig]
int GetAddressKind(out int kind);
[PreserveSig]
int GetAddressField1(out int value);
[PreserveSig]
int GetAddressField2(out int value);
[PreserveSig]
int GetAddressField3(out int value);
[PreserveSig]
int GetStartOffset(out int offset);
[PreserveSig]
int GetEndOffset(out int offset);
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="Settings">
<Import Project="Version.targets" />
<Import Project="..\..\..\build\Targets\Settings.targets" />
</ImportGroup>
<ItemGroup Label="Redist">
<NuSpec Include="Microsoft.DiaSymReader.nuspec" />
</ItemGroup>
<Target Name="Build" Inputs="@(NuSpec)" Outputs="@(NuSpec-&gt;NuGet\$(NuGetVersionType)\%(Identity).$(NuGetVersion).nupkg">
<PropertyGroup>
<NuGetArguments>-prop currentVersion="$(NuGetVersion)"</NuGetArguments>
<NuGetOutDir>$(OutDir)NuGet\$(NuGetVersionType)</NuGetOutDir>
</PropertyGroup>
<!-- clean our output directory -->
<MakeDir Directories="$(NuGetOutDir)" Condition="!Exists('$(NuGetOutDir)')" />
<!-- copy any extra content files (like EULAs) that we need to include -->
<Copy SourceFiles="@(Content)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
<!-- package! -->
<Exec Command='$(NuGetToolPath) Pack "$(MSBuildProjectDirectory)\%(NuSpec.Identity)" -BasePath "$(OutDir)DiaSymReader" -OutputDirectory "$(NuGetOutDir)" $(NuGetArguments)' />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(OutDir)NuGet" />
</Target>
</Project>
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.DiaSymReader</id>
<summary>Microsoft DiaSymReader interop interfaces and utilities</summary>
<description>
Microsoft DiaSymReader interop interfaces and utilities.
</description>
<dependencies>
<group targetFramework="netstandard1.1">
<dependency id="System.Runtime" version="4.1.0-rc3-24102-00" />
<dependency id="System.Runtime.InteropServices" version="4.1.0-rc3-24102-00" />
<dependency id="System.Diagnostics.Debug" version="4.0.11-rc3-24102-00" />
</group>
</dependencies>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$currentVersion$</version>
<authors>Microsoft</authors>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkId=394369</licenseUrl>
<projectUrl>http://msdn.com/roslyn</projectUrl>
<releaseNotes>Preview of DiaSymReader interop library</releaseNotes>
<tags>DiaSymReader ISymUnmanagedReader PDB COM interop debugging</tags>
</metadata>
<files>
<file src="Portable\Microsoft.DiaSymReader.dll" target="lib\netstandard1.1" />
<file src="Portable\Microsoft.DiaSymReader.xml" target="lib\netstandard1.1" />
<file src="Portable\Microsoft.DiaSymReader.dll" target="lib\portable-net45+win8" />
<file src="Portable\Microsoft.DiaSymReader.xml" target="lib\portable-net45+win8" />
<file src="NetFX20\Microsoft.DiaSymReader.dll" target="lib\net20" />
<file src="NetFX20\Microsoft.DiaSymReader.xml" target="lib\net20" />
</files>
</package>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>f9127f0f-95c8-4576-8081-96e004c1652f</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Microsoft.DiaSymReader</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedBinder3.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IMetadataImportProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedBinder4.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedReader4.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SymUnmanagedSearchPolicy.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymEncUnmanagedMethod.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedAsyncMethod.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedBinder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedBinder2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedConstant.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedDispose.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedDocument.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedMethod.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedNamespace.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedReader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedReader2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedReader3.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedScope.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedScope2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ISymUnmanagedVariable.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SymUnmanagedSequencePoint.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>f9127f0f-95c8-4576-8081-96e004c1652f</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="Microsoft.DiaSymReader.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetNetFX20>true</TargetNetFX20>
</PropertyGroup>
<ImportGroup Label="Settings">
<Import Project="..\Version.targets" />
<Import Project="..\..\..\..\build\Targets\Settings.targets" />
</ImportGroup>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<ProjectGuid>{FA2C8969-BD1F-457A-A6E3-CA772135FF73}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.DiaSymReader</RootNamespace>
<AssemblyName>Microsoft.DiaSymReader</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SolutionDir Condition="'$(SolutionDir)' == '' OR '$(SolutionDir)' == '*Undefined*'">..\..\..\</SolutionDir>
<OutDir>$(OutDir)DiaSymReader\NetFX20\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<None Include="project.json" />
</ItemGroup>
<Import Project="..\Microsoft.DiaSymReader.projitems" Label="Shared" />
<ImportGroup Label="Targets">
<Import Project="..\..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
{
"dependencies": {
"Microsoft.NetFX20": "1.0.3"
},
"frameworks": {
"net46": {}
},
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
[assembly: System.Security.AllowPartiallyTrustedCallers]
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="Settings">
<Import Project="..\Version.targets" />
<Import Project="..\..\..\..\build\Targets\Settings.targets" />
</ImportGroup>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<ProjectGuid>{316FD2AD-8514-41BD-98D5-61A821F3320E}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.DiaSymReader</RootNamespace>
<AssemblyName>Microsoft.DiaSymReader</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SolutionDir Condition="'$(SolutionDir)' == '' OR '$(SolutionDir)' == '*Undefined*'">..\..\..\</SolutionDir>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutDir>$(OutDir)DiaSymReader\Portable\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\Microsoft.DiaSymReader.projitems" Label="Shared" />
<ImportGroup Label="Targets">
<Import Project="..\..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.DiaSymReader
{
public enum SymUnmanagedSearchPolicy
{
/// <summary>
/// Query the registry for symbol search paths.
/// </summary>
AllowRegistryAccess = 0x1,
/// <summary>
/// Access a symbol server.
/// </summary>
AllowSymbolServerAccess = 0x2,
/// <summary>
/// Look at the path specified in Debug Directory.
/// </summary>
AllowOriginalPathAccess = 0x4,
/// <summary>
/// Look for PDB in the place where the exe is.
/// </summary>
AllowReferencePathAccess = 0x8
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Diagnostics;
namespace Microsoft.DiaSymReader
{
[DebuggerDisplay("{GetDebuggerDisplay(),nq}")]
public struct SymUnmanagedSequencePoint
{
public readonly int Offset;
public readonly ISymUnmanagedDocument Document;
public readonly int StartLine;
public readonly int StartColumn;
public readonly int EndLine;
public readonly int EndColumn;
public bool IsHidden => StartLine == 0xfeefee;
public SymUnmanagedSequencePoint(
int offset,
ISymUnmanagedDocument document,
int startLine,
int startColumn,
int endLine,
int endColumn)
{
this.Offset = offset;
this.Document = document;
this.StartLine = startLine;
this.StartColumn = startColumn;
this.EndLine = endLine;
this.EndColumn = endColumn;
}
private string GetDebuggerDisplay()
{
return $"SequencePoint: Offset = {Offset:x4}, Range = ({StartLine}, {StartColumn})..({EndLine}, {EndColumn})";
}
}
}
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyVersion>1.0.8</AssemblyVersion>
<IsReleaseVersion>false</IsReleaseVersion>
</PropertyGroup>
<Choose>
<When Condition="$(BuildNumber) == ''">
<PropertyGroup>
<NuGetVersionSuffix>rc2</NuGetVersionSuffix>
<BuildVersion>$(AssemblyVersion).0</BuildVersion>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<NuGetVersionSuffix>rc2-$(BuildNumber.Split('.')[0])-$(BuildNumber.Split('.')[1].PadLeft(2,'0'))</NuGetVersionSuffix>
<BuildVersion>$(AssemblyVersion).$(BuildNumber.Split('.')[0])</BuildVersion>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<When Condition="$(IsReleaseVersion)" >
<PropertyGroup>
<NuGetVersion>$(AssemblyVersion)</NuGetVersion>
<NuGetVersionType>Release</NuGetVersionType>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<NuGetVersion>$(AssemblyVersion)-$(NuGetVersionSuffix)</NuGetVersion>
<NuGetVersionType>PerBuildPreRelease</NuGetVersionType>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册