Imported Upstream version 5.14.0.106
Former-commit-id: 03fab0f68b93e237c47a03f7d3793d7f5d7c276d
This commit is contained in:
parent
c34b058d3e
commit
fee6ab6a16
@ -1 +1 @@
|
||||
a716110cdcded6f6c9a459907b56b1f4d6eeadbe
|
||||
fe749f40b031bea9c317a0fdd447b7463c1fa428
|
@ -1 +1 @@
|
||||
1b47868002d8f5b8e4c85708dc50e855d259353b
|
||||
7dc767be05a654f669f5fcb931c96a68bb03fc6c
|
@ -5,9 +5,9 @@
|
||||
[assembly:System.Reflection.AssemblyVersionAttribute("0.10.0.0")]
|
||||
[assembly:System.CLSCompliantAttribute(false)]
|
||||
[assembly:System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute.DebuggingModes)(2))]
|
||||
[assembly:System.Reflection.AssemblyCopyrightAttribute("Copyright © 2008 - 2015 Jb Evain")]
|
||||
[assembly:System.Reflection.AssemblyCopyrightAttribute("Copyright © 2008 - 2018 Jb Evain")]
|
||||
[assembly:System.Reflection.AssemblyFileVersionAttribute("0.10.0.0")]
|
||||
[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.10.0.0-beta7")]
|
||||
[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.10.0.0")]
|
||||
[assembly:System.Reflection.AssemblyProductAttribute("Mono.Cecil")]
|
||||
[assembly:System.Reflection.AssemblyTitleAttribute("Mono.Cecil.Mdb")]
|
||||
[assembly:System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)]
|
||||
|
@ -1 +1 @@
|
||||
ab7d67e411350069bbfbb253ebf85aaea01ddab9
|
||||
8d89b5ff7f8c0d7a260c7d6ec5d1b9baf4b22fd2
|
51
external/cecil/Mono.Cecil.Cil/Document.cs
vendored
51
external/cecil/Mono.Cecil.Cil/Document.cs
vendored
@ -49,12 +49,13 @@ namespace Mono.Cecil.Cil {
|
||||
|
||||
string url;
|
||||
|
||||
byte type;
|
||||
byte hash_algorithm;
|
||||
byte language;
|
||||
byte language_vendor;
|
||||
Guid type;
|
||||
Guid hash_algorithm;
|
||||
Guid language;
|
||||
Guid language_vendor;
|
||||
|
||||
byte [] hash;
|
||||
byte [] embedded_source;
|
||||
|
||||
public string Url {
|
||||
get { return url; }
|
||||
@ -62,23 +63,43 @@ namespace Mono.Cecil.Cil {
|
||||
}
|
||||
|
||||
public DocumentType Type {
|
||||
get { return (DocumentType) type; }
|
||||
set { type = (byte) value; }
|
||||
get { return type.ToType (); }
|
||||
set { type = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid TypeGuid {
|
||||
get { return type; }
|
||||
set { type = value; }
|
||||
}
|
||||
|
||||
public DocumentHashAlgorithm HashAlgorithm {
|
||||
get { return (DocumentHashAlgorithm) hash_algorithm; }
|
||||
set { hash_algorithm = (byte) value; }
|
||||
get { return hash_algorithm.ToHashAlgorithm (); }
|
||||
set { hash_algorithm = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid HashAlgorithmGuid {
|
||||
get { return hash_algorithm; }
|
||||
set { hash_algorithm = value; }
|
||||
}
|
||||
|
||||
public DocumentLanguage Language {
|
||||
get { return (DocumentLanguage) language; }
|
||||
set { language = (byte) value; }
|
||||
get { return language.ToLanguage (); }
|
||||
set { language = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid LanguageGuid {
|
||||
get { return language; }
|
||||
set { language = value; }
|
||||
}
|
||||
|
||||
public DocumentLanguageVendor LanguageVendor {
|
||||
get { return (DocumentLanguageVendor) language_vendor; }
|
||||
set { language_vendor = (byte) value; }
|
||||
get { return language_vendor.ToVendor (); }
|
||||
set { language_vendor = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid LanguageVendorGuid {
|
||||
get { return language_vendor; }
|
||||
set { language_vendor = value; }
|
||||
}
|
||||
|
||||
public byte [] Hash {
|
||||
@ -86,10 +107,16 @@ namespace Mono.Cecil.Cil {
|
||||
set { hash = value; }
|
||||
}
|
||||
|
||||
public byte[] EmbeddedSource {
|
||||
get { return embedded_source; }
|
||||
set { embedded_source = value; }
|
||||
}
|
||||
|
||||
public Document (string url)
|
||||
{
|
||||
this.url = url;
|
||||
this.hash = Empty<byte>.Array;
|
||||
this.embedded_source = Empty<byte>.Array;
|
||||
this.token = new MetadataToken (TokenType.Document);
|
||||
}
|
||||
}
|
||||
|
40
external/cecil/Mono.Cecil.Cil/Symbols.cs
vendored
40
external/cecil/Mono.Cecil.Cil/Symbols.cs
vendored
@ -761,6 +761,44 @@ namespace Mono.Cecil.Cil {
|
||||
ISymbolReader GetSymbolReader (ModuleDefinition module, Stream symbolStream);
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
[Serializable]
|
||||
#endif
|
||||
public sealed class SymbolsNotFoundException : FileNotFoundException {
|
||||
|
||||
public SymbolsNotFoundException (string message) : base (message)
|
||||
{
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
SymbolsNotFoundException (
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context)
|
||||
: base (info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
[Serializable]
|
||||
#endif
|
||||
public sealed class SymbolsNotMatchingException : InvalidOperationException {
|
||||
|
||||
public SymbolsNotMatchingException (string message) : base (message)
|
||||
{
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
SymbolsNotMatchingException (
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context)
|
||||
: base (info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class DefaultSymbolReaderProvider : ISymbolReaderProvider {
|
||||
|
||||
readonly bool throw_if_no_symbol;
|
||||
@ -810,7 +848,7 @@ namespace Mono.Cecil.Cil {
|
||||
}
|
||||
|
||||
if (throw_if_no_symbol)
|
||||
throw new FileNotFoundException (string.Format ("No symbol found for file: {0}", fileName));
|
||||
throw new SymbolsNotFoundException (string.Format ("No symbol found for file: {0}", fileName));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
2
external/cecil/Mono.Cecil.nuspec
vendored
2
external/cecil/Mono.Cecil.nuspec
vendored
@ -2,7 +2,7 @@
|
||||
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<id>Mono.Cecil</id>
|
||||
<version>0.10.0.0-beta7</version>
|
||||
<version>0.10.0.0</version>
|
||||
<title>Mono.Cecil</title>
|
||||
<authors>Jb Evain</authors>
|
||||
<owners>Jb Evain</owners>
|
||||
|
22
external/cecil/Mono.Cecil/AssemblyReader.cs
vendored
22
external/cecil/Mono.Cecil/AssemblyReader.cs
vendored
@ -105,7 +105,7 @@ namespace Mono.Cecil {
|
||||
: symbol_reader_provider.GetSymbolReader (module, module.FileName);
|
||||
|
||||
if (reader != null)
|
||||
module.ReadSymbols (reader);
|
||||
module.ReadSymbols (reader, parameters.ThrowIfSymbolsAreNotMatching);
|
||||
}
|
||||
|
||||
if (module.Image.HasDebugTables ())
|
||||
@ -834,6 +834,12 @@ namespace Mono.Cecil {
|
||||
|
||||
types [i] = ReadType (i + 1);
|
||||
}
|
||||
|
||||
if (module.IsWindowsMetadata ()) {
|
||||
for (uint i = 0; i < length; i++) {
|
||||
WindowsRuntimeProjections.Project (types [i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsNested (TypeAttributes attributes)
|
||||
@ -945,9 +951,6 @@ namespace Mono.Cecil {
|
||||
if (IsNested (attributes))
|
||||
type.DeclaringType = GetNestedTypeDeclaringType (type);
|
||||
|
||||
if (module.IsWindowsMetadata ())
|
||||
WindowsRuntimeProjections.Project (type);
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
@ -1035,7 +1038,12 @@ namespace Mono.Cecil {
|
||||
if (type != null)
|
||||
return type;
|
||||
|
||||
return ReadTypeDefinition (rid);
|
||||
type = ReadTypeDefinition (rid);
|
||||
|
||||
if (module.IsWindowsMetadata ())
|
||||
WindowsRuntimeProjections.Project (type);
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
TypeDefinition ReadTypeDefinition (uint rid)
|
||||
@ -2812,9 +2820,9 @@ namespace Mono.Cecil {
|
||||
var name = signature.ReadDocumentName ();
|
||||
|
||||
documents [i - 1] = new Document (name) {
|
||||
HashAlgorithm = hash_algorithm.ToHashAlgorithm (),
|
||||
HashAlgorithmGuid = hash_algorithm,
|
||||
Hash = hash,
|
||||
Language = language.ToLanguage (),
|
||||
LanguageGuid = language,
|
||||
token = new MetadataToken (TokenType.Document, i),
|
||||
};
|
||||
}
|
||||
|
@ -282,6 +282,12 @@ namespace Mono.Cecil {
|
||||
if (File.Exists (file))
|
||||
return GetAssembly (file, parameters);
|
||||
|
||||
if (on_mono && Directory.Exists (path + "-api")) {
|
||||
file = Path.Combine (path + "-api", "mscorlib.dll");
|
||||
if (File.Exists (file))
|
||||
return GetAssembly (file, parameters);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
18
external/cecil/Mono.Cecil/Import.cs
vendored
18
external/cecil/Mono.Cecil/Import.cs
vendored
@ -177,7 +177,7 @@ namespace Mono.Cecil {
|
||||
string.Empty,
|
||||
type.Name,
|
||||
module,
|
||||
ImportScope (type.Assembly ()),
|
||||
ImportScope (type),
|
||||
type.IsValueType ());
|
||||
|
||||
reference.etype = ImportElementType (type);
|
||||
@ -193,6 +193,11 @@ namespace Mono.Cecil {
|
||||
return reference;
|
||||
}
|
||||
|
||||
protected virtual IMetadataScope ImportScope (Type type)
|
||||
{
|
||||
return ImportScope (type.Assembly ());
|
||||
}
|
||||
|
||||
static bool ImportOpenGenericType (Type type, ImportGenericKind import_kind)
|
||||
{
|
||||
return type.IsGenericType () && type.IsGenericTypeDefinition () && import_kind == ImportGenericKind.Open;
|
||||
@ -294,7 +299,7 @@ namespace Mono.Cecil {
|
||||
return etype;
|
||||
}
|
||||
|
||||
AssemblyNameReference ImportScope (SR.Assembly assembly)
|
||||
protected AssemblyNameReference ImportScope (SR.Assembly assembly)
|
||||
{
|
||||
return ImportReference (assembly.GetName ());
|
||||
}
|
||||
@ -504,7 +509,7 @@ namespace Mono.Cecil {
|
||||
type.Namespace,
|
||||
type.Name,
|
||||
module,
|
||||
ImportScope (type.Scope),
|
||||
ImportScope (type),
|
||||
type.IsValueType);
|
||||
|
||||
MetadataSystem.TryProcessPrimitiveTypeReference (reference);
|
||||
@ -518,7 +523,12 @@ namespace Mono.Cecil {
|
||||
return reference;
|
||||
}
|
||||
|
||||
IMetadataScope ImportScope (IMetadataScope scope)
|
||||
protected virtual IMetadataScope ImportScope (TypeReference type)
|
||||
{
|
||||
return ImportScope (type.Scope);
|
||||
}
|
||||
|
||||
protected IMetadataScope ImportScope (IMetadataScope scope)
|
||||
{
|
||||
switch (scope.MetadataScopeType) {
|
||||
case MetadataScopeType.AssemblyNameReference:
|
||||
|
@ -165,6 +165,8 @@ namespace Mono.Cecil {
|
||||
// we reset Body to null in ILSpy to save memory; so we need that operation to be thread-safe
|
||||
lock (module.SyncRoot) {
|
||||
body = value;
|
||||
if (value == null)
|
||||
this.debug_info = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
22
external/cecil/Mono.Cecil/ModuleDefinition.cs
vendored
22
external/cecil/Mono.Cecil/ModuleDefinition.cs
vendored
@ -38,6 +38,7 @@ namespace Mono.Cecil {
|
||||
Stream symbol_stream;
|
||||
ISymbolReaderProvider symbol_reader_provider;
|
||||
bool read_symbols;
|
||||
bool throw_symbols_mismatch;
|
||||
bool projections;
|
||||
bool in_memory;
|
||||
bool read_write;
|
||||
@ -89,6 +90,11 @@ namespace Mono.Cecil {
|
||||
set { read_symbols = value; }
|
||||
}
|
||||
|
||||
public bool ThrowIfSymbolsAreNotMatching {
|
||||
get { return throw_symbols_mismatch; }
|
||||
set { throw_symbols_mismatch = value; }
|
||||
}
|
||||
|
||||
public bool ReadWrite {
|
||||
get { return read_write; }
|
||||
set { read_write = value; }
|
||||
@ -107,6 +113,7 @@ namespace Mono.Cecil {
|
||||
public ReaderParameters (ReadingMode readingMode)
|
||||
{
|
||||
this.reading_mode = readingMode;
|
||||
this.throw_symbols_mismatch = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -691,7 +698,7 @@ namespace Mono.Cecil {
|
||||
public TypeReference GetType (string fullName, bool runtimeName)
|
||||
{
|
||||
return runtimeName
|
||||
? TypeParser.ParseType (this, fullName)
|
||||
? TypeParser.ParseType (this, fullName, typeDefinitionOnly: true)
|
||||
: GetType (fullName);
|
||||
}
|
||||
|
||||
@ -1077,10 +1084,15 @@ namespace Mono.Cecil {
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
var provider = new DefaultSymbolReaderProvider (throwIfNoSymbol: true);
|
||||
ReadSymbols (provider.GetSymbolReader (this, file_name));
|
||||
ReadSymbols (provider.GetSymbolReader (this, file_name), throwIfSymbolsAreNotMaching: true);
|
||||
}
|
||||
|
||||
public void ReadSymbols (ISymbolReader reader)
|
||||
{
|
||||
ReadSymbols(reader, throwIfSymbolsAreNotMaching: true);
|
||||
}
|
||||
|
||||
public void ReadSymbols (ISymbolReader reader, bool throwIfSymbolsAreNotMaching)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new ArgumentNullException ("reader");
|
||||
@ -1089,7 +1101,11 @@ namespace Mono.Cecil {
|
||||
|
||||
if (!symbol_reader.ProcessDebugHeader (GetDebugHeader ())) {
|
||||
symbol_reader = null;
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (throwIfSymbolsAreNotMaching)
|
||||
throw new SymbolsNotMatchingException ("Symbols were found but are not matching the assembly");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasImage && ReadingMode == ReadingMode.Immediate) {
|
||||
|
14
external/cecil/Mono.Cecil/TypeParser.cs
vendored
14
external/cecil/Mono.Cecil/TypeParser.cs
vendored
@ -234,20 +234,24 @@ namespace Mono.Cecil {
|
||||
return fullname.Substring (start, position - start);
|
||||
}
|
||||
|
||||
public static TypeReference ParseType (ModuleDefinition module, string fullname)
|
||||
public static TypeReference ParseType (ModuleDefinition module, string fullname, bool typeDefinitionOnly = false)
|
||||
{
|
||||
if (string.IsNullOrEmpty (fullname))
|
||||
return null;
|
||||
|
||||
var parser = new TypeParser (fullname);
|
||||
return GetTypeReference (module, parser.ParseType (true));
|
||||
return GetTypeReference (module, parser.ParseType (true), typeDefinitionOnly);
|
||||
}
|
||||
|
||||
static TypeReference GetTypeReference (ModuleDefinition module, Type type_info)
|
||||
static TypeReference GetTypeReference (ModuleDefinition module, Type type_info, bool type_def_only)
|
||||
{
|
||||
TypeReference type;
|
||||
if (!TryGetDefinition (module, type_info, out type))
|
||||
if (!TryGetDefinition (module, type_info, out type)) {
|
||||
if (type_def_only)
|
||||
return null;
|
||||
|
||||
type = CreateReference (type_info, module, GetMetadataScope (module, type_info));
|
||||
}
|
||||
|
||||
return CreateSpecs (type, type_info);
|
||||
}
|
||||
@ -296,7 +300,7 @@ namespace Mono.Cecil {
|
||||
var instance_arguments = instance.GenericArguments;
|
||||
|
||||
for (int i = 0; i < generic_arguments.Length; i++)
|
||||
instance_arguments.Add (GetTypeReference (type.Module, generic_arguments [i]));
|
||||
instance_arguments.Add (GetTypeReference (type.Module, generic_arguments [i], false));
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
4
external/cecil/ProjectInfo.cs
vendored
4
external/cecil/ProjectInfo.cs
vendored
@ -11,10 +11,10 @@ using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyProduct (Consts.AssemblyName)]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2008 - 2015 Jb Evain")]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2008 - 2018 Jb Evain")]
|
||||
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
[assembly: AssemblyVersion ("0.10.0.0")]
|
||||
[assembly: AssemblyFileVersion ("0.10.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("0.10.0.0-beta7")]
|
||||
[assembly: AssemblyInformationalVersion ("0.10.0.0")]
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@ -91,15 +92,16 @@ namespace Mono.Cecil.Tests {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MismatchedLibraryAndSymbols_DoNotThrow ()
|
||||
public void MismatchedLibraryAndSymbols ()
|
||||
{
|
||||
// SQLite-net.dll (from nuget) shiped with mismatched symbol files, but throwIfNoSymbol did not prevent it from throwing
|
||||
var readerParms = new ReaderParameters {
|
||||
var parameters = new ReaderParameters {
|
||||
ReadSymbols = true,
|
||||
SymbolReaderProvider = new Cil.DefaultSymbolReaderProvider (throwIfNoSymbol: false)
|
||||
SymbolReaderProvider = new DefaultSymbolReaderProvider (throwIfNoSymbol: false),
|
||||
ThrowIfSymbolsAreNotMatching = false,
|
||||
};
|
||||
|
||||
using (var module = GetResourceModule ("SQLite-net.dll", readerParms)) {
|
||||
using (var module = GetResourceModule ("SQLite-net.dll", parameters)) {
|
||||
Assert.Null (module.SymbolReader);
|
||||
}
|
||||
}
|
||||
|
@ -254,6 +254,15 @@ namespace Mono.Cecil.Tests {
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetNonExistentTypeRuntimeName ()
|
||||
{
|
||||
using (var module = GetResourceModule ("libhello.dll")) {
|
||||
var type = module.GetType ("DoesNotExist", runtimeName: true);
|
||||
Assert.IsNull (type);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OpenModuleImmediate ()
|
||||
{
|
||||
|
@ -50,6 +50,36 @@ namespace Mono.Cecil.Tests {
|
||||
Assert.AreEqual (typeof (PortablePdbReader), module.SymbolReader.GetType ());
|
||||
}, symbolReaderProvider: typeof (DefaultSymbolReaderProvider), symbolWriterProvider: typeof (DefaultSymbolWriterProvider), verify: !Platform.OnMono);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MdbMismatch ()
|
||||
{
|
||||
Assert.Throws<SymbolsNotMatchingException> (() => GetResourceModule ("mdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new MdbReaderProvider () }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MdbIgnoreMismatch()
|
||||
{
|
||||
using (var module = GetResourceModule ("mdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new MdbReaderProvider (), ThrowIfSymbolsAreNotMatching = false })) {
|
||||
Assert.IsNull (module.SymbolReader);
|
||||
Assert.IsFalse (module.HasSymbols);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PortablePdbMismatch ()
|
||||
{
|
||||
Assert.Throws<SymbolsNotMatchingException> (() => GetResourceModule ("pdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new PortablePdbReaderProvider () }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PortablePdbIgnoreMismatch()
|
||||
{
|
||||
using (var module = GetResourceModule ("pdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new PortablePdbReaderProvider (), ThrowIfSymbolsAreNotMatching = false })) {
|
||||
Assert.IsNull (module.SymbolReader);
|
||||
Assert.IsFalse (module.HasSymbols);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
BIN
external/cecil/Test/Resources/assemblies/mdb-mismatch.dll.mdb
vendored
Normal file
BIN
external/cecil/Test/Resources/assemblies/mdb-mismatch.dll.mdb
vendored
Normal file
Binary file not shown.
BIN
external/cecil/Test/Resources/assemblies/pdb-mismatch.pdb
vendored
Normal file
BIN
external/cecil/Test/Resources/assemblies/pdb-mismatch.pdb
vendored
Normal file
Binary file not shown.
@ -25,7 +25,7 @@ namespace Mono.Cecil.Mdb {
|
||||
Mixin.CheckModule (module);
|
||||
Mixin.CheckFileName (fileName);
|
||||
|
||||
return new MdbReader (module, MonoSymbolFile.ReadSymbolFile (Mixin.GetMdbFileName (fileName), module.Mvid));
|
||||
return new MdbReader (module, MonoSymbolFile.ReadSymbolFile (Mixin.GetMdbFileName (fileName)));
|
||||
}
|
||||
|
||||
public ISymbolReader GetSymbolReader (ModuleDefinition module, Stream symbolStream)
|
||||
@ -33,15 +33,7 @@ namespace Mono.Cecil.Mdb {
|
||||
Mixin.CheckModule (module);
|
||||
Mixin.CheckStream (symbolStream);
|
||||
|
||||
var file = MonoSymbolFile.ReadSymbolFile (symbolStream);
|
||||
if (module.Mvid != file.Guid) {
|
||||
var file_stream = symbolStream as FileStream;
|
||||
if (file_stream != null)
|
||||
throw new MonoSymbolFileException ("Symbol file `{0}' does not match assembly", file_stream.Name);
|
||||
|
||||
throw new MonoSymbolFileException ("Symbol file from stream does not match assembly");
|
||||
}
|
||||
return new MdbReader (module, file);
|
||||
return new MdbReader (module, MonoSymbolFile.ReadSymbolFile (symbolStream));
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user