public bool Init(SOSDac sos, ulong methodDesc, IMethodHelpers helpers) { MethodDesc = methodDesc; if (!sos.GetMethodDescData(methodDesc, 0, out _mdData)) { return(false); } _helpers = helpers; ulong slot = sos.GetMethodTableSlot(_mdData.MethodTable, _mdData.SlotNumber); return(sos.GetCodeHeaderData(slot, out _codeHeaderData)); }
public bool Init(SOSDac sos, ulong mt, uint i, IMethodHelpers helpers) { ulong slot = sos.GetMethodTableSlot(mt, i); if (!sos.GetCodeHeaderData(slot, out _codeHeaderData)) { return(false); } _helpers = helpers; MethodDesc = _codeHeaderData.MethodDesc; return(sos.GetMethodDescData(_codeHeaderData.MethodDesc, 0, out _mdData)); }
public ClrmdMethod(ClrType type, IMethodData data) { if (data is null) { throw new ArgumentNullException(nameof(data)); } _helpers = data.Helpers; Type = type; MethodDesc = data.MethodDesc; CompilationType = data.CompilationType; MetadataToken = data.Token; _hotCold = new HotColdRegions(data.HotStart, data.HotSize, data.ColdStart, data.ColdSize); _attrs = type?.Module?.MetadataImport?.GetMethodAttributes(MetadataToken) ?? default; }