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

Enable EE for .NET Native

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