R2RDump - GcInfo for x86
authorAmy Yu <amycmyu@gmail.com>
Wed, 8 Aug 2018 23:52:53 +0000 (16:52 -0700)
committerAmy <amycmyu@gmail.com>
Wed, 15 Aug 2018 22:24:43 +0000 (15:24 -0700)
commit0046960be06d8f9aaeac7beb69a38f98b2e59563
tree065ac1d13caa19a21c65660bc30c1410145e3a37
parent54cf70422928b7a6214f560cf1b984510c61f28b
R2RDump - GcInfo for x86

x86 GcInfo headers

x86 GcSlotTable

x86 GcTransitions

Update expected xml for R2RDumpTests

Add license headers

Allow multiple GcTransitions with same codeOffset

Add index property in GcSlot, make GcSlot a class instead of struct, add missing spaces, update tests

Remove placeholder functions for parsing partially interruptible pointer tables

Implement partially interruptible GcInfo

Example GcInfo output:
    CodeLength: 22 bytes
        InfoHdr:
            PrologSize: 7
            EpilogSize: 4
            EpilogCount: 1
            EpilogAtEnd: yes
            Callee-saved regs  = EBP
            EbpFrame: yes
            Fully Interruptible: yes
            DoubleAlign: no
            Arguments Size: 0 DWORDs
            Stack Frame Size: 1 DWORDs
            UntrackedCnt: 1
            VarPtrTableSize: 0
            GenericsContext: 0
            GenericsContextIsMethodDesc: 0
            ReturnKind: RT_Scalar
            RevPInvokeOffset: 0
            Epilogs: 18

            GcSlots:
                -------------------------
                [EBP-4]
                Flags: GC_SLOT_UNTRACKED
                LowBits:
                -------------------------

    28fc: 55                    push    ebp
    28fd: 8b ec                 mov     ebp, esp
    28ff: 50                    push    eax
    2900: 89 4d fc              mov     dword ptr [ebp - 4], ecx
    2903: 8b 4d fc              mov     ecx, dword ptr [ebp - 4]
    2906: ff 15 10 10 01 10     call    dword ptr [268505104]
                                reg ECX becoming live
    290c: 90                    nop
                                reg ECX becoming dead
    290d: 90                    nop
    290e: 8b e5                 mov     esp, ebp
    2910: 5d                    pop     ebp
    2911: c3                    ret

Commit migrated from https://github.com/dotnet/coreclr/commit/26286b460e53d03ec8b74b85f09c0754bb10605f
44 files changed:
src/coreclr/src/tools/r2rdump/Amd64/GcInfo.cs [moved from src/coreclr/src/tools/r2rdump/GCInfo.cs with 88% similarity]
src/coreclr/src/tools/r2rdump/Amd64/GcSlotTable.cs [moved from src/coreclr/src/tools/r2rdump/GCSlotTable.cs with 98% similarity]
src/coreclr/src/tools/r2rdump/Amd64/GcTransition.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/Amd64/Registers.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/Amd64/UnwindInfo.cs
src/coreclr/src/tools/r2rdump/GCInfoTypes.cs
src/coreclr/src/tools/r2rdump/NativeReader.cs
src/coreclr/src/tools/r2rdump/R2RDump.cs
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/TextDumper.cs
src/coreclr/src/tools/r2rdump/XmlDumper.cs
src/coreclr/src/tools/r2rdump/x86/CallPattern.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/x86/GcInfo.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/x86/GcSlotTable.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/x86/GcTransition.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/x86/InfoHdr.cs [new file with mode: 0644]
src/coreclr/src/tools/r2rdump/x86/Registers.cs [new file with mode: 0644]
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Checked/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Debug/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Debug/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Debug/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Debug/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Release/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Release/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Release/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x64.Release/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Checked/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Debug/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Debug/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Debug/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Debug/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GcInfoTransitions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/GenericFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/HelloWorld.xml
src/coreclr/tests/src/readytorun/r2rdump/files/Windows_NT.x86.Release/MultipleRuntimeFunctions.xml
src/coreclr/tests/src/readytorun/r2rdump/rebaseline.cmd