Use GetEntryPointIdFromOffset to get EntryPointId of generic methods
authorAmy Yu <amycmyu@gmail.com>
Thu, 7 Jun 2018 18:53:18 +0000 (11:53 -0700)
committerAmy Yu <amycmyu@gmail.com>
Tue, 19 Jun 2018 20:26:01 +0000 (13:26 -0700)
src/tools/r2rdump/DisassemblingTypeProvider.cs
src/tools/r2rdump/R2RReader.cs

index c0a7e14..46db0fe 100644 (file)
@@ -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;
index 6017644..dab31ea 100644 (file)
@@ -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;