diff options
author | Amy Yu <amycmyu@gmail.com> | 2018-06-04 16:59:42 -0700 |
---|---|---|
committer | Amy Yu <amycmyu@gmail.com> | 2018-06-06 15:02:03 -0700 |
commit | 9c510164529851398b69a3b8bc3b7a7d4038830c (patch) | |
tree | 149d4f6a7f765be16932fde5c121e37ae9c58ff2 /src | |
parent | e6836fb9b7fe890df52c6ffb1a31ccef57fbea03 (diff) | |
download | coreclr-9c510164529851398b69a3b8bc3b7a7d4038830c.tar.gz coreclr-9c510164529851398b69a3b8bc3b7a7d4038830c.tar.bz2 coreclr-9c510164529851398b69a3b8bc3b7a7d4038830c.zip |
Avoid passing R2RReader to R2RMethod and RuntimeFunction constructors
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/r2rdump/R2RReader.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/r2rdump/R2RReader.cs b/src/tools/r2rdump/R2RReader.cs index 5fbe10dc4c..ce0ca699a3 100644 --- a/src/tools/r2rdump/R2RReader.cs +++ b/src/tools/r2rdump/R2RReader.cs @@ -254,19 +254,22 @@ namespace R2RDump return rva - containingSection.VirtualAddress + containingSection.PointerToRawData; } - public string GetTypeDefFullName(TypeDefinitionHandle handle) + /// <summary> + /// Get the full name of a type, including parent classes and namespace + /// </summary> + public static string GetTypeDefFullName(MetadataReader mdReader, TypeDefinitionHandle handle) { TypeDefinition typeDef; string typeStr = ""; do { - typeDef = _mdReader.GetTypeDefinition(handle); - typeStr = "." + _mdReader.GetString(typeDef.Name) + typeStr; + typeDef = mdReader.GetTypeDefinition(handle); + typeStr = "." + mdReader.GetString(typeDef.Name) + typeStr; handle = typeDef.GetDeclaringType(); } while (!handle.IsNil); - return _mdReader.GetString(typeDef.Namespace) + typeStr; + return mdReader.GetString(typeDef.Namespace) + typeStr; } /// <summary> |