R2RDump - Test infrastructure (dotnet/coreclr#18745)
authorAmy <amycmyu@gmail.com>
Wed, 18 Jul 2018 19:26:36 +0000 (12:26 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Jul 2018 19:26:36 +0000 (12:26 -0700)
* Test infrastructure for R2RDump, compare xml and output diff

* Add R2RDumpTest to build-tests

* Fix errors causing tests to fail

* Create XUnitWrapper for R2RDumpTest

* Generate readytorun binaries from source code, copy expected xml output files to executable's directory

* Test R2RDump through commandline instead of calling R2RDump functions

* Fix errors

* Prevent duplicate xml tags

* Read test xml from string instead of file

* Fix test bugs

* Call dotnet r2rdump from msbuild

* Fix errors

* Use right slash for paths in bash

* Use different expected xml for different architectures

* R2RDumpTests for non-Windows

* Add more test cases

* Fix errors

* Supress warnings, avoid error when parsing x86 images

* Add license headers

Commit migrated from https://github.com/dotnet/coreclr/commit/eb622bef3851f8858db8d365454f1345e270dcd8

38 files changed:
src/coreclr/build.sh
src/coreclr/src/build.proj
src/coreclr/src/tools/r2rdump/Amd64/UnwindInfo.cs
src/coreclr/src/tools/r2rdump/CoreDisTools.cs
src/coreclr/src/tools/r2rdump/GCInfo.cs
src/coreclr/src/tools/r2rdump/GCSlotTable.cs
src/coreclr/src/tools/r2rdump/R2RDump.cs
src/coreclr/src/tools/r2rdump/R2RDump.csproj
src/coreclr/src/tools/r2rdump/R2RImportSection.cs
src/coreclr/src/tools/r2rdump/R2RMethod.cs
src/coreclr/src/tools/r2rdump/R2RReader.cs
src/coreclr/src/tools/r2rdump/R2RSection.cs
src/coreclr/src/tools/r2rdump/TextDumper.cs
src/coreclr/src/tools/r2rdump/XmlDumper.cs
src/coreclr/tests/src/readytorun/r2rdump/BasicTests.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/TestHelpers.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.csproj [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.csproj [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.csproj [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.csproj [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GcInfoTransitions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GenericFunctions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/HelloWorld.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/MultipleRuntimeFunctions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GcInfoTransitions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GenericFunctions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/HelloWorld.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/MultipleRuntimeFunctions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GcInfoTransitions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GenericFunctions.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/HelloWorld.xml [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/MultipleRuntimeFunctions.xml [new file with mode: 0644]
src/coreclr/tests/testsUnsupportedOutsideWindows.txt

index 2c7004f..091d622 100755 (executable)
@@ -448,6 +448,11 @@ build_CoreLib()
         __ExtraBuildArgs="$__ExtraBuildArgs -OptimizationDataDir=\"$__PackagesDir/optimization.$__BuildOS-$__BuildArch.IBC.CoreCLR/$__IbcOptDataVersion/data/\""
         __ExtraBuildArgs="$__ExtraBuildArgs -EnableProfileGuidedOptimization=true"
     fi
+
+    if [[ "$__BuildManagedTools" -eq "1" ]]; then
+        __ExtraBuildArgs="$__ExtraBuildArgs -BuildManagedTools=true"
+    fi
+
     $__ProjectRoot/run.sh build -Project=$__ProjectDir/build.proj -MsBuildEventLogging="/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log" -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false $__RunArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
 
     if [ $? -ne 0 ]; then
@@ -643,6 +648,7 @@ __PortableBuild=1
 __msbuildonunsupportedplatform=0
 __PgoOptDataVersion=""
 __IbcOptDataVersion=""
+__BuildManagedTools=1
 
 # Get the number of processors available to the scheduler
 # Other techniques such as `nproc` only get the number of
index 42f157c..4f34707 100644 (file)
     <CoreLibPDBPath>$(BinDir)System.Private.CoreLib.pdb</CoreLibPDBPath>
   </PropertyGroup>
 
-  <Target Name="RestoreAndBuildR2RDumpPackages" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(BuildManagedTools)' == 'true'" BeforeTargets="Build">
-    <Exec Command="$(DotnetRestoreCommand) tools/r2rdump/R2RDump.csproj"
-          StandardOutputImportance="Low" />
-    <Exec Command="$(DotnetToolCommand) build tools/r2rdump/R2RDump.csproj"
+  <Target Name="BuildR2RDumpPackages" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(BuildManagedTools)' == 'true'" BeforeTargets="Build">
+    <Exec Command="$(DotnetToolCommand) build /p:__BuildArch=$(BuildArch) /p:__BuildOS=$(BuildOS) /p:__BuildType=$(BuildType) tools/r2rdump/R2RDump.csproj"
           StandardOutputImportance="Low" />
   </Target>
 
index 00c55bb..4f7bb45 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Text;
+using System.Xml.Serialization;
 
 namespace R2RDump.Amd64
 {
@@ -32,6 +33,9 @@ namespace R2RDump.Amd64
 
     public struct UnwindCode
     {
+        [XmlAttribute("Index")]
+        public int Index { get; set; }
+
         public byte CodeOffset { get; set; }
         public UnwindOpCodes UnwindOp { get; set; } //4 bits
         public byte OpInfo { get; set; } //4 bits
@@ -41,8 +45,10 @@ namespace R2RDump.Amd64
 
         public uint FrameOffset { get; set; }
 
-        public UnwindCode(byte[] image, ref int offset)
+        public UnwindCode(byte[] image, int index, ref int offset)
         {
+            Index = index;
+
             int off = offset;
             CodeOffset = NativeReader.ReadByte(image, ref off);
             byte op = NativeReader.ReadByte(image, ref off);
@@ -85,7 +91,7 @@ namespace R2RDump.Amd64
             UnwindCode = new UnwindCode[CountOfUnwindCodes];
             for (int i = 0; i < CountOfUnwindCodes; i++)
             {
-                UnwindCode[i] = new UnwindCode(image, ref offset);
+                UnwindCode[i] = new UnwindCode(image, i, ref offset);
             }
 
             PersonalityRoutineRVA = NativeReader.ReadUInt32(image, ref offset);
index a84046d..194b449 100644 (file)
@@ -10,7 +10,7 @@ using System.Text;
 
 namespace R2RDump
 {
-    class CoreDisTools
+    public class CoreDisTools
     {
         private const string _dll = "coredistools.dll";
 
index c423eab..a940634 100644 (file)
@@ -34,10 +34,13 @@ namespace R2RDump
 
         public struct InterruptibleRange
         {
+            [XmlAttribute("Index")]
+            public uint Index { get; set; }
             public uint StartOffset { get; set; }
             public uint StopOffset { get; set; }
-            public InterruptibleRange(uint start, uint stop)
+            public InterruptibleRange(uint index, uint start, uint stop)
             {
+                Index = index;
                 StartOffset = start;
                 StopOffset = stop;
             }
@@ -45,6 +48,7 @@ namespace R2RDump
 
         public class GcTransition
         {
+            [XmlAttribute("Index")]
             public int CodeOffset { get; set; }
             public int SlotId { get; set; }
             public bool IsLive { get; set; }
@@ -90,6 +94,18 @@ namespace R2RDump
             }
         }
 
+        public struct SafePointOffset
+        {
+            [XmlAttribute("Index")]
+            public int Index { get; set; }
+            public uint Value { get; set; }
+            public SafePointOffset(int index, uint value)
+            {
+                Index = index;
+                Value = value;
+            }
+        }
+
         private const int GCINFO_VERSION = 2;
         private const int MIN_GCINFO_VERSION_WITH_RETURN_KIND = 2;
         private const int MIN_GCINFO_VERSION_WITH_REV_PINVOKE_FRAME = 2;
@@ -122,7 +138,7 @@ namespace R2RDump
         public uint SizeOfStackOutgoingAndScratchArea { get; set; }
         public uint NumSafePoints { get; set; }
         public uint NumInterruptibleRanges { get; set; }
-        public List<uint> SafePointOffsets { get; set; }
+        public List<SafePointOffset> SafePointOffsets { get; set; }
         public List<InterruptibleRange> InterruptibleRanges { get; set; }
         public GcSlotTable SlotTable { get; set; }
         public int Size { get; set; }
@@ -294,9 +310,9 @@ namespace R2RDump
             sb.AppendLine($"\tNumSafePoints: {NumSafePoints}");
             sb.AppendLine($"\tNumInterruptibleRanges: {NumInterruptibleRanges}");
             sb.AppendLine($"\tSafePointOffsets:");
-            foreach (uint offset in SafePointOffsets)
+            foreach (SafePointOffset offset in SafePointOffsets)
             {
-                sb.AppendLine($"\t\t{offset}");
+                sb.AppendLine($"\t\t{offset.Value}");
             }
             sb.AppendLine($"\tInterruptibleRanges:");
             foreach (InterruptibleRange range in InterruptibleRanges)
@@ -342,14 +358,14 @@ namespace R2RDump
             _wantsReportOnlyLeaf = ((headerFlags & GcInfoHeaderFlags.GC_INFO_WANTS_REPORT_ONLY_LEAF) != 0);
         }
 
-        private List<uint> EnumerateSafePoints(byte[] image, ref int bitOffset)
+        private List<SafePointOffset> EnumerateSafePoints(byte[] image, ref int bitOffset)
         {
-            List<uint> safePoints = new List<uint>();
+            List<SafePointOffset> safePoints = new List<SafePointOffset>();
             uint numBitsPerOffset = GcInfoTypes.CeilOfLog2(CodeLength);
             for (int i = 0; i < NumSafePoints; i++)
             {
                 uint normOffset = (uint)NativeReader.ReadBits(image, (int)numBitsPerOffset, ref bitOffset);
-                safePoints.Add(normOffset);
+                safePoints.Add(new SafePointOffset(i, normOffset));
             }
             return safePoints;
         }
@@ -366,7 +382,7 @@ namespace R2RDump
 
                 uint rangeStartOffset = lastinterruptibleRangeStopOffset + normStartDelta;
                 uint rangeStopOffset = rangeStartOffset + normStopDelta;
-                ranges.Add(new InterruptibleRange(rangeStartOffset, rangeStopOffset));
+                ranges.Add(new InterruptibleRange(i, rangeStartOffset, rangeStopOffset));
 
                 lastinterruptibleRangeStopOffset = rangeStopOffset;
             }
index d788f4d..3be9a3b 100644 (file)
@@ -6,6 +6,7 @@ using System;
 using System.Collections.Generic;
 using System.Reflection.PortableExecutable;
 using System.Text;
+using System.Xml.Serialization;
 
 namespace R2RDump
 {
@@ -13,12 +14,15 @@ namespace R2RDump
     {
         public struct GcSlot
         {
+            [XmlAttribute("Index")]
+            public int Index { get; set; }
             public int RegisterNumber { get; set; }
             public GcStackSlot StackSlot { get; set; }
             public GcSlotFlags Flags { get; set; }
 
-            public GcSlot(int registerNumber, GcStackSlot stack, GcSlotFlags flags, bool isUntracked = false)
+            public GcSlot(int index, int registerNumber, GcStackSlot stack, GcSlotFlags flags, bool isUntracked = false)
             {
+                Index = index;
                 RegisterNumber = registerNumber;
                 StackSlot = stack;
                 if (isUntracked)
@@ -107,7 +111,7 @@ namespace R2RDump
             // We certainly predecode the first register
             uint regNum = NativeReader.DecodeVarLengthUnsigned(image, gcInfoTypes.REGISTER_ENCBASE, ref bitOffset);
             GcSlotFlags flags = (GcSlotFlags)NativeReader.ReadBits(image, 2, ref bitOffset);
-            GcSlots.Add(new GcSlot((int)regNum, null, flags));
+            GcSlots.Add(new GcSlot(GcSlots.Count, (int)regNum, null, flags));
 
             for (int i = 1; i < NumRegisters; i++)
             {
@@ -121,7 +125,7 @@ namespace R2RDump
                     uint regDelta = NativeReader.DecodeVarLengthUnsigned(image, gcInfoTypes.REGISTER_DELTA_ENCBASE, ref bitOffset) + 1;
                     regNum += regDelta;
                 }
-                GcSlots.Add(new GcSlot((int)regNum, null, flags));
+                GcSlots.Add(new GcSlot(GcSlots.Count, (int)regNum, null, flags));
             }
         }
 
@@ -132,7 +136,7 @@ namespace R2RDump
             int normSpOffset = NativeReader.DecodeVarLengthSigned(image, gcInfoTypes.STACK_SLOT_ENCBASE, ref bitOffset);
             int spOffset = gcInfoTypes.DenormalizeStackSlot(normSpOffset);
             GcSlotFlags flags = (GcSlotFlags)NativeReader.ReadBits(image, 2, ref bitOffset);
-            GcSlots.Add(new GcSlot(-1, new GcStackSlot(spOffset, spBase), flags, isUntracked));
+            GcSlots.Add(new GcSlot(GcSlots.Count, -1, new GcStackSlot(spOffset, spBase), flags, isUntracked));
 
             for (int i = 1; i < nSlots; i++)
             {
@@ -149,7 +153,7 @@ namespace R2RDump
                     normSpOffset += normSpOffsetDelta;
                     spOffset = gcInfoTypes.DenormalizeStackSlot(normSpOffset);
                 }
-                GcSlots.Add(new GcSlot(-1, new GcStackSlot(spOffset, spBase), flags, isUntracked));
+                GcSlots.Add(new GcSlot(GcSlots.Count, -1, new GcStackSlot(spOffset, spBase), flags, isUntracked));
             }
         }
     }
index 659bc31..aa94131 100644 (file)
@@ -12,7 +12,7 @@ using System.Xml.Serialization;
 
 namespace R2RDump
 {
-    abstract class Dumper
+    public abstract class Dumper
     {
         internal R2RReader _r2r;
         internal bool _raw;
@@ -95,13 +95,14 @@ namespace R2RDump
 
             if (verbose)
             {
-                _raw = true;
                 _disasm = true;
                 _unwind = true;
                 _gc = true;
                 _sectionContents = true;
             }
 
+            _disasm = false; // TODO: this requires the coredistools nuget package with the most recent changes
+
             return argSyntax;
         }
 
@@ -368,11 +369,11 @@ namespace R2RDump
                 return 0;
             }
 
-            if (_inputFilenames.Count == 0)
-                throw new ArgumentException("Input filename must be specified (--in <file>)");
-
             try
             {
+                if (_inputFilenames.Count == 0)
+                    throw new ArgumentException("Input filename must be specified (--in <file>)");
+
                 foreach (string filename in _inputFilenames)
                 {
                     R2RReader r2r = new R2RReader(filename);
@@ -402,6 +403,22 @@ namespace R2RDump
             catch (Exception e)
             {
                 Console.WriteLine("Error: " + e.ToString());
+                if (e is ArgumentException)
+                {
+                    Console.WriteLine();
+                    Console.WriteLine(syntax.GetHelpText());
+                }
+                if (_xml)
+                {
+                    XmlDocument document = new XmlDocument();
+                    XmlNode node = document.CreateNode("element", "Error", "");
+                    node.InnerText = e.Message;
+                    document.AppendChild(node);
+                    if (_writer != null)
+                    {
+                        document.Save(_writer);
+                    }
+                }
                 return 1;
             }
             finally
index 47625f4..b0ad5a3 100644 (file)
        <AssemblyKey>Open</AssemblyKey>
        <IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly>
        <TargetFramework>netcoreapp2.0</TargetFramework>
-    <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
+       <RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
+       <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
+       <CLSCompliant>false</CLSCompliant>
+       <NoWarn>8002,NU1701</NoWarn>
   </PropertyGroup>
 
   <ItemGroup>
index 981501b..bf7a056 100644 (file)
@@ -6,6 +6,7 @@ using System;
 using System.Collections.Generic;
 using System.Reflection.PortableExecutable;
 using System.Text;
+using System.Xml.Serialization;
 
 namespace R2RDump
 {
@@ -34,6 +35,7 @@ namespace R2RDump
         {
             public int StartOffset { get; set; }
             public long Section { get; set; }
+            [XmlAttribute("Index")]
             public uint SignatureRVA { get; set; }
             public byte[] SignatureSample { get; set; }
             public ImportSectionEntry(int startOffset, long section, uint signatureRVA, byte[] signatureSample)
@@ -60,6 +62,7 @@ namespace R2RDump
         /// <summary>
         /// Section containing values to be fixed up
         /// </summary>
+        [XmlAttribute("Index")]
         public int SectionRVA { get; set; }
         public int SectionSize { get; set; }
 
index a051e90..5cd8c3a 100644 (file)
@@ -23,6 +23,7 @@ namespace R2RDump
         /// <summary>
         /// The index of the runtime function
         /// </summary>
+        [XmlAttribute("Index")]
         public int Id { get; set; }
 
         /// <summary>
@@ -128,6 +129,7 @@ namespace R2RDump
         /// <summary>
         /// The row id of the method
         /// </summary>
+        [XmlAttribute("Index")]
         public uint Rid { get; set; }
 
         /// <summary>
index a2f2a97..9b2940d 100644 (file)
@@ -128,13 +128,18 @@ namespace R2RDump
                 IntPtr ptr = (IntPtr)p;
                 _peReader = new PEReader(p, Image.Length);
 
-                IsR2R = (_peReader.PEHeaders.CorHeader.Flags == CorFlags.ILLibrary);
+                IsR2R = ((_peReader.PEHeaders.CorHeader.Flags & CorFlags.ILLibrary) != 0);
                 if (!IsR2R)
                 {
                     throw new BadImageFormatException("The file is not a ReadyToRun image");
                 }
 
                 Machine = _peReader.PEHeaders.CoffHeader.Machine;
+                               if (!Machine.IsDefined(typeof(Machine), Machine))
+                {
+                    Machine = Machine.Amd64;
+                    R2RDump.WriteWarning($"Invalid Machine: {Machine}");
+                }
                 ImageBase = _peReader.PEHeaders.PEHeader.ImageBase;
 
                 // initialize R2RHeader
index 77cf24d..ff39c81 100644 (file)
@@ -5,6 +5,7 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
+using System.Xml.Serialization;
 
 namespace R2RDump
 {
@@ -28,6 +29,7 @@ namespace R2RDump
         /// <summary>
         /// The ReadyToRun section type
         /// </summary>
+        [XmlAttribute("Index")]
         public SectionType Type { get; set; }
 
         /// <summary>
index e393220..a1c6905 100644 (file)
@@ -171,17 +171,15 @@ namespace R2RDump
         {
             int rtfOffset = 0;
             int codeOffset = rtf.CodeOffset;
-            Dictionary<int, GcInfo.GcTransition> transitions = rtf.Method.GcInfo.Transitions;
-            GcSlotTable slotTable = rtf.Method.GcInfo.SlotTable;
             while (rtfOffset < rtf.Size)
             {
                 string instr;
                 int instrSize = CoreDisTools.GetInstruction(Disasm, rtf, imageOffset, rtfOffset, image, out instr);
 
                 _writer.Write(instr);
-                if (transitions.ContainsKey(codeOffset))
+                if (rtf.Method.GcInfo != null && rtf.Method.GcInfo.Transitions.ContainsKey(codeOffset))
                 {
-                    _writer.WriteLine($"\t\t\t\t{transitions[codeOffset].GetSlotState(slotTable)}");
+                    _writer.WriteLine($"\t\t\t\t{rtf.Method.GcInfo.Transitions[codeOffset].GetSlotState(rtf.Method.GcInfo.SlotTable)}");
                 }
 
                 CoreDisTools.ClearOutputBuffer();
index c10ae7c..913a8be 100644 (file)
@@ -7,16 +7,16 @@ using System.Xml.Serialization;
 
 namespace R2RDump
 {
-    class XmlDumper : Dumper
+    public class XmlDumper : Dumper
     {
-        private XmlDocument _xmlDocument;
+        public XmlDocument XmlDocument { get; }
         private XmlNode _rootNode;
 
         public XmlDumper(R2RReader r2r, TextWriter writer, bool raw, bool header, bool disasm, IntPtr disassembler, bool unwind, bool gc, bool sectionContents)
         {
             _r2r = r2r;
             _writer = writer;
-            _xmlDocument = new XmlDocument();
+            XmlDocument = new XmlDocument();
 
             _raw = raw;
             _header = header;
@@ -27,15 +27,26 @@ namespace R2RDump
             _sectionContents = sectionContents;
         }
 
+        public XmlDocument GetXmlDocument()
+        {
+            Begin();
+            DumpHeader(true);
+            DumpAllMethods();
+            return XmlDocument;
+        }
+
         internal override void Begin()
         {
-            _rootNode = _xmlDocument.CreateNode("element", "R2RDump", "");
-            _xmlDocument.AppendChild(_rootNode);
+            _rootNode = XmlDocument.CreateNode("element", "R2RDump", "");
+            XmlDocument.AppendChild(_rootNode);
             Serialize(_r2r, _rootNode);
         }
 
         internal override void End() {
-            _xmlDocument.Save(_writer);
+            if (_writer != null)
+            {
+                XmlDocument.Save(_writer);
+            }
         }
 
         internal override void WriteDivider(string title)
@@ -55,7 +66,7 @@ namespace R2RDump
         /// </summary>
         internal override void DumpHeader(bool dumpSections)
         {
-            XmlNode headerNode = _xmlDocument.CreateNode("element", "Header", "");
+            XmlNode headerNode = XmlDocument.CreateNode("element", "Header", "");
             _rootNode.AppendChild(headerNode);
             Serialize(_r2r.R2RHeader, headerNode);
 
@@ -66,7 +77,7 @@ namespace R2RDump
 
             if (dumpSections)
             {
-                XmlNode sectionsNode = _xmlDocument.CreateNode("element", "Sections", "");
+                XmlNode sectionsNode = XmlDocument.CreateNode("element", "Sections", "");
                 _rootNode.AppendChild(sectionsNode);
                 AddXMLNode("Count", _r2r.R2RHeader.Sections.Count.ToString(), sectionsNode);
 
@@ -82,7 +93,8 @@ namespace R2RDump
         /// </summary>
         internal override void DumpSection(R2RSection section, XmlNode parentNode)
         {
-            XmlNode sectionNode = _xmlDocument.CreateNode("element", "Section", "");
+            XmlNode sectionNode = XmlDocument.CreateNode("element", "Section", "");
+            AddIndexAttribute(sectionNode, $"{section.Type}");
             parentNode.AppendChild(sectionNode);
             Serialize(section, sectionNode);
 
@@ -98,7 +110,7 @@ namespace R2RDump
 
         internal override void DumpAllMethods()
         {
-            XmlNode methodsNode = _xmlDocument.CreateNode("element", "Methods", "");
+            XmlNode methodsNode = XmlDocument.CreateNode("element", "Methods", "");
             _rootNode.AppendChild(methodsNode);
             AddXMLNode("Count", _r2r.R2RMethods.Count.ToString(), methodsNode);
             foreach (R2RMethod method in _r2r.R2RMethods)
@@ -112,13 +124,14 @@ namespace R2RDump
         /// </summary>
         internal override void DumpMethod(R2RMethod method, XmlNode parentNode)
         {
-            XmlNode methodNode = _xmlDocument.CreateNode("element", "Method", "");
+            XmlNode methodNode = XmlDocument.CreateNode("element", "Method", "");
+            AddIndexAttribute(methodNode, $"{method.Rid}");
             parentNode.AppendChild(methodNode);
             Serialize(method, methodNode);
 
-            if (_gc)
+            if (_gc && method.GcInfo != null)
             {
-                XmlNode gcNode = _xmlDocument.CreateNode("element", "GcInfo", "");
+                XmlNode gcNode = XmlDocument.CreateNode("element", "GcInfo", "");
                 methodNode.AppendChild(gcNode);
                 Serialize(method.GcInfo, gcNode);
 
@@ -134,7 +147,7 @@ namespace R2RDump
             }
 
             XmlNode rtfsNode = null;
-            rtfsNode = _xmlDocument.CreateNode("element", "RuntimeFunctions", "");
+            rtfsNode = XmlDocument.CreateNode("element", "RuntimeFunctions", "");
             methodNode.AppendChild(rtfsNode);
 
             foreach (RuntimeFunction runtimeFunction in method.RuntimeFunctions)
@@ -148,7 +161,7 @@ namespace R2RDump
         /// </summary>
         internal override void DumpRuntimeFunction(RuntimeFunction rtf, XmlNode parentNode)
         {
-            XmlNode rtfNode = _xmlDocument.CreateNode("element", "RuntimeFunction", "");
+            XmlNode rtfNode = XmlDocument.CreateNode("element", "RuntimeFunction", "");
             parentNode.AppendChild(rtfNode);
             AddXMLNode("MethodRid", rtf.Method.Rid.ToString(), rtfNode);
             Serialize(rtf, rtfNode);
@@ -162,10 +175,10 @@ namespace R2RDump
             {
                 DumpBytes(rtf.StartAddress, (uint)rtf.Size, rtfNode);
             }
-            if (_unwind)
+            if (_unwind && rtf.UnwindInfo != null)
             {
                 XmlNode unwindNode = null;
-                unwindNode = _xmlDocument.CreateNode("element", "UnwindInfo", "");
+                unwindNode = XmlDocument.CreateNode("element", "UnwindInfo", "");
                 rtfNode.AppendChild(unwindNode);
                 Serialize(rtf.UnwindInfo, unwindNode);
 
@@ -187,10 +200,10 @@ namespace R2RDump
                 string instr;
                 int instrSize = CoreDisTools.GetInstruction(Disasm, rtf, imageOffset, rtfOffset, image, out instr);
 
-                AddXMLNode("offset"+codeOffset, instr, parentNode);
+                AddXMLNode("offset"+codeOffset, instr, parentNode, $"{codeOffset}");
                 if (transitions.ContainsKey(codeOffset))
                 {
-                    AddXMLNode("Transition", transitions[codeOffset].GetSlotState(slotTable), parentNode);
+                    AddXMLNode("Transition", transitions[codeOffset].GetSlotState(slotTable), parentNode, $"{codeOffset}");
                 }
 
                 CoreDisTools.ClearOutputBuffer();
@@ -220,23 +233,23 @@ namespace R2RDump
                 {
                     sb.Append($" {_r2r.Image[start + i]:X2}");
                 }
-                AddXMLNode(name, sb.ToString(), parentNode);
+                AddXMLNode(name, sb.ToString(), parentNode, $"{start}");
                 return;
             }
         }
 
         internal override void DumpSectionContents(R2RSection section, XmlNode parentNode)
         {
-            XmlNode contentsNode = _xmlDocument.CreateNode("element", "Contents", "");
+            XmlNode contentsNode = XmlDocument.CreateNode("element", "Contents", "");
             parentNode.AppendChild(contentsNode);
 
             switch (section.Type)
             {
                 case R2RSection.SectionType.READYTORUN_SECTION_AVAILABLE_TYPES:
-
+                    int availableTypesId = 0;
                     foreach (string name in _r2r.AvailableTypes)
                     {
-                        AddXMLNode("AvailableType", name, contentsNode);
+                        AddXMLNode("AvailableType", name, contentsNode, $"{availableTypesId++}");
                     }
                     break;
                 case R2RSection.SectionType.READYTORUN_SECTION_RUNTIME_FUNCTIONS:
@@ -246,7 +259,7 @@ namespace R2RDump
                     while (rtfOffset < rtfEndOffset)
                     {
                         uint rva = NativeReader.ReadUInt32(_r2r.Image, ref rtfOffset);
-                        AddXMLNode($"id{rtfIndex}", $"0x{rva:X8}", contentsNode);
+                        AddXMLNode($"id{rtfIndex}", $"0x{rva:X8}", contentsNode, $"{rtfIndex}");
                         rtfIndex++;
                     }
                     break;
@@ -283,7 +296,7 @@ namespace R2RDump
 
         internal override XmlNode DumpQueryCount(string q, string title, int count)
         {
-            XmlNode queryNode = _xmlDocument.CreateNode("element", title, "");
+            XmlNode queryNode = XmlDocument.CreateNode("element", title, "");
             _rootNode.AppendChild(queryNode);
             AddXMLNode("Query", q, queryNode);
             AddXMLNode("Count", count.ToString(), queryNode);
@@ -300,12 +313,23 @@ namespace R2RDump
             }
         }
 
-        private XmlNode AddXMLNode(String name, String contents, XmlNode parentNode)
+        private XmlNode AddXMLNode(String name, String contents, XmlNode parentNode, string index = "")
         {
-            XmlNode node = _xmlDocument.CreateNode("element", name, "");
+            XmlNode node = XmlDocument.CreateNode("element", name, "");
+            if (!index.Equals(""))
+            {
+                AddIndexAttribute(node, index);
+            }
             parentNode.AppendChild(node);
             node.InnerText = contents;
             return node;
         }
+
+        private void AddIndexAttribute(XmlNode node, string index)
+        {
+            XmlAttribute attr = XmlDocument.CreateAttribute("Index");
+            attr.Value = index;
+            node.Attributes.SetNamedItem(attr);
+        }
     }
 }
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/BasicTests.cs b/src/coreclr/tests/src/readytorun/r2rdump/BasicTests.cs
new file mode 100644 (file)
index 0000000..2acdeee
--- /dev/null
@@ -0,0 +1,24 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+
+namespace R2RDumpTest
+{
+    public class BasicTests
+    {
+               static int Main(string[] args)
+               {
+                       Console.WriteLine("Starting the test");
+
+                       TestHelpers.RunTest("HelloWorld");
+                       TestHelpers.RunTest("MultipleRuntimeFunctions");
+                       TestHelpers.RunTest("GenericFunctions");
+                       TestHelpers.RunTest("GcInfoTransitions");
+                       
+                       Console.WriteLine("PASSED");
+                       return 100;
+               }
+    }
+}
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj b/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj
new file mode 100644 (file)
index 0000000..d885ff8
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <AssemblyName>R2RDumpTest</AssemblyName>
+    <SchemaVersion>2.0</SchemaVersion>
+    <OutputType>Exe</OutputType>
+    <CLSCompliant>false</CLSCompliant>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <CoreClrDir>..\..\..\..\..\..\</CoreClrDir>
+    <R2RDumpCommand>$(CoreClrDir)bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\netcoreapp2.0\R2RDump.dll</R2RDumpCommand>
+    <DotnetToolCommand>$(CoreClrDir)Tools\dotnetcli\dotnet</DotnetToolCommand>
+       <BashCoreClrDir>../../../../../../</BashCoreClrDir>
+    <BashR2RDumpCommand>$(BashCoreClrDir)bin/Product/$(BuildOS).$(BuildArch).$(BuildType)/netcoreapp2.0/R2RDump.dll</BashR2RDumpCommand>
+    <BashDotnetToolCommand>$(BashCoreClrDir)Tools/dotnetcli/dotnet</BashDotnetToolCommand>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Compile Include="BasicTests.cs" />
+    <Compile Include="TestHelpers.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="files\HelloWorld.csproj" />
+    <ProjectReference Include="files\MultipleRuntimeFunctions.csproj" />
+    <ProjectReference Include="files\GenericFunctions.csproj" />
+    <ProjectReference Include="files\GcInfoTransitions.csproj" />
+  </ItemGroup>
+
+  <PropertyGroup>
+    <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+COPY /Y $(CoreClrDir)tests\src\readytorun\r2rdump\files\$(BuildOS).$(BuildArch).$(BuildType)\*.xml .
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out HelloWorld.ni.dll HelloWorld.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out GcInfoTransitions.ni.dll GcInfoTransitions.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out GenericFunctions.ni.dll GenericFunctions.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out MultipleRuntimeFunctions.ni.dll MultipleRuntimeFunctions.dll
+$(DotnetToolCommand) $(R2RDumpCommand) --in HelloWorld.ni.dll --out HelloWorld-test.xml -x -v
+$(DotnetToolCommand) $(R2RDumpCommand) --in GcInfoTransitions.ni.dll --out GcInfoTransitions-test.xml -x -v
+$(DotnetToolCommand) $(R2RDumpCommand) --in GenericFunctions.ni.dll --out GenericFunctions-test.xml -x -v
+$(DotnetToolCommand) $(R2RDumpCommand) --in MultipleRuntimeFunctions.ni.dll --out MultipleRuntimeFunctions-test.xml -x -v
+]]></CLRTestBatchPreCommands>
+  <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+cp $(BashCoreClrDir)tests/src/readytorun/r2rdump/files/$(BuildOS).$(BuildArch).$(BuildType)/*.xml .
+$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out HelloWorld.ni.dll HelloWorld.dll
+$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out GcInfoTransitions.ni.dll GcInfoTransitions.dll
+$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out GenericFunctions.ni.dll GenericFunctions.dll
+$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out MultipleRuntimeFunctions.ni.dll MultipleRuntimeFunctions.dll
+$(BashDotnetToolCommand) $(BashR2RDumpCommand) --in HelloWorld.ni.dll --out HelloWorld-test.xml -x -v
+$(BashDotnetToolCommand) $(BashR2RDumpCommand) --in GcInfoTransitions.ni.dll --out GcInfoTransitions-test.xml -x -v
+$(BashDotnetToolCommand) $(BashR2RDumpCommand) --in GenericFunctions.ni.dll --out GenericFunctions-test.xml -x -v
+$(BashDotnetToolCommand) $(BashR2RDumpCommand) --in MultipleRuntimeFunctions.ni.dll --out MultipleRuntimeFunctions-test.xml -x -v
+]]></BashCLRTestPreCommands>
+  </PropertyGroup>
+
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/TestHelpers.cs b/src/coreclr/tests/src/readytorun/r2rdump/TestHelpers.cs
new file mode 100644 (file)
index 0000000..8e89f8d
--- /dev/null
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Xml;
+using Xunit.Abstractions;
+using System.Text;
+using Xunit;
+
+namespace R2RDumpTest
+{
+    class TestHelpers
+    {
+        public static void RunTest(string name)
+        {
+            List<XmlNode> testXmlNodes = ReadXmlNodes($"{name}-test.xml", true).Cast<XmlNode>().ToList();
+            List<XmlNode> expectedXmlNodes = ReadXmlNodes($"{name}.xml", true).Cast<XmlNode>().ToList();
+            bool identical = XmlDiff(testXmlNodes, expectedXmlNodes);
+            Assert.True(identical);
+        }
+
+        public static bool XmlDiff(List<XmlNode> testXmlNodes, List<XmlNode> expectedXmlNodes)
+        {
+            testXmlNodes.RemoveAll(node => !IsLeaf(node));
+            expectedXmlNodes.RemoveAll(node => !IsLeaf(node));
+
+            Dictionary<string, XmlNode> allTest = testXmlNodes.ToDictionary(node => XmlNodeFullName(node));
+            Dictionary<string, XmlNode> allExpected = expectedXmlNodes.ToDictionary(node => XmlNodeFullName(node));
+            Dictionary<string, XmlNode> diffTest = testXmlNodes.Except(expectedXmlNodes, new XElementEqualityComparer()).ToDictionary(node => XmlNodeFullName(node));
+            Dictionary<string, XmlNode> diffExpected = expectedXmlNodes.Except(testXmlNodes, new XElementEqualityComparer()).ToDictionary(node => XmlNodeFullName(node));
+
+            foreach (KeyValuePair<string, XmlNode> diff in diffExpected)
+            {
+                XmlNode expectedNode = diff.Value;
+                Console.WriteLine("Expected:");
+                Console.WriteLine("\t" + XmlNodeFullName(expectedNode) + ": " + expectedNode.InnerText);
+                if (allTest.ContainsKey(diff.Key))
+                {
+                    XmlNode testNode = allTest[diff.Key];
+                    Console.WriteLine("Test:");
+                    Console.WriteLine("\t" + XmlNodeFullName(testNode) + ": " + testNode.InnerText);
+                }
+                else
+                {
+                    Console.WriteLine("Test:");
+                    Console.WriteLine("\tnone");
+                }
+                Console.WriteLine("");
+            }
+            foreach (KeyValuePair<string, XmlNode> diff in diffTest)
+            {
+                if (!allExpected.ContainsKey(diff.Key))
+                {
+                    Console.WriteLine("Expected:");
+                    Console.WriteLine("\tnone");
+                    Console.WriteLine("Test:");
+                    Console.WriteLine("\t" + XmlNodeFullName(diff.Value) + ": " + diff.Value.InnerText);
+                }
+                Console.WriteLine("");
+            }
+
+            return diffExpected.Count == 0 && diffTest.Count == 0;
+        }
+
+        private class XElementEqualityComparer : IEqualityComparer<XmlNode>
+        {
+            public bool Equals(XmlNode x, XmlNode y)
+            {
+                return XmlNodeFullName(x).Equals(XmlNodeFullName(y)) && x.InnerText.Equals(y.InnerText);
+            }
+            public int GetHashCode(XmlNode obj)
+            {
+                return 0;
+            }
+        }
+
+        private static bool IsLeaf(XmlNode node)
+        {
+            return !node.HasChildNodes || node.FirstChild.NodeType == XmlNodeType.Text;
+        }
+
+        private static string XmlNodeFullName(XmlNode node)
+        {
+            string fullName = "";
+            XmlNode n = node;
+            while (node != null && node.NodeType != XmlNodeType.Document)
+            {
+                string index = "";
+                XmlAttribute indexAttribute = node.Attributes["Index"];
+                if (indexAttribute != null) {
+                    index = indexAttribute.Value;
+                }
+                fullName = node.Name + index + "." + fullName;
+                node = node.ParentNode;
+            }
+            return fullName;
+        }
+
+        public static XmlNodeList ReadXmlNodes(string filenameOrXmlString, bool fromFile)
+        {
+            XmlDocument expectedXml = new XmlDocument();
+            if (fromFile)
+            {
+                expectedXml.Load(filenameOrXmlString);
+            }
+            else
+            {
+                expectedXml.LoadXml(filenameOrXmlString);
+            }
+            return expectedXml.SelectNodes("//*");
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.cs b/src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.cs
new file mode 100644 (file)
index 0000000..8fb283b
--- /dev/null
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace GcInfoTransitions
+{
+    class GcInfoTransitions
+    {
+        static void abc(string a)
+        {
+
+        }
+
+        static void Main(string[] args)
+        {
+            abc(new string('1',1));
+            abc(new string('2', 1));
+            abc(new string('3', 1));
+            abc(new string('4', 1));
+            abc(new string('5', 1));
+            abc(new string('6', 1));
+            abc(new string('7', 1));
+            abc(new string('8', 1));
+        }
+    }
+}
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.csproj b/src/coreclr/tests/src/readytorun/r2rdump/files/GcInfoTransitions.csproj
new file mode 100644 (file)
index 0000000..8aaa695
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <OutputType>library</OutputType>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
+    <CLRTestKind>SharedLibrary</CLRTestKind>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="GcInfoTransitions.cs" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.cs b/src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.cs
new file mode 100644 (file)
index 0000000..52679bb
--- /dev/null
@@ -0,0 +1,43 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace GenericFunctions
+{
+    struct UserDefinedStruct
+    {
+        int n;
+        public UserDefinedStruct(int num)
+        {
+            n = num;
+        }
+    }
+
+    class UserDefinedClass
+    {
+        int n;
+        public UserDefinedClass(int num)
+        {
+            n = num;
+        }
+    }
+
+    class GenericFunctions
+    {
+        static T GenericFunction<S, T>(T t, S s)
+        {
+            return t;
+        }
+
+        static void Main(string[] args)
+        {
+            string str = "hello";
+            UserDefinedStruct userDefinedStruct = new UserDefinedStruct(2);
+            GenericFunction(userDefinedStruct, str);
+
+            int integer = 1;
+            UserDefinedClass userDefinedClass = new UserDefinedClass(2);
+            GenericFunction(integer, userDefinedClass);
+        }
+    }
+}
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.csproj b/src/coreclr/tests/src/readytorun/r2rdump/files/GenericFunctions.csproj
new file mode 100644 (file)
index 0000000..34f8d12
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <OutputType>library</OutputType>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
+    <CLRTestKind>SharedLibrary</CLRTestKind>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="GenericFunctions.cs" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs b/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.cs
new file mode 100644 (file)
index 0000000..5f02049
--- /dev/null
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+
+namespace HelloWorld
+{
+    class HelloWorld
+    {
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Hello World!");
+        }
+    }
+}
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.csproj b/src/coreclr/tests/src/readytorun/r2rdump/files/HelloWorld.csproj
new file mode 100644 (file)
index 0000000..9659cad
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <OutputType>library</OutputType>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
+    <CLRTestKind>SharedLibrary</CLRTestKind>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="HelloWorld.cs" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.cs b/src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.cs
new file mode 100644 (file)
index 0000000..a0ec5bf
--- /dev/null
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace MultipleRuntimeFunctions
+{
+    class MultipleRuntimeFunctions
+    {
+        static void Main(string[] args)
+        {
+            try
+            {
+
+            }
+            finally
+            {
+
+            }
+        }
+    }
+}
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.csproj b/src/coreclr/tests/src/readytorun/r2rdump/files/MultipleRuntimeFunctions.csproj
new file mode 100644 (file)
index 0000000..42d3ce5
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <SchemaVersion>2.0</SchemaVersion>
+    <OutputType>library</OutputType>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+    <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
+    <CLRTestKind>SharedLibrary</CLRTestKind>
+  </PropertyGroup>
+  <!-- Default configurations to help VS understand the configurations -->
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="MultipleRuntimeFunctions.cs" />
+  </ItemGroup>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GcInfoTransitions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GcInfoTransitions.xml
new file mode 100644 (file)
index 0000000..b9d550b
--- /dev/null
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GcInfoTransitions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>Amd64</Machine>
+    <ImageBase>6891812028416</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9108</RelativeVirtualAddress>
+        <Size>40</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>24</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9288">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEagPAaCP8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9288">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEagPAaCP8=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4120">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>8</EntrySize>
+          <SignatureRVA>9360</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10536">
+              <StartOffset>0</StartOffset>
+              <Section>6891812037717</Section>
+              <SignatureSample>FQQAAAAAAAA=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10528</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3360</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10536">
+          <StartOffset>0</StartOffset>
+          <Section>6891812037717</Section>
+          <SignatureSample>FQQAAAAAAAA=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>9320</RelativeVirtualAddress>
+        <Size>36</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002810</id0>
+        <id1 Index="1">0x00002816</id1>
+        <id2 Index="2">0x000028FC</id2>
+        <id3 Index="3">0x00002820</id3>
+        <id4 Index="4">0x000028C3</id4>
+        <id5 Index="5">0x00002908</id5>
+        <id6 Index="6">0x000028D0</id6>
+        <id7 Index="7">0x000028D6</id7>
+        <id8 Index="8">0x000028FC</id8>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10456</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10544</RelativeVirtualAddress>
+        <Size>63</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9301</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10480</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GcInfoTransitions.GcInfoTransitions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10466</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10608</RelativeVirtualAddress>
+        <Size>22</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>3</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>abc</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.abc(String)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3332</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10256</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10492</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9295</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>Main</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>163</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>8</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets>
+            <SafePointOffset Index="0">
+              <Value>23</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="1">
+              <Value>42</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="2">
+              <Value>61</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="3">
+              <Value>80</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="4">
+              <Value>99</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="5">
+              <Value>118</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="6">
+              <Value>137</Value>
+            </SafePointOffset>
+            <SafePointOffset Index="7">
+              <Value>156</Value>
+            </SafePointOffset>
+          </SafePointOffsets>
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>153</Size>
+          <Offset>3348</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10272</StartAddress>
+            <Size>163</Size>
+            <UnwindRVA>10504</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>4</SizeOfProlog>
+              <CountOfUnwindCodes>1</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode>
+                <UnwindCode Index="0">
+                  <CodeOffset>4</CodeOffset>
+                  <UnwindOp>UWOP_ALLOC_SMALL</UnwindOp>
+                  <OpInfo>4</OpInfo>
+                  <OffsetLow>4</OffsetLow>
+                  <OffsetHigh>4</OffsetHigh>
+                  <FrameOffset>16900</FrameOffset>
+                </UnwindCode>
+              </UnwindCode>
+              <PersonalityRoutineRVA>609157120</PersonalityRoutineRVA>
+              <Size>12</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>.ctor</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3332</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10448</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10492</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9295</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GenericFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GenericFunctions.xml
new file mode 100644 (file)
index 0000000..9085634
--- /dev/null
@@ -0,0 +1,494 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GenericFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>Amd64</Machine>
+    <ImageBase>6891812028416</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9156</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9096</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>24</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9284</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9296">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEagPAaEP8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9296">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEagPAaEP8=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4120">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>8</EntrySize>
+          <SignatureRVA>9392</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10676">
+              <StartOffset>0</StartOffset>
+              <Section>6891812037725</Section>
+              <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10676">
+          <StartOffset>0</StartOffset>
+          <Section>6891812037725</Section>
+          <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4128">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>10672</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>9328</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x000028E0</id0>
+        <id1 Index="1">0x000028E8</id1>
+        <id2 Index="2">0x00002970</id2>
+        <id3 Index="3">0x000028F0</id3>
+        <id4 Index="4">0x000028F9</id4>
+        <id5 Index="5">0x0000297C</id5>
+        <id6 Index="6">0x00002900</id6>
+        <id7 Index="7">0x00002909</id7>
+        <id8 Index="8">0x00002988</id8>
+        <id9 Index="9">0x00002910</id9>
+        <id10 Index="10">0x0000292F</id10>
+        <id11 Index="11">0x00002994</id11>
+        <id12 Index="12">0x00002930</id12>
+        <id13 Index="13">0x00002936</id13>
+        <id14 Index="14">0x000029A4</id14>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10552</RelativeVirtualAddress>
+        <Size>14</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10688</RelativeVirtualAddress>
+        <Size>87</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10592</RelativeVirtualAddress>
+        <Size>15</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GenericFunctions.GenericFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+        <AvailableType Index="2">GenericFunctions.UserDefinedStruct</AvailableType>
+        <AvailableType Index="3">GenericFunctions.UserDefinedClass</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10566</RelativeVirtualAddress>
+        <Size>11</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10776</RelativeVirtualAddress>
+        <Size>41</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>5</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedStruct..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedStruct</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>8</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3448</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10464</StartAddress>
+            <Size>8</Size>
+            <UnwindRVA>10608</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9303</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedClass..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedClass</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>9</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3460</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10480</StartAddress>
+            <Size>9</Size>
+            <UnwindRVA>10620</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9303</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="4">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+        <Name>Main</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663300</Token>
+        <EntryPointRuntimeFunctionId>3</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>2</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>31</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>1</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets>
+            <SafePointOffset Index="0">
+              <Value>18</Value>
+            </SafePointOffset>
+          </SafePointOffsets>
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>32</Size>
+          <Offset>3488</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>4</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+            <StartAddress>10512</StartAddress>
+            <Size>31</Size>
+            <UnwindRVA>10644</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>4</SizeOfProlog>
+              <CountOfUnwindCodes>1</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode>
+                <UnwindCode Index="0">
+                  <CodeOffset>4</CodeOffset>
+                  <UnwindOp>UWOP_ALLOC_SMALL</UnwindOp>
+                  <OpInfo>4</OpInfo>
+                  <OffsetLow>4</OffsetLow>
+                  <OffsetHigh>4</OffsetHigh>
+                  <FrameOffset>16900</FrameOffset>
+                </UnwindCode>
+              </UnwindCode>
+              <PersonalityRoutineRVA>609681408</PersonalityRoutineRVA>
+              <Size>12</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="5">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="5">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.GenericFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663301</Token>
+        <EntryPointRuntimeFunctionId>4</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3500</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>5</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+            <StartAddress>10544</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10660</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9303</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>GenericFunction</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.GenericFunction&lt;__Canon, __Canon&gt;(__Canon, __Canon)</SignatureString>
+        <IsGeneric>true</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>9</CodeLength>
+          <ReturnKind>RT_Object</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3472</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10496</StartAddress>
+            <Size>9</Size>
+            <UnwindRVA>10632</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9303</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/HelloWorld.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/HelloWorld.xml
new file mode 100644 (file)
index 0000000..a5f7d4d
--- /dev/null
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>HelloWorld.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>Amd64</Machine>
+    <ImageBase>6891812028416</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8952</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9136</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9076</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>24</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9264</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9276">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEagPAaCP8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9276">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEagPAaCP8=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4128">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STRING_HANDLE</Type>
+          <EntrySize>8</EntrySize>
+          <SignatureRVA>10256</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4120">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>8</EntrySize>
+          <SignatureRVA>9336</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10262">
+              <StartOffset>0</StartOffset>
+              <Section>6891812037705</Section>
+              <SignatureSample>FQQQAQICAn4=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10248</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3080</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10262">
+          <StartOffset>0</StartOffset>
+          <Section>6891812037705</Section>
+          <SignatureSample>FQQQAQICAn4=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>9308</RelativeVirtualAddress>
+        <Size>24</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x000027A0</id0>
+        <id1 Index="1">0x000027BB</id1>
+        <id2 Index="2">0x000027EC</id2>
+        <id3 Index="3">0x000027C0</id3>
+        <id4 Index="4">0x000027C6</id4>
+        <id5 Index="5">0x000027FC</id5>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10184</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10264</RelativeVirtualAddress>
+        <Size>31</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9289</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10208</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">HelloWorld.HelloWorld</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10194</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10296</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>HelloWorld.HelloWorld.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>1</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>27</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>1</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets>
+            <SafePointOffset Index="0">
+              <Value>20</Value>
+            </SafePointOffset>
+          </SafePointOffsets>
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>32</Size>
+          <Offset>3064</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10144</StartAddress>
+            <Size>27</Size>
+            <UnwindRVA>10220</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>4</SizeOfProlog>
+              <CountOfUnwindCodes>1</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode>
+                <UnwindCode Index="0">
+                  <CodeOffset>4</CodeOffset>
+                  <UnwindOp>UWOP_ALLOC_SMALL</UnwindOp>
+                  <OpInfo>4</OpInfo>
+                  <OffsetLow>4</OffsetLow>
+                  <OffsetHigh>4</OffsetHigh>
+                  <FrameOffset>16900</FrameOffset>
+                </UnwindCode>
+              </UnwindCode>
+              <PersonalityRoutineRVA>608370688</PersonalityRoutineRVA>
+              <Size>12</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>HelloWorld.HelloWorld..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>3076</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10176</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10236</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9283</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/MultipleRuntimeFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/MultipleRuntimeFunctions.xml
new file mode 100644 (file)
index 0000000..2161efe
--- /dev/null
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>MultipleRuntimeFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>Amd64</Machine>
+    <ImageBase>6891812028416</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>9016</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9128</RelativeVirtualAddress>
+        <Size>20</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>16</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9284">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEagPD/Jbk=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9284">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEagPD/Jbk=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>9296</RelativeVirtualAddress>
+        <Size>24</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002750</id0>
+        <id1 Index="1">0x00002756</id1>
+        <id2 Index="2">0x0000278C</id2>
+        <id3 Index="3">0x00002760</id3>
+        <id4 Index="4">0x00002766</id4>
+        <id5 Index="5">0x0000278C</id5>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10088</RelativeVirtualAddress>
+        <Size>8</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10136</RelativeVirtualAddress>
+        <Size>27</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10112</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">MultipleRuntimeFunctions.MultipleRuntimeFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10096</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10164</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>2964</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10064</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10124</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9289</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <GcInfo>
+        <GcInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+          <Version>2</Version>
+          <CodeLength>6</CodeLength>
+          <ReturnKind>RT_Scalar</ReturnKind>
+          <ValidRangeStart>0</ValidRangeStart>
+          <ValidRangeEnd>0</ValidRangeEnd>
+          <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+          <GSCookieStackSlot>-1</GSCookieStackSlot>
+          <PSPSymStackSlot>-1</PSPSymStackSlot>
+          <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+          <StackBaseRegister>4294967295</StackBaseRegister>
+          <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+          <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+          <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+          <NumSafePoints>0</NumSafePoints>
+          <NumInterruptibleRanges>0</NumInterruptibleRanges>
+          <SafePointOffsets />
+          <InterruptibleRanges />
+          <SlotTable>
+            <NumRegisters>0</NumRegisters>
+            <NumStackSlots>0</NumStackSlots>
+            <NumUntracked>0</NumUntracked>
+            <NumSlots>0</NumSlots>
+            <GcSlots />
+          </SlotTable>
+          <Size>22</Size>
+          <Offset>2964</Offset>
+        </GcInfo>
+      </GcInfo>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10080</StartAddress>
+            <Size>6</Size>
+            <UnwindRVA>10124</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+          <UnwindInfo>
+            <UnwindInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+              <Version>1</Version>
+              <Flags>3</Flags>
+              <SizeOfProlog>0</SizeOfProlog>
+              <CountOfUnwindCodes>0</CountOfUnwindCodes>
+              <FrameRegister>EAX</FrameRegister>
+              <FrameOffset>0</FrameOffset>
+              <UnwindCode />
+              <PersonalityRoutineRVA>9289</PersonalityRoutineRVA>
+              <Size>8</Size>
+            </UnwindInfo>
+          </UnwindInfo>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GcInfoTransitions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GcInfoTransitions.xml
new file mode 100644 (file)
index 0000000..a9ede31
--- /dev/null
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GcInfoTransitions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9108</RelativeVirtualAddress>
+        <Size>40</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9284">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaCDPAagE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9284">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaCDPAagE=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9304</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10432">
+              <StartOffset>0</StartOffset>
+              <Section>268510280</Section>
+              <SignatureSample>FQQAAP////8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10412</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3244</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10432">
+          <StartOffset>0</StartOffset>
+          <Section>268510280</Section>
+          <SignatureSample>FQQAAP////8=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10344</RelativeVirtualAddress>
+        <Size>24</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x000027D8</id0>
+        <id1 Index="1">0x000028B4</id1>
+        <id2 Index="2">0x000027E0</id2>
+        <id3 Index="3">0x000028B8</id3>
+        <id4 Index="4">0x00002860</id4>
+        <id5 Index="5">0x000028B4</id5>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10372</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10440</RelativeVirtualAddress>
+        <Size>63</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9288</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10400</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GcInfoTransitions.GcInfoTransitions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10382</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10504</RelativeVirtualAddress>
+        <Size>22</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>3</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>abc</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.abc(String)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10200</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10420</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>Main</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10208</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10424</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>.ctor</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10336</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10420</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GenericFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GenericFunctions.xml
new file mode 100644 (file)
index 0000000..4e37c5b
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GenericFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9156</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9096</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9284</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9292">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaEDPAagE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9292">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaEDPAagE=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9312</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10556">
+              <StartOffset>0</StartOffset>
+              <Section>268510288</Section>
+              <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10556">
+          <StartOffset>0</StartOffset>
+          <Section>268510288</Section>
+          <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4108">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>10552</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10440</RelativeVirtualAddress>
+        <Size>40</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x0000288C</id0>
+        <id1 Index="1">0x00002920</id1>
+        <id2 Index="2">0x00002894</id2>
+        <id3 Index="3">0x00002924</id3>
+        <id4 Index="4">0x000028A0</id4>
+        <id5 Index="5">0x00002928</id5>
+        <id6 Index="6">0x000028AC</id6>
+        <id7 Index="7">0x0000292E</id7>
+        <id8 Index="8">0x000028C0</id8>
+        <id9 Index="9">0x00002932</id9>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10484</RelativeVirtualAddress>
+        <Size>14</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10568</RelativeVirtualAddress>
+        <Size>84</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10512</RelativeVirtualAddress>
+        <Size>15</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GenericFunctions.GenericFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+        <AvailableType Index="2">GenericFunctions.UserDefinedStruct</AvailableType>
+        <AvailableType Index="3">GenericFunctions.UserDefinedClass</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10498</RelativeVirtualAddress>
+        <Size>11</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10652</RelativeVirtualAddress>
+        <Size>41</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>5</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedStruct..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedStruct</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10380</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10528</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedClass..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedClass</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10388</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10532</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="4">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+        <Name>Main</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663300</Token>
+        <EntryPointRuntimeFunctionId>3</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>2</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>4</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+            <StartAddress>10412</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10542</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="5">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="5">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.GenericFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663301</Token>
+        <EntryPointRuntimeFunctionId>4</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>5</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+            <StartAddress>10432</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10546</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>GenericFunction</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.GenericFunction&lt;__Canon, __Canon&gt;(__Canon, __Canon)</SignatureString>
+        <IsGeneric>true</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10400</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10536</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/HelloWorld.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/HelloWorld.xml
new file mode 100644 (file)
index 0000000..2f9bbef
--- /dev/null
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>HelloWorld.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8952</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9136</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9076</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9264</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9272">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaCDPAagI=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9272">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaCDPAagI=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4108">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STRING_HANDLE</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>10188</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9292</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10194">
+              <StartOffset>0</StartOffset>
+              <Section>268510268</Section>
+              <SignatureSample>FQT/////EAE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10172</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3004</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10194">
+          <StartOffset>0</StartOffset>
+          <Section>268510268</Section>
+          <SignatureSample>FQT/////EAE=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10124</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002770</id0>
+        <id1 Index="1">0x000027C4</id1>
+        <id2 Index="2">0x00002784</id2>
+        <id3 Index="3">0x000027C8</id3>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10144</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10200</RelativeVirtualAddress>
+        <Size>31</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9276</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10160</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">HelloWorld.HelloWorld</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10154</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10232</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>HelloWorld.HelloWorld.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>1</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10096</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10180</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>HelloWorld.HelloWorld..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10116</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10184</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/MultipleRuntimeFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/MultipleRuntimeFunctions.xml
new file mode 100644 (file)
index 0000000..64ae247
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>MultipleRuntimeFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>9016</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9128</RelativeVirtualAddress>
+        <Size>20</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9280">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEAAP////8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9280">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEAAP////8=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10032</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002720</id0>
+        <id1 Index="1">0x0000275C</id1>
+        <id2 Index="2">0x00002728</id2>
+        <id3 Index="3">0x0000275C</id3>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10052</RelativeVirtualAddress>
+        <Size>8</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10084</RelativeVirtualAddress>
+        <Size>27</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10064</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">MultipleRuntimeFunctions.MultipleRuntimeFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10060</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10112</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10016</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10076</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10024</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10076</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GcInfoTransitions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GcInfoTransitions.xml
new file mode 100644 (file)
index 0000000..a9ede31
--- /dev/null
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GcInfoTransitions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9108</RelativeVirtualAddress>
+        <Size>40</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9284">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaCDPAagE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9284">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaCDPAagE=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9304</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10432">
+              <StartOffset>0</StartOffset>
+              <Section>268510280</Section>
+              <SignatureSample>FQQAAP////8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10412</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3244</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10432">
+          <StartOffset>0</StartOffset>
+          <Section>268510280</Section>
+          <SignatureSample>FQQAAP////8=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10344</RelativeVirtualAddress>
+        <Size>24</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x000027D8</id0>
+        <id1 Index="1">0x000028B4</id1>
+        <id2 Index="2">0x000027E0</id2>
+        <id3 Index="3">0x000028B8</id3>
+        <id4 Index="4">0x00002860</id4>
+        <id5 Index="5">0x000028B4</id5>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10372</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10440</RelativeVirtualAddress>
+        <Size>63</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9288</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10400</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GcInfoTransitions.GcInfoTransitions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10382</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10504</RelativeVirtualAddress>
+        <Size>22</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>3</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>abc</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.abc(String)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10200</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10420</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>Main</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10208</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10424</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>.ctor</Name>
+        <SignatureString>GcInfoTransitions.GcInfoTransitions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GcInfoTransitions.GcInfoTransitions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10336</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10420</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GenericFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GenericFunctions.xml
new file mode 100644 (file)
index 0000000..4e37c5b
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>GenericFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8984</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9156</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9096</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9284</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9292">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaEDPAagE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9292">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaEDPAagE=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9312</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10556">
+              <StartOffset>0</StartOffset>
+              <Section>268510288</Section>
+              <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10556">
+          <StartOffset>0</StartOffset>
+          <Section>268510288</Section>
+          <SignatureSample>HBIMEBEIAAA=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4108">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>10552</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10440</RelativeVirtualAddress>
+        <Size>40</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x0000288C</id0>
+        <id1 Index="1">0x00002920</id1>
+        <id2 Index="2">0x00002894</id2>
+        <id3 Index="3">0x00002924</id3>
+        <id4 Index="4">0x000028A0</id4>
+        <id5 Index="5">0x00002928</id5>
+        <id6 Index="6">0x000028AC</id6>
+        <id7 Index="7">0x0000292E</id7>
+        <id8 Index="8">0x000028C0</id8>
+        <id9 Index="9">0x00002932</id9>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10484</RelativeVirtualAddress>
+        <Size>14</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10568</RelativeVirtualAddress>
+        <Size>84</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10512</RelativeVirtualAddress>
+        <Size>15</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">GenericFunctions.GenericFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+        <AvailableType Index="2">GenericFunctions.UserDefinedStruct</AvailableType>
+        <AvailableType Index="3">GenericFunctions.UserDefinedClass</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10498</RelativeVirtualAddress>
+        <Size>11</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10652</RelativeVirtualAddress>
+        <Size>41</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>5</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedStruct..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedStruct</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10380</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10528</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.UserDefinedClass..ctor(Int32)</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.UserDefinedClass</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10388</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10532</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="4">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+        <Name>Main</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663300</Token>
+        <EntryPointRuntimeFunctionId>3</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>2</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>4</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+            <StartAddress>10412</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10542</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="5">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="5">
+        <Name>.ctor</Name>
+        <SignatureString>GenericFunctions.GenericFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663301</Token>
+        <EntryPointRuntimeFunctionId>4</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>5</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4">
+            <StartAddress>10432</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10546</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="3">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="3">
+        <Name>GenericFunction</Name>
+        <SignatureString>GenericFunctions.GenericFunctions.GenericFunction&lt;__Canon, __Canon&gt;(__Canon, __Canon)</SignatureString>
+        <IsGeneric>true</IsGeneric>
+        <DeclaringType>GenericFunctions.GenericFunctions</DeclaringType>
+        <Token>100663299</Token>
+        <EntryPointRuntimeFunctionId>2</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>3</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+            <StartAddress>10400</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10536</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/HelloWorld.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/HelloWorld.xml
new file mode 100644 (file)
index 0000000..2f9bbef
--- /dev/null
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>HelloWorld.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>8952</RelativeVirtualAddress>
+      <Size>124</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>9</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9136</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9076</RelativeVirtualAddress>
+        <Size>60</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>8</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9264</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9272">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEaCDPAagI=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9272">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEaCDPAagI=</SignatureSample>
+        </ImportSectionEntry>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4108">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_UNKNOWN</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STRING_HANDLE</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>10188</SignatureRVA>
+          <Entries />
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4104">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_PCODE</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_STUB_DISPATCH</Type>
+          <EntrySize>4</EntrySize>
+          <SignatureRVA>9292</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="10194">
+              <StartOffset>0</StartOffset>
+              <Section>268510268</Section>
+              <SignatureSample>FQT/////EAE=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>10172</AuxiliaryDataRVA>
+          <AuxiliaryData>
+            <Version>2</Version>
+            <CodeLength>0</CodeLength>
+            <ReturnKind>RT_Object</ReturnKind>
+            <ValidRangeStart>0</ValidRangeStart>
+            <ValidRangeEnd>0</ValidRangeEnd>
+            <SecurityObjectStackSlot>-1</SecurityObjectStackSlot>
+            <GSCookieStackSlot>-1</GSCookieStackSlot>
+            <PSPSymStackSlot>-1</PSPSymStackSlot>
+            <GenericsInstContextStackSlot>-1</GenericsInstContextStackSlot>
+            <StackBaseRegister>4294967295</StackBaseRegister>
+            <SizeOfEditAndContinuePreservedArea>4294967295</SizeOfEditAndContinuePreservedArea>
+            <ReversePInvokeFrameStackSlot>-1</ReversePInvokeFrameStackSlot>
+            <SizeOfStackOutgoingAndScratchArea>0</SizeOfStackOutgoingAndScratchArea>
+            <NumSafePoints>0</NumSafePoints>
+            <NumInterruptibleRanges>0</NumInterruptibleRanges>
+            <SafePointOffsets />
+            <InterruptibleRanges />
+            <SlotTable>
+              <NumRegisters>0</NumRegisters>
+              <NumStackSlots>0</NumStackSlots>
+              <NumUntracked>0</NumUntracked>
+              <NumSlots>0</NumSlots>
+              <GcSlots />
+            </SlotTable>
+            <Size>22</Size>
+            <Offset>3004</Offset>
+          </AuxiliaryData>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="10194">
+          <StartOffset>0</StartOffset>
+          <Section>268510268</Section>
+          <SignatureSample>FQT/////EAE=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10124</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002770</id0>
+        <id1 Index="1">0x000027C4</id1>
+        <id2 Index="2">0x00002784</id2>
+        <id3 Index="3">0x000027C8</id3>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10144</RelativeVirtualAddress>
+        <Size>10</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10200</RelativeVirtualAddress>
+        <Size>31</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DELAYLOAD_METHODCALL_THUNKS">
+        <RelativeVirtualAddress>9276</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10160</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">HelloWorld.HelloWorld</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10154</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10232</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>HelloWorld.HelloWorld.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+        <Fixups>
+          <FixupCell>
+            <TableIndex>1</TableIndex>
+            <CellOffset>0</CellOffset>
+          </FixupCell>
+        </Fixups>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10096</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10180</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>HelloWorld.HelloWorld..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>HelloWorld.HelloWorld</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10116</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10184</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
diff --git a/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/MultipleRuntimeFunctions.xml b/src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/MultipleRuntimeFunctions.xml
new file mode 100644 (file)
index 0000000..64ae247
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<R2RDump>
+  <R2RReader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <Filename>MultipleRuntimeFunctions.ni.dll</Filename>
+    <IsR2R>true</IsR2R>
+    <Machine>I386</Machine>
+    <ImageBase>268500992</ImageBase>
+  </R2RReader>
+  <Header>
+    <R2RHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <RelativeVirtualAddress>9016</RelativeVirtualAddress>
+      <Size>112</Size>
+      <SignatureString>RTR</SignatureString>
+      <Signature>5395538</Signature>
+      <MajorVersion>2</MajorVersion>
+      <MinorVersion>2</MinorVersion>
+      <Flags>3</Flags>
+    </R2RHeader>
+  </Header>
+  <Sections>
+    <Count>8</Count>
+    <Section Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_COMPILER_IDENTIFIER">
+        <RelativeVirtualAddress>9148</RelativeVirtualAddress>
+        <Size>37</Size>
+      </R2RSection>
+      <Contents>
+        <CompilerIdentifier>CoreCLR 4.5.30319.0 __BUILDMACHINE__</CompilerIdentifier>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_IMPORT_SECTIONS">
+        <RelativeVirtualAddress>9128</RelativeVirtualAddress>
+        <Size>20</Size>
+      </R2RSection>
+      <Contents>
+        <R2RImportSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="4096">
+          <SectionSize>4</SectionSize>
+          <Flags>CORCOMPILE_IMPORT_FLAGS_EAGER</Flags>
+          <Type>CORCOMPILE_IMPORT_TYPE_UNKNOWN</Type>
+          <EntrySize>0</EntrySize>
+          <SignatureRVA>9276</SignatureRVA>
+          <Entries>
+            <ImportSectionEntry Index="9280">
+              <StartOffset>0</StartOffset>
+              <Section>0</Section>
+              <SignatureSample>GgEAAP////8=</SignatureSample>
+            </ImportSectionEntry>
+          </Entries>
+          <AuxiliaryDataRVA>0</AuxiliaryDataRVA>
+        </R2RImportSection>
+        <ImportSectionEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="9280">
+          <StartOffset>0</StartOffset>
+          <Section>0</Section>
+          <SignatureSample>GgEAAP////8=</SignatureSample>
+        </ImportSectionEntry>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_RUNTIME_FUNCTIONS">
+        <RelativeVirtualAddress>10032</RelativeVirtualAddress>
+        <Size>16</Size>
+      </R2RSection>
+      <Contents>
+        <id0 Index="0">0x00002720</id0>
+        <id1 Index="1">0x0000275C</id1>
+        <id2 Index="2">0x00002728</id2>
+        <id3 Index="3">0x0000275C</id3>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_METHODDEF_ENTRYPOINTS">
+        <RelativeVirtualAddress>10052</RelativeVirtualAddress>
+        <Size>8</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_DEBUG_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_DEBUG_INFO">
+        <RelativeVirtualAddress>10084</RelativeVirtualAddress>
+        <Size>27</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_AVAILABLE_TYPES">
+        <RelativeVirtualAddress>10064</RelativeVirtualAddress>
+        <Size>9</Size>
+      </R2RSection>
+      <Contents>
+        <AvailableType Index="0">MultipleRuntimeFunctions.MultipleRuntimeFunctions</AvailableType>
+        <AvailableType Index="1">.&lt;Module&gt;</AvailableType>
+      </Contents>
+    </Section>
+    <Section Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS">
+        <RelativeVirtualAddress>10060</RelativeVirtualAddress>
+        <Size>3</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+    <Section Index="READYTORUN_SECTION_INLINING_INFO">
+      <R2RSection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="READYTORUN_SECTION_INLINING_INFO">
+        <RelativeVirtualAddress>10112</RelativeVirtualAddress>
+        <Size>13</Size>
+      </R2RSection>
+      <Contents />
+    </Section>
+  </Sections>
+  <Methods>
+    <Count>2</Count>
+    <Method Index="1">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+        <Name>Main</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions.Main(String[])</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663297</Token>
+        <EntryPointRuntimeFunctionId>0</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>1</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="0">
+            <StartAddress>10016</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10076</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+    <Method Index="2">
+      <R2RMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="2">
+        <Name>.ctor</Name>
+        <SignatureString>MultipleRuntimeFunctions.MultipleRuntimeFunctions..ctor()</SignatureString>
+        <IsGeneric>false</IsGeneric>
+        <DeclaringType>MultipleRuntimeFunctions.MultipleRuntimeFunctions</DeclaringType>
+        <Token>100663298</Token>
+        <EntryPointRuntimeFunctionId>1</EntryPointRuntimeFunctionId>
+      </R2RMethod>
+      <RuntimeFunctions>
+        <RuntimeFunction>
+          <MethodRid>2</MethodRid>
+          <RuntimeFunction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Index="1">
+            <StartAddress>10024</StartAddress>
+            <Size>0</Size>
+            <UnwindRVA>10076</UnwindRVA>
+            <CodeOffset>0</CodeOffset>
+          </RuntimeFunction>
+        </RuntimeFunction>
+      </RuntimeFunctions>
+    </Method>
+  </Methods>
+</R2RDump>
\ No newline at end of file
index e9a7c66..b285680 100644 (file)
@@ -338,6 +338,7 @@ JIT/Regression/VS-ia64-JIT/V1.2-M02/b12011/b12011/b12011.sh
 JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b410474/b410474/b410474.sh
 JIT/Regression/VS-ia64-JIT/V2.0-RTM/b286991/b286991/b286991.sh
 managed/Compilation/Compilation/Compilation.sh
+readytorun/r2rdump/R2RDumpTest/R2RDumpTest.sh
 Regressions/coreclr/0584/Test584/Test584.sh
 Interop/SizeConst/SizeConstTest/SizeConstTest.sh
 tracing/eventsource/eventpipeandetw/eventpipeandetw/eventpipeandetw.sh