提交 4440fae8 编写于 作者: C Charles Stoner

Enable EE for .NET Native

上级 4cdc3d8b
......@@ -30,6 +30,7 @@
<InterfaceGroup Priority="Low">
<Filter>
<RuntimeId RequiredValue="DkmRuntimeId.Clr"/>
<RuntimeId RequiredValue="DkmRuntimeId.ClrNativeCompilation"/>
</Filter>
<Interface Name="IDkmLanguageFrameDecoder"/>
</InterfaceGroup>
......@@ -40,6 +41,7 @@
<InterfaceGroup Priority="Low">
<Filter>
<RuntimeId RequiredValue="DkmRuntimeId.Clr"/>
<RuntimeId RequiredValue="DkmRuntimeId.ClrNativeCompilation"/>
</Filter>
<Interface Name="IDkmLanguageInstructionDecoder"/>
</InterfaceGroup>
......
......@@ -9,6 +9,7 @@
using System.Reflection.Metadata;
using Microsoft.VisualStudio.Debugger;
using Microsoft.VisualStudio.Debugger.Clr;
using Microsoft.VisualStudio.Debugger.Clr.NativeCompilation;
using Microsoft.VisualStudio.Debugger.Evaluation;
using Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation;
using Roslyn.Utilities;
......@@ -57,6 +58,11 @@ internal unsafe static ImmutableArray<MetadataBlock> GetMetadataBlocks(this DkmC
Debug.Assert(size > 0);
block = GetMetadataBlock(ptr, size);
}
catch (NotImplementedException e) when (module is DkmClrNcModuleInstance)
{
// DkmClrNcModuleInstance.GetMetaDataBytesPtr not implemented in Dev14.
throw new NotImplementedMetadataException(e);
}
catch (Exception e) when (MetadataUtilities.IsBadOrMissingMetadataException(e, module.FullName))
{
continue;
......
......@@ -30,6 +30,7 @@
<Compile Include="DynamicFlagsCustomTypeInfo.cs" />
<Compile Include="EESymbolProvider.cs" />
<Compile Include="ILSpan.cs" />
<Compile Include="NotImplementedMetadataException.cs" />
<Compile Include="PDB\MethodDebugInfo.Native.cs" />
<Compile Include="PDB\MethodDebugInfo.Portable.cs" />
<Compile Include="Placeholders.cs" />
......
......@@ -49,6 +49,10 @@ internal FrameDecoder(InstructionDecoder<TCompilation, TMethodSymbol, TModuleSym
onSuccess: method => GetFrameName(inspectionContext, workList, frame, argumentFlags, completionRoutine, method),
onFailure: e => completionRoutine(DkmGetFrameNameAsyncResult.CreateErrorResult(e)));
}
catch (NotImplementedMetadataException)
{
inspectionContext.GetFrameName(workList, frame, argumentFlags, completionRoutine);
}
catch (Exception e) when (ExpressionEvaluatorFatalError.CrashIfFailFastEnabled(e))
{
throw ExceptionUtilities.Unreachable;
......@@ -67,6 +71,10 @@ internal FrameDecoder(InstructionDecoder<TCompilation, TMethodSymbol, TModuleSym
onSuccess: method => completionRoutine(new DkmGetFrameReturnTypeAsyncResult(_instructionDecoder.GetReturnTypeName(method))),
onFailure: e => completionRoutine(DkmGetFrameReturnTypeAsyncResult.CreateErrorResult(e)));
}
catch (NotImplementedMetadataException)
{
inspectionContext.GetFrameReturnType(workList, frame, completionRoutine);
}
catch (Exception e) when (ExpressionEvaluatorFatalError.CrashIfFailFastEnabled(e))
{
throw ExceptionUtilities.Unreachable;
......
......@@ -46,6 +46,10 @@ string IDkmLanguageInstructionDecoder.GetMethodName(DkmLanguageInstructionAddres
return _instructionDecoder.GetName(method, includeParameterTypes, includeParameterNames);
}
catch (NotImplementedMetadataException)
{
return languageInstructionAddress.GetMethodName(argumentFlags);
}
catch (Exception e) when (ExpressionEvaluatorFatalError.CrashIfFailFastEnabled(e))
{
throw ExceptionUtilities.Unreachable;
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.CodeAnalysis.ExpressionEvaluator
{
internal sealed class NotImplementedMetadataException : Exception
{
internal NotImplementedMetadataException(NotImplementedException inner) : base(string.Empty, inner)
{
}
}
}
......@@ -33,6 +33,7 @@
<Filter>
<LanguageId RequiredValue="DkmLanguageId.VB"/>
<RuntimeId RequiredValue="DkmRuntimeId.Clr"/>
<RuntimeId RequiredValue="DkmRuntimeId.ClrNativeCompilation"/>
</Filter>
<Interface Name="IDkmLanguageFrameDecoder"/>
</InterfaceGroup>
......@@ -44,6 +45,7 @@
<Filter>
<LanguageId RequiredValue="DkmLanguageId.VB"/>
<RuntimeId RequiredValue="DkmRuntimeId.Clr"/>
<RuntimeId RequiredValue="DkmRuntimeId.ClrNativeCompilation"/>
</Filter>
<Interface Name="IDkmLanguageInstructionDecoder"/>
</InterfaceGroup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册