diff --git a/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs b/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs index e9c9644121eb1..fbd747b3df172 100644 --- a/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs +++ b/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs @@ -360,10 +360,11 @@ int ISOSDacInterface.GetMethodDescData(ulong methodDesc, ulong ip, DacpMethodDes } #endif - if (data->bIsDynamic != 0) - { - throw new NotImplementedException(); // TODO[cdac]: get the dynamic method managed object - } + // Unlike the legacy implementation, the cDAC does not currently populate + // data->managedDynamicMethodObject. This field is unused in both SOS and CLRMD + // and would require accessing CorLib bound managed fields which the cDAC does not + // currently support. However, it must remain in the return type for compatibility. + data->managedDynamicMethodObject = 0; hr = HResults.S_OK; } @@ -405,7 +406,8 @@ int ISOSDacInterface.GetMethodDescData(ulong methodDesc, ulong ip, DacpMethodDes Debug.Assert(data->MDToken == dataLocal.MDToken); Debug.Assert(data->GCInfo == dataLocal.GCInfo); Debug.Assert(data->GCStressCodeCopy == dataLocal.GCStressCodeCopy); - Debug.Assert(data->managedDynamicMethodObject == dataLocal.managedDynamicMethodObject); + // managedDynamicMethodObject is not currently populated by the cDAC API and may differ from legacyImpl. + Debug.Assert(data->managedDynamicMethodObject == 0); Debug.Assert(data->requestedIP == dataLocal.requestedIP); Debug.Assert(data->cJittedRejitVersions == dataLocal.cJittedRejitVersions);