Browse Source

Fix #3255: Ignore exceptions while decoding sequence point blobs.

pull/3265/head
Siegfried Pammer 9 months ago
parent
commit
930a4a20d1
  1. 7
      ICSharpCode.ILSpyX/PdbProvider/PortableDebugInfoProvider.cs

7
ICSharpCode.ILSpyX/PdbProvider/PortableDebugInfoProvider.cs

@ -98,6 +98,8 @@ namespace ICSharpCode.ILSpyX.PdbProvider
var debugInfo = metadata.GetMethodDebugInformation(method); var debugInfo = metadata.GetMethodDebugInformation(method);
var sequencePoints = new List<Decompiler.DebugInfo.SequencePoint>(); var sequencePoints = new List<Decompiler.DebugInfo.SequencePoint>();
try
{
foreach (var point in debugInfo.GetSequencePoints()) foreach (var point in debugInfo.GetSequencePoints())
{ {
string documentFileName; string documentFileName;
@ -124,6 +126,11 @@ namespace ICSharpCode.ILSpyX.PdbProvider
return sequencePoints; return sequencePoints;
} }
catch (BadImageFormatException)
{
return EmptyList<Decompiler.DebugInfo.SequencePoint>.Instance;
}
}
public IList<Variable> GetVariables(MethodDefinitionHandle method) public IList<Variable> GetVariables(MethodDefinitionHandle method)
{ {

Loading…
Cancel
Save