From: Amy Yu Date: Thu, 7 Jun 2018 18:53:18 +0000 (-0700) Subject: Use GetEntryPointIdFromOffset to get EntryPointId of generic methods X-Git-Tag: submit/tizen/20210909.063632~11030^2~4562^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=447bd6fa300203df1fa84e37d8b51aa143a6842d;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Use GetEntryPointIdFromOffset to get EntryPointId of generic methods Commit migrated from https://github.com/dotnet/coreclr/commit/2cf151572ab9df6b40faad4fdcecd30d7b8d6f7c --- diff --git a/src/coreclr/src/tools/r2rdump/DisassemblingTypeProvider.cs b/src/coreclr/src/tools/r2rdump/DisassemblingTypeProvider.cs index c0a7e14..46db0fe 100644 --- a/src/coreclr/src/tools/r2rdump/DisassemblingTypeProvider.cs +++ b/src/coreclr/src/tools/r2rdump/DisassemblingTypeProvider.cs @@ -43,7 +43,7 @@ namespace R2RDump if ((definition.Attributes & TypeAttributes.NestedPublic) != 0 || (definition.Attributes & TypeAttributes.NestedFamily) != 0) { TypeDefinitionHandle declaringTypeHandle = definition.GetDeclaringType(); - return GetTypeFromDefinition(reader, declaringTypeHandle, 0) + "/" + name; + return GetTypeFromDefinition(reader, declaringTypeHandle, 0) + "." + name; } return name; diff --git a/src/coreclr/src/tools/r2rdump/R2RReader.cs b/src/coreclr/src/tools/r2rdump/R2RReader.cs index 6017644..dab31ea 100644 --- a/src/coreclr/src/tools/r2rdump/R2RReader.cs +++ b/src/coreclr/src/tools/r2rdump/R2RReader.cs @@ -202,9 +202,8 @@ namespace R2RDump } } - uint id = curParser.GetUnsigned(); - id = id >> 1; - R2RMethod method = new R2RMethod(_mdReader, rid, (int)id, args, tokens); + int id = GetEntryPointIdFromOffset((int)curParser.Offset); + R2RMethod method = new R2RMethod(_mdReader, rid, id, args, tokens); if (method.EntryPointRuntimeFunctionId >= 0 && method.EntryPointRuntimeFunctionId < isEntryPoint.Length) { isEntryPoint[method.EntryPointRuntimeFunctionId] = true;