File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
ICSharpCode.Decompiler/DebugInfo Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,22 @@ string BuildFileNameFromTypeName(TypeDefinitionHandle handle)
235235
236236 if ( pdbId == null )
237237 {
238- var debugDir = file . Reader . ReadDebugDirectory ( ) . FirstOrDefault ( dir => dir . Type == DebugDirectoryEntryType . CodeView ) ;
238+ DebugDirectoryEntry debugDir = default ;
239+ foreach ( var dir in file . Reader . ReadDebugDirectory ( ) )
240+ {
241+ if ( dir . Type == DebugDirectoryEntryType . CodeView )
242+ {
243+ if ( debugDir . Equals ( default ( DebugDirectoryEntry ) ) )
244+ {
245+ debugDir = dir ;
246+ }
247+ if ( dir . IsPortableCodeView )
248+ {
249+ debugDir = dir ;
250+ break ;
251+ }
252+ }
253+ }
239254 var portable = file . Reader . ReadCodeViewDebugDirectoryData ( debugDir ) ;
240255 pdbId = new BlobContentId ( portable . Guid , debugDir . Stamp ) ;
241256 }
You can’t perform that action at this time.
0 commit comments