From 7e913e056b872dde761bc18841cf7b3f8173b4fb Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 12 Mar 2021 20:59:04 +0100 Subject: [PATCH] Exclude artificial ILInstructions from PDB generation --- ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs b/ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs index e781098e0..9409239ef 100644 --- a/ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs @@ -462,6 +462,8 @@ namespace ICSharpCode.Decompiler.CSharp { if (inst.ILRangeIsEmpty) return false; + if (inst.Parent == null) + return false; return !(inst is BlockContainer || inst is Block); }