Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2020-10-13 21:38:11 +0300
committerJb Evain <jb@evain.net>2020-10-13 21:38:11 +0300
commit90e23f1b30b179739eeb61bf0988863b1262b262 (patch)
treec21cccd218878e13fafcea1d86ac2b54ec9be2d9
parente9a4815fdb102a3bc87a606c6e9ee5f61c00414a (diff)
Revert "Fix ReadSymbols in a Module that is already created (#686)"
This reverts commit 191f9fc0a79a138fdb634fbb51cf836a86b4e565.
-rw-r--r--Mono.Cecil/AssemblyReader.cs2
-rw-r--r--Test/Mono.Cecil.Tests/PortablePdbTests.cs22
-rw-r--r--Test/Resources/assemblies/Microsoft.AspNetCore.Components.dllbin145280 -> 0 bytes
-rw-r--r--Test/Resources/assemblies/Microsoft.AspNetCore.Components.pdbbin402944 -> 0 bytes
4 files changed, 1 insertions, 23 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs
index ffefbcc..d18a51e 100644
--- a/Mono.Cecil/AssemblyReader.cs
+++ b/Mono.Cecil/AssemblyReader.cs
@@ -419,7 +419,7 @@ namespace Mono.Cecil {
for (int i = 0; i < methods.Count; i++) {
var method = methods [i];
- if (method.HasBody && method.token.RID != 0 && (method.debug_info == null || !method.debug_info.HasSequencePoints))
+ if (method.HasBody && method.token.RID != 0 && method.debug_info == null)
method.debug_info = symbol_reader.Read (method);
}
}
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
index 45b0333..fe60dc8 100644
--- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs
+++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
@@ -748,27 +748,5 @@ class Program
Assert.AreNotEqual (mvid1_in, mvid2_in);
Assert.AreNotEqual (mvid1_out, mvid2_out);
}
-
- [Test]
- public void LoadPdbOnDemand ()
- {
- var assembly = File.ReadAllBytes (GetAssemblyResourcePath ("Microsoft.AspNetCore.Components.dll"));
- var pdb = File.ReadAllBytes (GetAssemblyResourcePath ("Microsoft.AspNetCore.Components.pdb"));
-
- var module = ModuleDefinition.ReadModule (new MemoryStream (assembly), new ReaderParameters (ReadingMode.Immediate));
-
- var type = module.GetType ("Microsoft.AspNetCore.Components.Rendering.ComponentState");
- var main = type.GetMethod ("RenderIntoBatch");
- var debug_info = main.DebugInformation;
-
- var pdbReaderProvider = new PdbReaderProvider ();
- var symbolReader = pdbReaderProvider.GetSymbolReader (module, new MemoryStream (pdb));
- module.ReadSymbols (symbolReader);
- type = module.GetType ("Microsoft.AspNetCore.Components.Rendering.ComponentState");
- main = type.GetMethod ("RenderIntoBatch");
- debug_info = main.DebugInformation;
- Assert.AreEqual (9, debug_info.SequencePoints.Count);
- }
-
}
}
diff --git a/Test/Resources/assemblies/Microsoft.AspNetCore.Components.dll b/Test/Resources/assemblies/Microsoft.AspNetCore.Components.dll
deleted file mode 100644
index dc82ce8..0000000
--- a/Test/Resources/assemblies/Microsoft.AspNetCore.Components.dll
+++ /dev/null
Binary files differ
diff --git a/Test/Resources/assemblies/Microsoft.AspNetCore.Components.pdb b/Test/Resources/assemblies/Microsoft.AspNetCore.Components.pdb
deleted file mode 100644
index 927bc90..0000000
--- a/Test/Resources/assemblies/Microsoft.AspNetCore.Components.pdb
+++ /dev/null
Binary files differ