Skip to content

Commit c80de30

Browse files
authored
Sync gcinfo.h with changes made for cDAC in runtime (#5505)
Sync changes made for dotnet/runtime#116072 over to diagnostics repo
1 parent c1781de commit c80de30

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/shared/inc/gcinfo.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ struct GCInfoToken
7777
}
7878
#endif
7979

80+
// Keep this in sync with GetR2RGCInfoVersion in cDac (ExecutionManagerCore.ReadyToRunJitManager.cs)
8081
static uint32_t ReadyToRunVersionToGcInfoVersion(uint32_t readyToRunMajorVersion, uint32_t readyToRunMinorVersion)
8182
{
82-
#ifdef SOS_INCLUDE
83-
return GCInfoVersion();
84-
#else
85-
return GCINFO_VERSION;
86-
#endif
83+
if (readyToRunMajorVersion >= 11)
84+
return 4;
85+
86+
// Since v2 and v3 had the same file format and v1 is no longer supported,
87+
// we can assume GCInfo v3.
88+
return 3;
8789
}
8890
};
8991

0 commit comments

Comments
 (0)