Browse Source

Fix the issue where PDBs generated by ILSpy do not match certain assemblies.

pull/3629/head
sonyps5201314 1 month ago
parent
commit
45081a6c4e
  1. 3
      ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs

3
ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs

@ -235,8 +235,9 @@ namespace ICSharpCode.Decompiler.DebugInfo @@ -235,8 +235,9 @@ namespace ICSharpCode.Decompiler.DebugInfo
if (pdbId == null)
{
var debugDir = file.Reader.ReadDebugDirectory().FirstOrDefault(dir => dir.Type == DebugDirectoryEntryType.CodeView);
var debugDir = file.Reader.ReadDebugDirectory().LastOrDefault(dir => dir.Type == DebugDirectoryEntryType.CodeView);
var portable = file.Reader.ReadCodeViewDebugDirectoryData(debugDir);
Debug.Assert(!portable.Path.EndsWith(".ni.pdb"));
pdbId = new BlobContentId(portable.Guid, debugDir.Stamp);
}

Loading…
Cancel
Save