Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-bot <dotnet-bot@microsoft.com>2017-09-20 04:21:28 +0300
committerdotnet-bot <dotnet-bot@microsoft.com>2017-09-20 04:21:28 +0300
commitcbf67af90e6c5457f54a2fa5be0035195ec94635 (patch)
tree8291626b3aab11380ef1c23a123d96b70fee5b27 /src/ILCompiler.Compiler
parent7d62ca86e5b765d4cfa7283a2fde15166a974465 (diff)
ProjectX: Fix a bug in GetDebugMethodRVAToTokenMap
GetTypicalMethodDefinition should be used to get the MSIL token instead of GetMethodDefinition [tfs-changeset: 1674872]
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/WindowsDebugMethodMapSection.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/WindowsDebugMethodMapSection.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/WindowsDebugMethodMapSection.cs
index ec6a36e60..4a86c7104 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/WindowsDebugMethodMapSection.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/WindowsDebugMethodMapSection.cs
@@ -91,12 +91,18 @@ namespace ILCompiler.DependencyAnalysis
foreach (IMethodBodyNode emitted in emittedMethods)
{
- if (!(emitted.Method.GetMethodDefinition() is Internal.TypeSystem.Ecma.EcmaMethod))
+ NonExternMethodSymbolNode methodNode = emitted as NonExternMethodSymbolNode;
+ if (methodNode != null && !methodNode.HasCompiledBody)
{
continue;
}
- EntityHandle methodHandle = pseudoAssembly.EmitMetadataHandleForTypeSystemEntity(emitted.Method.GetMethodDefinition());
+ if (!(emitted.Method.GetTypicalMethodDefinition() is Internal.TypeSystem.Ecma.EcmaMethod))
+ {
+ continue;
+ }
+
+ EntityHandle methodHandle = pseudoAssembly.EmitMetadataHandleForTypeSystemEntity(emitted.Method.GetTypicalMethodDefinition());
Debug.Assert(methodHandle.Kind == HandleKind.MemberReference);
uint methodToken = (uint)MetadataTokens.GetToken(methodHandle);
uint methodTokenRid = methodToken & 0xFFFFFF;