Skip to content
/ cecil Public
forked from jbevain/cecil

Commit 33fbb78

Browse files
committed
Revert "Fix ReadSymbols in a Module that is already created (jbevain#686)"
This reverts commit 191f9fc.
1 parent 831dd0a commit 33fbb78

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

Mono.Cecil/AssemblyReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void ReadMethodsSymbols (TypeDefinition type, ISymbolReader symbol_reader)
419419
for (int i = 0; i < methods.Count; i++) {
420420
var method = methods [i];
421421

422-
if (method.HasBody && method.token.RID != 0 && (method.debug_info == null || !method.debug_info.HasSequencePoints))
422+
if (method.HasBody && method.token.RID != 0 && method.debug_info == null)
423423
method.debug_info = symbol_reader.Read (method);
424424
}
425425
}

Test/Mono.Cecil.Tests/PortablePdbTests.cs

-22
Original file line numberDiff line numberDiff line change
@@ -748,27 +748,5 @@ public void DoubleWriteAndReadAgainModuleWithDeterministicMvid ()
748748
Assert.AreNotEqual (mvid1_in, mvid2_in);
749749
Assert.AreNotEqual (mvid1_out, mvid2_out);
750750
}
751-
752-
[Test]
753-
public void LoadPdbOnDemand ()
754-
{
755-
var assembly = File.ReadAllBytes (GetAssemblyResourcePath ("Microsoft.AspNetCore.Components.dll"));
756-
var pdb = File.ReadAllBytes (GetAssemblyResourcePath ("Microsoft.AspNetCore.Components.pdb"));
757-
758-
var module = ModuleDefinition.ReadModule (new MemoryStream (assembly), new ReaderParameters (ReadingMode.Immediate));
759-
760-
var type = module.GetType ("Microsoft.AspNetCore.Components.Rendering.ComponentState");
761-
var main = type.GetMethod ("RenderIntoBatch");
762-
var debug_info = main.DebugInformation;
763-
764-
var pdbReaderProvider = new PdbReaderProvider ();
765-
var symbolReader = pdbReaderProvider.GetSymbolReader (module, new MemoryStream (pdb));
766-
module.ReadSymbols (symbolReader);
767-
type = module.GetType ("Microsoft.AspNetCore.Components.Rendering.ComponentState");
768-
main = type.GetMethod ("RenderIntoBatch");
769-
debug_info = main.DebugInformation;
770-
Assert.AreEqual (9, debug_info.SequencePoints.Count);
771-
}
772-
773751
}
774752
}
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)