1 write to _target
Microsoft.Diagnostics.DataContractReader.Legacy (1)
SOSDacImpl.cs (1)
77_target = target;
522 references to _target
Microsoft.Diagnostics.DataContractReader.Legacy (522)
SOSDacImpl.cs (455)
143Contracts.ILoader loader = _target.Contracts.Loader; 148data->AppDomainPtr = appDomain.ToClrDataAddress(_target); 150data->pHighFrequencyHeap = loader.GetHighFrequencyHeap(globalLoaderAllocator).ToClrDataAddress(_target); 151data->pLowFrequencyHeap = loader.GetLowFrequencyHeap(globalLoaderAllocator).ToClrDataAddress(_target); 210TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 214values[0] = appDomain.ToClrDataAddress(_target); 250ILoader loader = _target.Contracts.Loader; 323TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 378TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 379data->ParentDomain = defaultAppDomain.ToClrDataAddress(_target); 381ILoader loader = _target.Contracts.Loader; 382Contracts.ModuleHandle moduleHandle = loader.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 428ILoader loader = _target.Contracts.Loader; 447values[n++] = loader.GetAssembly(module).ToClrDataAddress(_target); 514TargetPointer addr = assembly.ToTargetPointer(_target); 515Contracts.ILoader loader = _target.Contracts.Loader; 518modules[0] = modulePointer.ToClrDataAddress(_target); 559Contracts.ILoader contract = _target.Contracts.Loader; 560Contracts.ModuleHandle handle = contract.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 610Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; 612TargetPointer ccwPtr = contract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 614ccwPtr = ccw.ToTargetPointer(_target); 622data->outerIUnknown = sccwData.OuterIUnknown.ToClrDataAddress(_target); 624data->handle = handle.ToClrDataAddress(_target); 627data->managedObject = _target.ReadPointer(handle).ToClrDataAddress(_target); 629data->ccwAddress = ccwPtr.ToClrDataAddress(_target); 682Contracts.IBuiltInCOM builtInCOMContract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if contract is not present 685TargetPointer startCCW = builtInCOMContract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 687startCCW = ccw.ToTargetPointer(_target); 712interfaces[itemIndex].methodTable = item.MethodTable.ToClrDataAddress(_target); 713interfaces[itemIndex].interfacePtr = item.InterfacePointerAddress.ToClrDataAddress(_target); 761if (_target.Contracts.RuntimeInfo.GetTargetOperatingSystem() != RuntimeInfoOperatingSystem.Windows) 767buckets = _target.Contracts.WindowsErrorReporting.GetWatsonBuckets(thread.ToTargetPointer(_target)); 811IExecutionManager eman = _target.Contracts.ExecutionManager; 812IGCInfo gcInfo = _target.Contracts.GCInfo; 814TargetCodePointer targetCodePointer = ip.ToTargetCodePointer(_target); 820data->MethodDescPtr = methodDesc.ToClrDataAddress(_target); 831data->MethodDescPtr = eman.GetMethodDesc(cbh).ToClrDataAddress(_target); 843data->GCInfo = pGcInfo.ToClrDataAddress(_target); 859data->ColdRegionStart = coldRegionStart.ToClrDataAddress(_target); 897IExecutionManager em = _target.Contracts.ExecutionManager; 914codeHeaps[i].LoaderHeap = loader.LoaderHeapAddress.ToClrDataAddress(_target); 918codeHeaps[i].baseAddr = host.BaseAddress.ToClrDataAddress(_target); 919codeHeaps[i].currentAddr = host.CurrentAddress.ToClrDataAddress(_target); 1120IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 1121IEcmaMetadata ecmaMetadataContract = _target.Contracts.EcmaMetadata; 1123TargetPointer fieldDescTargetPtr = fieldDesc.ToTargetPointer(_target); 1134Contracts.ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 1150data->MTOfType = rtsContract.GetPrimitiveType(CorElementType.U).Address.ToClrDataAddress(_target); 1153data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1158data->MTOfType = paramTypeHandle.Address.ToClrDataAddress(_target); 1161data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1198data->ModuleOfType = modulePtr.ToClrDataAddress(_target); 1200data->MTOfEnclosingClass = ctx.Address.ToClrDataAddress(_target); 1206? nextFieldDesc.ToClrDataAddress(_target) 1250IStackWalk stackWalk = _target.Contracts.StackWalk; 1301IGC gc = _target.Contracts.GC; 1346IGC gc = _target.Contracts.GC; 1367heaps[i] = gcHeaps[(int)i].ToClrDataAddress(_target); 1412IGC gc = _target.Contracts.GC; 1419GCHeapData heapData = gc.GetHeapData(heap.ToTargetPointer(_target)); 1424details->lowest_address = minAddress.ToClrDataAddress(_target); 1425details->highest_address = maxAddress.ToClrDataAddress(_target); 1430details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1431details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1432details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1433details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1446details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1447details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1448details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1461details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1462details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1475details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1476details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1477details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1478details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1483details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1546IGC gc = _target.Contracts.GC; 1558details->lowest_address = minAddress.ToClrDataAddress(_target); 1559details->highest_address = maxAddress.ToClrDataAddress(_target); 1564details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1565details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1566details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1567details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1580details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1581details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1582details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1595details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1596details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1609details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1610details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1611details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1612details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1617details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1916IGC gc = _target.Contracts.GC; 1928ppHandleEnum.Interface = new SOSHandleEnum(_target, supportedHandleTypes, legacyHandleEnum, _apiLock); 1958IGC gc = _target.Contracts.GC; 1960ppHandleEnum.Interface = new SOSHandleEnum(_target, handleTypes, legacyHandleEnum, _apiLock); 1983IGC gc = _target.Contracts.GC; 1990GCHeapData heapData = gc.GetHeapData(addr.ToTargetPointer(_target)); 1993data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 2029IGC gc = _target.Contracts.GC; 2040data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 2076IGC gc = _target.Contracts.GC; 2078GCHeapSegmentData segmentData = gc.GetHeapSegmentData(seg.ToTargetPointer(_target)); 2081data->allocated = segmentData.Allocated.ToClrDataAddress(_target); 2082data->committed = segmentData.Committed.ToClrDataAddress(_target); 2083data->reserved = segmentData.Reserved.ToClrDataAddress(_target); 2084data->used = segmentData.Used.ToClrDataAddress(_target); 2085data->mem = segmentData.Mem.ToClrDataAddress(_target); 2086data->next = segmentData.Next.ToClrDataAddress(_target); 2087data->gc_heap = segmentData.Heap.ToClrDataAddress(_target); 2089data->background_allocated = segmentData.BackgroundAllocated.ToClrDataAddress(_target); 2097if (seg.ToTargetPointer(_target) == heapData.EphemeralHeapSegment) 2099data->highAllocMark = heapData.AllocAllocated.ToClrDataAddress(_target); 2162Contracts.ILoader loader = _target.Contracts.Loader; 2163TargetPointer module = moduleAddr.ToTargetPointer(_target); 2166*il = loader.GetILAddr(peAssemblyPtr, rva).ToClrDataAddress(_target); 2192if (!_target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(ip.ToTargetPointer(_target), out string? symbolName)) 2238Contracts.JitManagerInfo jitManagerInfo = _target.Contracts.ExecutionManager.GetEEJitManagerInfo(); 2239managers->managerAddr = jitManagerInfo.ManagerAddress.ToClrDataAddress(_target); 2241managers->ptrHeapList = jitManagerInfo.HeapListAddress.ToClrDataAddress(_target); 2284=> 0x48 == _target.Read<byte>(pThunk) && 22850xB8 == _target.Read<byte>(pThunk + 1) && 22860xFF == _target.Read<byte>(pThunk + 10) && 22870xE0 == _target.Read<byte>(pThunk + 11); 2293return _target.ReadPointer(pThunk + 2); 2305if (_target.Contracts.RuntimeInfo.GetTargetArchitecture() != RuntimeInfoArchitecture.X64) 2308IPlatformAgnosticContext context = IPlatformAgnosticContext.GetContextForPlatform(_target); 2317*targetIP = DecodeJump64(pThunk).ToClrDataAddress(_target); 2361Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2363TargetPointer methodDesc = addr.ToTargetPointer(_target); 2365Contracts.ICodeVersions nativeCodeContract = _target.Contracts.CodeVersions; 2366Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 2381requestedNativeCodeVersion = nativeCodeContract.GetNativeCodeVersionForIP(ip.ToTargetCodePointer(_target)); 2400data->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCodeAddr).ToAddress(_target).ToClrDataAddress(_target); 2409data->AddressOfNativeCodeSlot = rtsContract.GetAddressOfNativeCodeSlot(methodDescHandle).ToClrDataAddress(_target); 2418data->MethodTablePtr = methodTableAddr.ToClrDataAddress(_target); 2420data->ModulePtr = rtsContract.GetModule(typeHandle).ToClrDataAddress(_target); 2459int cJittedRejitVersions = rejitContract.GetRejitIds(_target, methodDescHandle.Address).Count(); 2478List<TargetNUInt> reJitIds = rejitContract.GetRejitIds(_target, methodDescHandle.Address).ToList(); 2521data->GCStressCodeCopy = nativeCodeContract.GetGCStressCodeCopy(requestedNativeCodeVersion).ToClrDataAddress(_target); 2606ICodeVersions cv = _target.Contracts.CodeVersions; 2607IReJIT rejit = _target.Contracts.ReJIT; 2612pReJitData->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCode).Value; 2657Contracts.ILoader loader = _target.Contracts.Loader; 2658TargetPointer module = moduleAddr.ToTargetPointer(_target); 2663*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.FieldDefToDesc, token, out var _).ToClrDataAddress(_target); 2666*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.MethodDefToDesc, token, out var _).ToClrDataAddress(_target); 2669*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.TypeDefToMethodTable, token, out var _).ToClrDataAddress(_target); 2672*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.TypeRefToMethodTable, token, out var _).ToClrDataAddress(_target); 2706TargetPointer methodDesc = addr.ToTargetPointer(_target); 2708Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2712TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatSignature | TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2722TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2727string? fallbackNameString = _target.Contracts.DacStreams.StringFromEEAddress(methodDesc); 2737Contracts.ModuleHandle module = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 2738string modulePath = _target.Contracts.Loader.GetPath(module); 2740char directorySeparator = (char)_target.ReadGlobal<byte>(Constants.Globals.DirectorySeparator); 2795Contracts.IStackWalk stackWalkContract = _target.Contracts.StackWalk; 2796TargetPointer methodDescPtr = stackWalkContract.GetMethodDescPtr(frameAddr.ToTargetPointer(_target)); 2800_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDescPtr); // validation 2801*ppMD = methodDescPtr.ToClrDataAddress(_target); 2831IExecutionManager executionManager = _target.Contracts.ExecutionManager; 2832IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 2834CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 2846*ppMD = methodDescAddr.ToClrDataAddress(_target); 2885_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDesc.ToTargetPointer(_target)); 2906Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2907ITypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2924result.module = contract.GetModule(methodTable).ToClrDataAddress(_target); 2926result.klass = contract.GetCanonicalMethodTable(methodTable).ToClrDataAddress(_target); 2927result.parentMethodTable = contract.GetParentMethodTable(methodTable).ToClrDataAddress(_target); 2979TargetPointer mtAddress = mt.ToTargetPointer(_target); 2980Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2982data->FirstField = rtsContract.GetFieldDescList(typeHandle).FirstOrDefault().ToClrDataAddress(_target); 3021Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 3022ITypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 3023*value = methodTableHandle.Address.ToClrDataAddress(_target); 3051Contracts.IRuntimeTypeSystem typeSystemContract = _target.Contracts.RuntimeTypeSystem; 3052Contracts.ILoader loader = _target.Contracts.Loader; 3053ITypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 3071TypeNameBuilder.AppendType(_target, methodTableName, methodTableHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 3075string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt.ToTargetPointer(_target)); 3118IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3125TargetPointer methodTable = mt.ToTargetPointer(_target); 3132*value = rts.GetSlot(methodTableHandle, slot).ToClrDataAddress(_target); 3146*value = rts.GetMethodEntryPointIfExists(mdHandle).ToClrDataAddress(_target); 3194_target.Contracts.RuntimeTypeSystem.GetTypeHandle(mt.ToTargetPointer(_target)); 3223mod.Interface = new ClrDataModule(addr.ToTargetPointer(_target), _target, legacyModule, _apiLock); 3239Contracts.ILoader contract = _target.Contracts.Loader; 3240Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(moduleAddr.ToTargetPointer(_target)); 3244data->Assembly = contract.GetAssembly(handle).ToClrDataAddress(_target); 3252data->ilBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3256TargetSpan readOnlyMetadata = _target.Contracts.EcmaMetadata.GetReadOnlyMetadataAddress(handle); 3268data->LoaderAllocator = contract.GetLoaderAllocator(handle).ToClrDataAddress(_target); 3270data->FieldDefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.FieldDefToDesc).ToClrDataAddress(_target); 3271data->ManifestModuleReferencesMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.ManifestModuleReferences).ToClrDataAddress(_target); 3272data->MemberRefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.MemberRefToDesc).ToClrDataAddress(_target); 3273data->MethodDefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.MethodDefToDesc).ToClrDataAddress(_target); 3274data->TypeDefToMethodTableMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.TypeDefToMethodTable).ToClrDataAddress(_target); 3275data->TypeRefToMethodTableMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.TypeRefToMethodTable).ToClrDataAddress(_target); 3330Contracts.IException contract = _target.Contracts.Exception; 3332exception.ToTargetPointer(_target), 3335*exceptionObject = exceptionObjectLocal.ToClrDataAddress(_target); 3369Contracts.IObject objectContract = _target.Contracts.Object; 3370Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3371Contracts.ILoader loader = _target.Contracts.Loader; 3373TargetPointer mt = objectContract.GetMethodTableAddress(obj.ToTargetPointer(_target)); 3393TypeNameBuilder.AppendType(_target, classNameBuilder, typeHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 3397string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt); 3442Contracts.IObject objectContract = _target.Contracts.Object; 3443Contracts.IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 3445TargetPointer objPtr = objAddr.ToTargetPointer(_target); 3449data->MethodTable = mt.ToClrDataAddress(_target); 3459Target.TypeInfo arrayTypeInfo = _target.GetTypeInfo(DataType.Array); 3461data->Size += _target.Read<uint>(objAddr + numComponentsOffset) * data->dwComponentSize; 3480data->ArrayDataPtr = arrayData.ToClrDataAddress(_target); 3482data->ArrayBoundsPtr = boundsStart.ToClrDataAddress(_target); 3483data->ArrayLowerBoundsPtr = lowerBounds.ToClrDataAddress(_target); 3505if (_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop) 3553Contracts.IObject contract = _target.Contracts.Object; 3554string str = contract.GetStringValue(obj.ToTargetPointer(_target)); 3601IGC gc = _target.Contracts.GC; 3608GCOomData oomData = gc.GetOomData(oomAddr.ToTargetPointer(_target)); 3653IGC gc = _target.Contracts.GC; 3703Contracts.ILoader contract = _target.Contracts.Loader; 3704Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3709*peBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3743Contracts.ILoader contract = _target.Contracts.Loader; 3744Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3808IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3810TargetPointer rcwPtr = addr.ToTargetPointer(_target); 3813data->identityPointer = rcwData.IdentityPointer.ToClrDataAddress(_target); 3814data->unknownPointer = rcwData.UnknownPointer.ToClrDataAddress(_target); 3815data->managedObject = rcwData.ManagedObject.ToClrDataAddress(_target); 3816data->vtablePtr = rcwData.VTablePtr.ToClrDataAddress(_target); 3817data->creatorThread = rcwData.CreatorThread.ToClrDataAddress(_target); 3818data->ctxCookie = rcwData.CtxCookie.ToClrDataAddress(_target); 3869TargetPointer rcwPtr = rcw.ToTargetPointer(_target); 3870IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3901interfaces[itemIndex].methodTable = methodTable.ToClrDataAddress(_target); 3902interfaces[itemIndex].interfacePtr = unknown.ToClrDataAddress(_target); 3903interfaces[itemIndex].comContext = ctxCookie.ToClrDataAddress(_target); 3954string[] regs = _target.Contracts.RuntimeInfo.GetTargetArchitecture() switch 4071Contracts.IThread contract = _target.Contracts.Thread; 4073contract.GetStackLimitData(threadPtr.ToTargetPointer(_target), out stackBase, out stackLimit, out frameAddress); 4076*lower = stackBase.ToClrDataAddress(_target); 4079*upper = stackLimit.ToClrDataAddress(_target); 4082*fp = frameAddress.ToClrDataAddress(_target); 4182IThread threadContract = _target.Contracts.Thread; 4183IStackWalk stackWalkContract = _target.Contracts.StackWalk; 4251ulong stressLogAddress = _target.ReadGlobalPointer(Constants.Globals.StressLog); 4275ISyncBlock syncBlockContract = _target.Contracts.SyncBlock; 4283syncBlockPtr = addr.ToTargetPointer(_target); 4288data->SyncBlockPointer = syncBlockPtr.ToClrDataAddress(_target); 4289data->nextSyncBlock = syncBlockContract.GetNextSyncBlock(syncBlockPtr).ToClrDataAddress(_target); 4292data->blockRCW = rcw.ToClrDataAddress(_target); 4293data->blockClassFactory = ccf.ToClrDataAddress(_target); 4294data->blockCCW = ccw.ToClrDataAddress(_target); 4337ISyncBlock syncBlock = _target.Contracts.SyncBlock; 4346data->Object = obj.ToClrDataAddress(_target); 4349data->SyncBlockPointer = syncBlockAddr.ToClrDataAddress(_target); 4361IThread thread = _target.Contracts.Thread; 4363data->HoldingThread = threadPtr.ToClrDataAddress(_target); 4366TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4367data->appDomainPtr = appDomain.ToClrDataAddress(_target); 4417Contracts.IThread contract = _target.Contracts.Thread; 4418contract.GetThreadAllocContext(thread.ToTargetPointer(_target), out long allocBytes, out long allocBytesLoh); 4451Contracts.IThread contract = _target.Contracts.Thread; 4452Contracts.ThreadData threadData = contract.GetThreadData(thread.ToTargetPointer(_target)); 4457data->allocContextPtr = threadData.AllocContextPointer.ToClrDataAddress(_target); 4458data->allocContextLimit = threadData.AllocContextLimit.ToClrDataAddress(_target); 4461TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4462data->context = appDomain.ToClrDataAddress(_target); 4463data->domain = appDomain.ToClrDataAddress(_target); 4466data->pFrame = threadData.Frame.ToClrDataAddress(_target); 4467data->firstNestedException = threadData.FirstNestedException.ToClrDataAddress(_target); 4469data->lastThrownObjectHandle = threadData.LastThrownObjectHandle.ToClrDataAddress(_target); 4470data->nextThread = threadData.NextThread.ToClrDataAddress(_target); 4517TargetPointer threadPtr = _target.Contracts.Thread.IdToThread(thinLockId); 4518*pThread = threadPtr.ToClrDataAddress(_target); 4580Contracts.IThread thread = _target.Contracts.Thread; 4583data->firstThread = threadStoreData.FirstThread.ToClrDataAddress(_target); 4584data->finalizerThread = threadStoreData.FinalizerThread.ToClrDataAddress(_target); 4585data->gcThread = threadStoreData.GCThread.ToClrDataAddress(_target); 4631uint TlsIndexBase = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.TlsIndexBase)); 4632uint OffsetOfCurrentThreadInfo = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.OffsetOfCurrentThreadInfo)); 4662Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 4663data->ArrayMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Array).ToClrDataAddress(_target); 4664data->StringMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.String).ToClrDataAddress(_target); 4665data->ObjectMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Object).ToClrDataAddress(_target); 4666data->ExceptionMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Exception).ToClrDataAddress(_target); 4667data->FreeMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Free).ToClrDataAddress(_target); 4791IExecutionManager executionManager = _target.Contracts.ExecutionManager; 4793CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 4817ehInfo.moduleAddr = clause.ModuleAddr is TargetPointer moduleAddr ? moduleAddr.ToClrDataAddress(_target) : 0; 4818ehInfo.mtCatch = clause.TypeHandle is TargetNUInt th ? new TargetPointer(th.Value).ToClrDataAddress(_target) : 0; 4893Contracts.ILoader loader = _target.Contracts.Loader; 4929int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 4974Contracts.ILoader loader = _target.Contracts.Loader; 4975TargetPointer moduleAddrPtr = moduleAddr.ToTargetPointer(_target); 4991pCallback(EcmaMetadataUtils.GetRowId(metadataToken), element.ToClrDataAddress(_target).Value, token); 5040Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 5041TargetPointer listPtr = cleanupListPtr.ToTargetPointer(_target); 5047info.RCW.ToClrDataAddress(_target).Value, 5048info.Context.ToClrDataAddress(_target).Value, 5049info.STAThread.ToClrDataAddress(_target).Value, 5085Contracts.ILoader loader = _target.Contracts.Loader; 5135Contracts.IException contract = _target.Contracts.Exception; 5136Contracts.ExceptionData exceptionData = contract.GetExceptionData(objectAddress.ToTargetPointer(_target)); 5137data->Message = exceptionData.Message.ToClrDataAddress(_target); 5138data->InnerException = exceptionData.InnerException.ToClrDataAddress(_target); 5139data->StackTrace = exceptionData.StackTrace.ToClrDataAddress(_target); 5140data->WatsonBuckets = exceptionData.WatsonBuckets.ToClrDataAddress(_target); 5141data->StackTraceString = exceptionData.StackTraceString.ToClrDataAddress(_target); 5142data->RemoteStackTraceString = exceptionData.RemoteStackTraceString.ToClrDataAddress(_target); 5165if (!_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop)) 5202IGC gc = _target.Contracts.GC; 5210GCHeapData heapData = gc.GetHeapData(interestingInfoAddr.ToTargetPointer(_target)); 5245IGC gc = _target.Contracts.GC; 5352IGC gc = _target.Contracts.GC; 5402_target.TryReadGlobal<uint>(Constants.Globals.MaxClrNotificationArgs, out uint? maxArgs); 5407TargetPointer basePtr = _target.ReadGlobalPointer(Constants.Globals.ClrNotificationArguments); 5408if (_target.ReadNUInt(basePtr).Value == 0) 5413arguments[i] = _target.ReadNUInt(basePtr.Value + (ulong)(i * _target.PointerSize)).Value; 5460ILoader loader = _target.Contracts.Loader; 5461ICodeVersions codeVersions = _target.Contracts.CodeVersions; 5462IReJIT rejitContract = _target.Contracts.ReJIT; 5463TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5470IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 5488TargetCodePointer nativeCode = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeVersions.GetNativeCode(nativeCodeVersionHandle)); 5489TargetPointer nativeCodeAddr = nativeCode.ToAddress(_target); 5490nativeCodeAddrs[count].nativeCodeAddr = nativeCodeAddr.ToClrDataAddress(_target); 5491nativeCodeAddrs[count].nativeCodeVersionNodePtr = nativeCodeVersionHandle.CodeVersionNodeAddress.ToClrDataAddress(_target); 5588Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 5589ILoader loaderContract = _target.Contracts.Loader; 5590ITypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5599data->LoaderAllocatorObjectHandle = loaderAllocatorHandle.ToClrDataAddress(_target); 5633Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 5634Contracts.ICodeVersions codeVersionsContract = _target.Contracts.CodeVersions; 5635TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5678ICodeVersions cv = _target.Contracts.CodeVersions; 5679IReJIT rejitContract = _target.Contracts.ReJIT; 5680TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5703pRejitData->il = cv.GetIL(ilCodeVersion).ToClrDataAddress(_target); 5705pRejitData->ilCodeVersionNodePtr = ilCodeVersion.ILCodeVersionNode.ToClrDataAddress(_target); 5743Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5744Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5745Contracts.ILoader loader = _target.Contracts.Loader; 5746Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5747TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5769pILData->il = il.ToClrDataAddress(_target); 5801Contracts.ILoader loader = _target.Contracts.Loader; 5802Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5803Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5804Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5806TargetPointer modulePtr = mod.ToTargetPointer(_target); 5828methodDescs[*pcMethodDescs] = md.ToClrDataAddress(_target); 5875IGC gc = _target.Contracts.GC; 5911IGC gc = _target.Contracts.GC; 5931pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5932pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5933pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5934pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5981IGC gc = _target.Contracts.GC; 6000pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 6044IGC gc = _target.Contracts.GC; 6049GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 6064pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 6065pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 6066pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 6067pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 6114IGC gc = _target.Contracts.GC; 6119GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 6133pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 6178Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6179Contracts.ILoader loaderContract = _target.Contracts.Loader; 6180ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6183*assemblyLoadContext = alc.ToClrDataAddress(_target); 6209int version = _target.ReadGlobal<byte>(Constants.Globals.SOSBreakingChangeVersion); 6237Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6238TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6244*rcw = rcwObj.ToClrDataAddress(_target) | _rcwMask; 6262mowList![i] = comIdentity.ToClrDataAddress(_target); 6302Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6308TargetPointer ccwPtr = comWrappersContract.GetManagedObjectWrapperFromCCW(ccw.ToTargetPointer(_target)); 6339TargetPointer ccwPtr = ccw.ToTargetPointer(_target); 6340Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6348*managedObject = comWrappersContract.GetComWrappersObjectFromMOW(managedObjectPtr).ToClrDataAddress(_target); 6382Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6391TargetPointer rcwPtr = rcw.ToTargetPointer(_target) & ~_rcwMask; 6421Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6428TargetPointer identityPtr = comWrappersContract.GetComWrappersIdentity(rcw.ToTargetPointer(_target) & ~_rcwMask); 6429*identity = identityPtr.ToClrDataAddress(_target); 6465TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6466Contracts.IObject objectContract = _target.Contracts.Object; 6472Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6479if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6519TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6520if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6525*taggedMemory = taggedMemoryPtr.ToClrDataAddress(_target); 6563Contracts.IGC gcContract = _target.Contracts.GC; 6565*allocPtr = pointer.ToClrDataAddress(_target); 6566*allocLimit = limit.ToClrDataAddress(_target); 6596int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 6632Contracts.ILoader contract = _target.Contracts.Loader; 6634*pLoaderAllocator = globalLoaderAllocator.ToClrDataAddress(_target); 6693Target.TypeInfo laType = _target.GetTypeInfo(DataType.LoaderAllocator); 6694Target.TypeInfo vcsType = _target.GetTypeInfo(DataType.VirtualCallStubManager); 6767Contracts.ILoader contract = _target.Contracts.Loader; 6768IReadOnlyDictionary<LoaderAllocatorHeapType, TargetPointer> heaps = contract.GetLoaderAllocatorHeaps(loaderAllocator.ToTargetPointer(_target)); 6784? heapAddr.ToClrDataAddress(_target) 6827IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetHandleTableMemoryRegions(); 6838ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum, _apiLock); 6853IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCBookkeepingMemoryRegions(); 6864ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum, _apiLock); 6879IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCFreeRegions(); 6890ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum, _apiLock); 6902_target.Flush(FlushScope.All); 6926Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6927ITypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6929*GCStaticsAddress = rtsContract.GetGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6931*nonGCStaticsAddress = rtsContract.GetNonGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6966Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6967TargetPointer methodTablePtr = methodTable.ToTargetPointer(_target); 6968TargetPointer threadPtr = thread.ToTargetPointer(_target); 6981*GCStaticsAddress = rtsContract.GetGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6983*nonGCStaticsAddress = rtsContract.GetNonGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 7022Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 7023ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 7249IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 7250ITypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target)); 7263enumerator.Interface = new SOSMethodEnum(_target, methodTableHandle, legacyMethodEnum, _apiLock); 7285IGC gc = _target.Contracts.GC; 7495Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7523Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7532ThreadLogAddress = t.Address.ToClrDataAddress(_target), 7554Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7558TargetPointer address = threadStressLogAddress.ToTargetPointer(_target); 7560ppEnum.Interface = new SOSStressLogMsgEnum(_target, messages, _apiLock); 7576Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7585Start = r.Start.ToClrDataAddress(_target),
SOSDacImpl.IXCLRDataProcess.cs (67)
48IExecutionManager executionManager = _target.Contracts.ExecutionManager; 50executionManager.GetDynamicFunctionTableEntries(tableAddress.ToTargetPointer(_target)); 52uint runtimeFunctionSize = _target.GetTypeInfo(DataType.RuntimeFunction).Size!.Value; 74_target.ReadBuffer(functionEntries[i].Value, destination); 88_target.Flush(FlushScope.All); 127Contracts.IThread contract = _target.Contracts.Thread; 155task.Interface = new ClrDataTask(matchingThread, _target, legacyTask, _apiLock); 179TargetPointer thread = _target.Contracts.Thread.IdToThread((uint)taskID); 183task.Interface = new ClrDataTask(thread, _target, legacyTask, _apiLock); 245TargetCodePointer codeAddress = address.ToTargetCodePointer(_target); 246if (_target.TryRead(codeAddress, out byte _)) 248*type = _target.Contracts.ExecutionManager.GetCodeKind(codeAddress) switch 292TargetCodePointer codeAddr = address.ToTargetCodePointer(_target); 295if (!_target.TryRead(codeAddr, out byte _)) 298IExecutionManager eman = _target.Contracts.ExecutionManager; 301TargetCodePointer managedCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeAddr); 306*displacement = managedCodeAddr.ToAddress(_target).Value - eman.GetStartAddress(codeBlock).Value; 317IPrecodeStubs precodeStubs = _target.Contracts.PrecodeStubs; 323*displacement = codeAddr.ToAddress(_target).Value - entryPoint; 336if (resultName is null && _target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(address.ToTargetPointer(_target), out string? auxSymbolName)) 396IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 399TypeNameBuilder.AppendMethodInternal(_target, sb, mdh, TypeNameFormat.FormatSignature 451TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 508appDomain.Interface = new ClrDataAppDomain(_target, domains.Enumerator.Current, legacyAppDomain, _apiLock); 581TargetPointer domain = _target.Contracts.Loader.GetAppDomain(); 582appDomain.Interface = new ClrDataAppDomain(_target, domain, legacyAppDomain, _apiLock); 641ILoader loader = _target.Contracts.Loader; 700mod.Interface = new ClrDataModule(modules.Enumerator.Current.Address, _target, legacyModule, _apiLock); 773ILoader loader = _target.Contracts.Loader; 782ClrDataAddress imageBase = baseAddress.ToClrDataAddress(_target); 785mod.Interface = new ClrDataModule(module.Address, _target, legacyModule, _apiLock); 1020TargetCodePointer methodAddr = address.ToTargetCodePointer(_target); 1024bool isTriviallyReadable = _target.TryRead(methodAddr, out byte _); 1028IExecutionManager eman = _target.Contracts.ExecutionManager; 1032EnumMethodInstances emi = new(_target, methodDesc, TargetPointer.Null); 1095method.Interface = new ClrDataMethodInstance(_target, methodDesc, emi._appDomain, legacyMethod, _apiLock); 1187INotifications notifications = _target.Contracts.Notifications; 1199_legacyImpl.GetModule(moduleLoad.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 1203ClrDataModule module = new(moduleLoad.ModuleAddress, _target, legacyModule, _apiLock); 1214_legacyImpl.GetModule(moduleUnload.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 1218ClrDataModule module = new(moduleUnload.ModuleAddress, _target, legacyModule, _apiLock); 1225TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 1227IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 1230ClrDataMethodInstance methodInst = new(_target, methodDesc, appDomain, null, _apiLock); 1231ClrDataAddress nativeCodeAddress = jit.NativeCodeAddress.ToClrDataAddress(_target); 1251IThread thread = _target.Contracts.Thread; 1255_target, 1300TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 1301IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 1303ClrDataMethodInstance methodInst = new(_target, methodDesc, appDomain, null, _apiLock); 1343hr = StressTestApi.CdacStressApi.HandleRequest(_target, reqCode, inBufferSize, inBuffer, outBufferSize, outBuffer); 1408_target.Contracts.CodeNotifications.SetAllCodeNotifications(moduleAddr, CodeNotificationFlagsConverter.FromCom(flags)); 1455ICodeNotifications codeNotif = _target.Contracts.CodeNotifications; 1548_target.Contracts.CodeNotifications.SetCodeNotification(moduleAddr, tokens[i], CodeNotificationFlagsConverter.FromCom(f)); 1568*flags = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags)); 1600TargetPointer dacNotificationFlags = _target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags); 1601_target.Write<uint>(dacNotificationFlags, flags); 1654ILoader loader = _target.Contracts.Loader; 1663ClrDataAddress imageBase = baseAddress.ToClrDataAddress(_target); 1667MetadataReader reader = _target.Contracts.EcmaMetadata.GetMetadata(module) 1742_target, 1816int headerSize = HeaderReaderHelpers.GetHeaderSize(_target, ilHeader); 1817int codeSize = HeaderReaderHelpers.GetCodeSize(_target, ilHeader); 1818ClrDataAddress codeStart = new TargetPointer(ilHeader + (uint)headerSize).ToClrDataAddress(_target); 1889_target.Contracts.Notifications.SetGcNotification(gcEvtArgs.condemnedGeneration);