Browse Source

Merge pull request #3629 from sonyps5201314/fix_pdb_mismatch

Fix the issue where PDBs generated by ILSpy do not match certain asse…
pull/3635/head
Siegfried Pammer 2 weeks ago committed by GitHub
parent
commit
67bc204589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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