From 292770c5a5782425ab742b2739521eefc89fc725 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 8 Mar 2017 00:29:50 -0800 Subject: [PATCH] Fix assert in portable pdb reader running the clrstack command (#10011) Issue #9969 --- src/ToolBox/SOS/NETCore/SymbolReader.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ToolBox/SOS/NETCore/SymbolReader.cs b/src/ToolBox/SOS/NETCore/SymbolReader.cs index 492f7cb..50a8ded 100644 --- a/src/ToolBox/SOS/NETCore/SymbolReader.cs +++ b/src/ToolBox/SOS/NETCore/SymbolReader.cs @@ -296,6 +296,9 @@ namespace SOS return false; MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle(); + if (methodDebugHandle.IsNil) + return false; + MethodDebugInformation methodDebugInfo = reader.GetMethodDebugInformation(methodDebugHandle); SequencePointCollection sequencePoints = methodDebugInfo.GetSequencePoints(); -- 2.7.4