1 write to _target
Microsoft.Diagnostics.DataContractReader.Legacy (1)
SOSDacImpl.cs (1)
66_target = target;
529 references to _target
Microsoft.Diagnostics.DataContractReader.Legacy (529)
SOSDacImpl.cs (460)
119Contracts.ILoader loader = _target.Contracts.Loader; 124data->AppDomainPtr = appDomain.ToClrDataAddress(_target); 126data->pHighFrequencyHeap = loader.GetHighFrequencyHeap(globalLoaderAllocator).ToClrDataAddress(_target); 127data->pLowFrequencyHeap = loader.GetLowFrequencyHeap(globalLoaderAllocator).ToClrDataAddress(_target); 185TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 189values[0] = appDomain.ToClrDataAddress(_target); 224ILoader loader = _target.Contracts.Loader; 296TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 349TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 350data->ParentDomain = defaultAppDomain.ToClrDataAddress(_target); 352ILoader loader = _target.Contracts.Loader; 353Contracts.ModuleHandle moduleHandle = loader.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 398ILoader loader = _target.Contracts.Loader; 417values[n++] = loader.GetAssembly(module).ToClrDataAddress(_target); 479TargetPointer addr = assembly.ToTargetPointer(_target); 480Contracts.ILoader loader = _target.Contracts.Loader; 483modules[0] = modulePointer.ToClrDataAddress(_target); 523Contracts.ILoader contract = _target.Contracts.Loader; 524Contracts.ModuleHandle handle = contract.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 573Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; 575TargetPointer ccwPtr = contract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 577ccwPtr = ccw.ToTargetPointer(_target); 585data->outerIUnknown = sccwData.OuterIUnknown.ToClrDataAddress(_target); 587data->handle = handle.ToClrDataAddress(_target); 590data->managedObject = _target.ReadPointer(handle).ToClrDataAddress(_target); 592data->ccwAddress = ccwPtr.ToClrDataAddress(_target); 644Contracts.IBuiltInCOM builtInCOMContract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if contract is not present 647TargetPointer startCCW = builtInCOMContract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 649startCCW = ccw.ToTargetPointer(_target); 674interfaces[itemIndex].methodTable = item.MethodTable.ToClrDataAddress(_target); 675interfaces[itemIndex].interfacePtr = item.InterfacePointerAddress.ToClrDataAddress(_target); 722if (_target.Contracts.RuntimeInfo.GetTargetOperatingSystem() != RuntimeInfoOperatingSystem.Windows) 728buckets = _target.Contracts.WindowsErrorReporting.GetWatsonBuckets(thread.ToTargetPointer(_target)); 747int sizeOfGenericModeBlock = (int)_target.ReadGlobal<uint>(Constants.Globals.SizeOfGenericModeBlock); 771IExecutionManager eman = _target.Contracts.ExecutionManager; 772IGCInfo gcInfo = _target.Contracts.GCInfo; 774TargetCodePointer targetCodePointer = ip.ToTargetCodePointer(_target); 780data->MethodDescPtr = methodDesc.ToClrDataAddress(_target); 791data->MethodDescPtr = eman.GetMethodDesc(cbh).ToClrDataAddress(_target); 803data->GCInfo = pGcInfo.ToClrDataAddress(_target); 819data->ColdRegionStart = coldRegionStart.ToClrDataAddress(_target); 856IExecutionManager em = _target.Contracts.ExecutionManager; 859Debug.Assert(jitManager.ToTargetPointer(_target) == jitManagerInfo.ManagerAddress); 873codeHeaps[i].LoaderHeap = loader.LoaderHeapAddress.ToClrDataAddress(_target); 877codeHeaps[i].baseAddr = host.BaseAddress.ToClrDataAddress(_target); 878codeHeaps[i].currentAddr = host.CurrentAddress.ToClrDataAddress(_target); 1057IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 1058IEcmaMetadata ecmaMetadataContract = _target.Contracts.EcmaMetadata; 1060TargetPointer fieldDescTargetPtr = fieldDesc.ToTargetPointer(_target); 1071Contracts.ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 1087data->MTOfType = rtsContract.GetPrimitiveType(CorElementType.U).Address.ToClrDataAddress(_target); 1090data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1095data->MTOfType = paramTypeHandle.Address.ToClrDataAddress(_target); 1098data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1135data->ModuleOfType = modulePtr.ToClrDataAddress(_target); 1137data->MTOfEnclosingClass = ctx.Address.ToClrDataAddress(_target); 1143? nextFieldDesc.ToClrDataAddress(_target) 1186IStackWalk stackWalk = _target.Contracts.StackWalk; 1236IGC gc = _target.Contracts.GC; 1280IGC gc = _target.Contracts.GC; 1301heaps[i] = gcHeaps[(int)i].ToClrDataAddress(_target); 1345IGC gc = _target.Contracts.GC; 1352GCHeapData heapData = gc.GetHeapData(heap.ToTargetPointer(_target)); 1357details->lowest_address = minAddress.ToClrDataAddress(_target); 1358details->highest_address = maxAddress.ToClrDataAddress(_target); 1363details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1364details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1365details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1366details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1379details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1380details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1381details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1394details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1395details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1408details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1409details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1410details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1411details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1416details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1478IGC gc = _target.Contracts.GC; 1490details->lowest_address = minAddress.ToClrDataAddress(_target); 1491details->highest_address = maxAddress.ToClrDataAddress(_target); 1496details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1497details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1498details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1499details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1512details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1513details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1514details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1527details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1528details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1541details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1542details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1543details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1544details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1549details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1834IGC gc = _target.Contracts.GC; 1846ppHandleEnum.Interface = new SOSHandleEnum(_target, supportedHandleTypes, legacyHandleEnum); 1871IGC gc = _target.Contracts.GC; 1873ppHandleEnum.Interface = new SOSHandleEnum(_target, handleTypes, legacyHandleEnum); 1891IGC gc = _target.Contracts.GC; 1898GCHeapData heapData = gc.GetHeapData(addr.ToTargetPointer(_target)); 1901data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1936IGC gc = _target.Contracts.GC; 1947data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1982IGC gc = _target.Contracts.GC; 1984GCHeapSegmentData segmentData = gc.GetHeapSegmentData(seg.ToTargetPointer(_target)); 1987data->allocated = segmentData.Allocated.ToClrDataAddress(_target); 1988data->committed = segmentData.Committed.ToClrDataAddress(_target); 1989data->reserved = segmentData.Reserved.ToClrDataAddress(_target); 1990data->used = segmentData.Used.ToClrDataAddress(_target); 1991data->mem = segmentData.Mem.ToClrDataAddress(_target); 1992data->next = segmentData.Next.ToClrDataAddress(_target); 1993data->gc_heap = segmentData.Heap.ToClrDataAddress(_target); 1995data->background_allocated = segmentData.BackgroundAllocated.ToClrDataAddress(_target); 2003if (seg.ToTargetPointer(_target) == heapData.EphemeralHeapSegment) 2005data->highAllocMark = heapData.AllocAllocated.ToClrDataAddress(_target); 2066Contracts.ILoader loader = _target.Contracts.Loader; 2067TargetPointer module = moduleAddr.ToTargetPointer(_target); 2070*il = loader.GetILAddr(peAssemblyPtr, rva).ToClrDataAddress(_target); 2095if (!_target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(ip.ToTargetPointer(_target), out string? symbolName)) 2140Contracts.JitManagerInfo jitManagerInfo = _target.Contracts.ExecutionManager.GetEEJitManagerInfo(); 2141managers->managerAddr = jitManagerInfo.ManagerAddress.ToClrDataAddress(_target); 2143managers->ptrHeapList = jitManagerInfo.HeapListAddress.ToClrDataAddress(_target); 2186=> 0x48 == _target.Read<byte>(pThunk) && 21870xB8 == _target.Read<byte>(pThunk + 1) && 21880xFF == _target.Read<byte>(pThunk + 10) && 21890xE0 == _target.Read<byte>(pThunk + 11); 2195return _target.ReadPointer(pThunk + 2); 2206if (_target.Contracts.RuntimeInfo.GetTargetArchitecture() != RuntimeInfoArchitecture.X64) 2209IPlatformAgnosticContext context = IPlatformAgnosticContext.GetContextForPlatform(_target); 2218*targetIP = DecodeJump64(pThunk).ToClrDataAddress(_target); 2261Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2263TargetPointer methodDesc = addr.ToTargetPointer(_target); 2265Contracts.ICodeVersions nativeCodeContract = _target.Contracts.CodeVersions; 2266Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 2281requestedNativeCodeVersion = nativeCodeContract.GetNativeCodeVersionForIP(ip.ToTargetCodePointer(_target)); 2300data->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCodeAddr).ToAddress(_target).ToClrDataAddress(_target); 2309data->AddressOfNativeCodeSlot = rtsContract.GetAddressOfNativeCodeSlot(methodDescHandle).ToClrDataAddress(_target); 2318data->MethodTablePtr = methodTableAddr.ToClrDataAddress(_target); 2320data->ModulePtr = rtsContract.GetModule(typeHandle).ToClrDataAddress(_target); 2359int cJittedRejitVersions = rejitContract.GetRejitIds(_target, methodDescHandle.Address).Count(); 2378List<TargetNUInt> reJitIds = rejitContract.GetRejitIds(_target, methodDescHandle.Address).ToList(); 2421data->GCStressCodeCopy = nativeCodeContract.GetGCStressCodeCopy(requestedNativeCodeVersion).ToClrDataAddress(_target); 2506ICodeVersions cv = _target.Contracts.CodeVersions; 2507IReJIT rejit = _target.Contracts.ReJIT; 2512pReJitData->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCode).Value; 2556Contracts.ILoader loader = _target.Contracts.Loader; 2557TargetPointer module = moduleAddr.ToTargetPointer(_target); 2562*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.FieldDefToDesc, token, out var _).ToClrDataAddress(_target); 2565*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.MethodDefToDesc, token, out var _).ToClrDataAddress(_target); 2568*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.TypeDefToMethodTable, token, out var _).ToClrDataAddress(_target); 2571*methodDesc = loader.GetModuleLookupMapElement(moduleHandle, ModuleLookupMapKind.TypeRefToMethodTable, token, out var _).ToClrDataAddress(_target); 2604TargetPointer methodDesc = addr.ToTargetPointer(_target); 2606Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2610TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatSignature | TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2620TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2625string? fallbackNameString = _target.Contracts.DacStreams.StringFromEEAddress(methodDesc); 2635Contracts.ModuleHandle module = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 2636string modulePath = _target.Contracts.Loader.GetPath(module); 2638char directorySeparator = (char)_target.ReadGlobal<byte>(Constants.Globals.DirectorySeparator); 2692Contracts.IStackWalk stackWalkContract = _target.Contracts.StackWalk; 2693TargetPointer methodDescPtr = stackWalkContract.GetMethodDescPtr(frameAddr.ToTargetPointer(_target)); 2697_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDescPtr); // validation 2698*ppMD = methodDescPtr.ToClrDataAddress(_target); 2727IExecutionManager executionManager = _target.Contracts.ExecutionManager; 2728IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 2730CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 2742*ppMD = methodDescAddr.ToClrDataAddress(_target); 2780_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDesc.ToTargetPointer(_target)); 2800Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2801ITypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2818result.module = contract.GetModule(methodTable).ToClrDataAddress(_target); 2820result.klass = contract.GetCanonicalMethodTable(methodTable).ToClrDataAddress(_target); 2821result.parentMethodTable = contract.GetParentMethodTable(methodTable).ToClrDataAddress(_target); 2872TargetPointer mtAddress = mt.ToTargetPointer(_target); 2873Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2875data->FirstField = rtsContract.GetFieldDescList(typeHandle).FirstOrDefault().ToClrDataAddress(_target); 2913Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2914ITypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2915*value = methodTableHandle.Address.ToClrDataAddress(_target); 2942Contracts.IRuntimeTypeSystem typeSystemContract = _target.Contracts.RuntimeTypeSystem; 2943Contracts.ILoader loader = _target.Contracts.Loader; 2944ITypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 2962TypeNameBuilder.AppendType(_target, methodTableName, methodTableHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2966string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt.ToTargetPointer(_target)); 3008IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3015TargetPointer methodTable = mt.ToTargetPointer(_target); 3022*value = rts.GetSlot(methodTableHandle, slot).ToClrDataAddress(_target); 3036*value = rts.GetMethodEntryPointIfExists(mdHandle).ToClrDataAddress(_target); 3083_target.Contracts.RuntimeTypeSystem.GetTypeHandle(mt.ToTargetPointer(_target)); 3108mod.Interface = new ClrDataModule(addr.ToTargetPointer(_target), _target, legacyModule); 3120Contracts.ILoader contract = _target.Contracts.Loader; 3121Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(moduleAddr.ToTargetPointer(_target)); 3125data->Assembly = contract.GetAssembly(handle).ToClrDataAddress(_target); 3133data->ilBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3137TargetSpan readOnlyMetadata = _target.Contracts.EcmaMetadata.GetReadOnlyMetadataAddress(handle); 3149data->LoaderAllocator = contract.GetLoaderAllocator(handle).ToClrDataAddress(_target); 3151data->FieldDefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.FieldDefToDesc).ToClrDataAddress(_target); 3152data->ManifestModuleReferencesMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.ManifestModuleReferences).ToClrDataAddress(_target); 3153data->MemberRefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.MemberRefToDesc).ToClrDataAddress(_target); 3154data->MethodDefToDescMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.MethodDefToDesc).ToClrDataAddress(_target); 3155data->TypeDefToMethodTableMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.TypeDefToMethodTable).ToClrDataAddress(_target); 3156data->TypeRefToMethodTableMap = contract.GetModuleLookupMapBase(handle, ModuleLookupMapKind.TypeRefToMethodTable).ToClrDataAddress(_target); 3210Contracts.IException contract = _target.Contracts.Exception; 3212exception.ToTargetPointer(_target), 3215*exceptionObject = exceptionObjectLocal.ToClrDataAddress(_target); 3248Contracts.IObject objectContract = _target.Contracts.Object; 3249Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3250Contracts.ILoader loader = _target.Contracts.Loader; 3252TargetPointer mt = objectContract.GetMethodTableAddress(obj.ToTargetPointer(_target)); 3272TypeNameBuilder.AppendType(_target, classNameBuilder, typeHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 3276string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt); 3320Contracts.IObject objectContract = _target.Contracts.Object; 3321Contracts.IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 3323TargetPointer objPtr = objAddr.ToTargetPointer(_target); 3327data->MethodTable = mt.ToClrDataAddress(_target); 3337Target.TypeInfo arrayTypeInfo = _target.GetTypeInfo(DataType.Array); 3339data->Size += _target.Read<uint>(objAddr + numComponentsOffset) * data->dwComponentSize; 3358data->ArrayDataPtr = arrayData.ToClrDataAddress(_target); 3360data->ArrayBoundsPtr = boundsStart.ToClrDataAddress(_target); 3361data->ArrayLowerBoundsPtr = lowerBounds.ToClrDataAddress(_target); 3383if (_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop) 3430Contracts.IObject contract = _target.Contracts.Object; 3431string str = contract.GetStringValue(obj.ToTargetPointer(_target)); 3477IGC gc = _target.Contracts.GC; 3484GCOomData oomData = gc.GetOomData(oomAddr.ToTargetPointer(_target)); 3528IGC gc = _target.Contracts.GC; 3577Contracts.ILoader contract = _target.Contracts.Loader; 3578Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3583*peBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3616Contracts.ILoader contract = _target.Contracts.Loader; 3617Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3679IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3681TargetPointer rcwPtr = addr.ToTargetPointer(_target); 3684data->identityPointer = rcwData.IdentityPointer.ToClrDataAddress(_target); 3685data->unknownPointer = rcwData.UnknownPointer.ToClrDataAddress(_target); 3686data->managedObject = rcwData.ManagedObject.ToClrDataAddress(_target); 3687data->vtablePtr = rcwData.VTablePtr.ToClrDataAddress(_target); 3688data->creatorThread = rcwData.CreatorThread.ToClrDataAddress(_target); 3689data->ctxCookie = rcwData.CtxCookie.ToClrDataAddress(_target); 3739TargetPointer rcwPtr = rcw.ToTargetPointer(_target); 3740IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3771interfaces[itemIndex].methodTable = methodTable.ToClrDataAddress(_target); 3772interfaces[itemIndex].interfacePtr = unknown.ToClrDataAddress(_target); 3773interfaces[itemIndex].comContext = ctxCookie.ToClrDataAddress(_target); 3823string[] regs = _target.Contracts.RuntimeInfo.GetTargetArchitecture() switch 3939Contracts.IThread contract = _target.Contracts.Thread; 3941contract.GetStackLimitData(threadPtr.ToTargetPointer(_target), out stackBase, out stackLimit, out frameAddress); 3944*lower = stackBase.ToClrDataAddress(_target); 3947*upper = stackLimit.ToClrDataAddress(_target); 3950*fp = frameAddress.ToClrDataAddress(_target); 4042IThread threadContract = _target.Contracts.Thread; 4043IStackWalk stackWalkContract = _target.Contracts.StackWalk; 4110ulong stressLogAddress = _target.ReadGlobalPointer(Constants.Globals.StressLog); 4133ISyncBlock syncBlockContract = _target.Contracts.SyncBlock; 4141syncBlockPtr = addr.ToTargetPointer(_target); 4146data->SyncBlockPointer = syncBlockPtr.ToClrDataAddress(_target); 4147data->nextSyncBlock = syncBlockContract.GetNextSyncBlock(syncBlockPtr).ToClrDataAddress(_target); 4150data->blockRCW = rcw.ToClrDataAddress(_target); 4151data->blockClassFactory = ccf.ToClrDataAddress(_target); 4152data->blockCCW = ccw.ToClrDataAddress(_target); 4194ISyncBlock syncBlock = _target.Contracts.SyncBlock; 4203data->Object = obj.ToClrDataAddress(_target); 4206data->SyncBlockPointer = syncBlockAddr.ToClrDataAddress(_target); 4218IThread thread = _target.Contracts.Thread; 4220data->HoldingThread = threadPtr.ToClrDataAddress(_target); 4223TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4224data->appDomainPtr = appDomain.ToClrDataAddress(_target); 4273Contracts.IThread contract = _target.Contracts.Thread; 4274contract.GetThreadAllocContext(thread.ToTargetPointer(_target), out long allocBytes, out long allocBytesLoh); 4306Contracts.IThread contract = _target.Contracts.Thread; 4307Contracts.ThreadData threadData = contract.GetThreadData(thread.ToTargetPointer(_target)); 4312data->allocContextPtr = threadData.AllocContextPointer.ToClrDataAddress(_target); 4313data->allocContextLimit = threadData.AllocContextLimit.ToClrDataAddress(_target); 4316TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4317data->context = appDomain.ToClrDataAddress(_target); 4318data->domain = appDomain.ToClrDataAddress(_target); 4321data->pFrame = threadData.Frame.ToClrDataAddress(_target); 4322data->firstNestedException = threadData.FirstNestedException.ToClrDataAddress(_target); 4324data->lastThrownObjectHandle = threadData.LastThrownObjectHandle.ToClrDataAddress(_target); 4325data->nextThread = threadData.NextThread.ToClrDataAddress(_target); 4371TargetPointer threadPtr = _target.Contracts.Thread.IdToThread(thinLockId); 4372*pThread = threadPtr.ToClrDataAddress(_target); 4431Contracts.IThread thread = _target.Contracts.Thread; 4434data->firstThread = threadStoreData.FirstThread.ToClrDataAddress(_target); 4435data->finalizerThread = threadStoreData.FinalizerThread.ToClrDataAddress(_target); 4436data->gcThread = threadStoreData.GCThread.ToClrDataAddress(_target); 4481uint TlsIndexBase = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.TlsIndexBase)); 4482uint OffsetOfCurrentThreadInfo = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.OffsetOfCurrentThreadInfo)); 4511Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 4512data->ArrayMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Array).ToClrDataAddress(_target); 4513data->StringMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.String).ToClrDataAddress(_target); 4514data->ObjectMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Object).ToClrDataAddress(_target); 4515data->ExceptionMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Exception).ToClrDataAddress(_target); 4516data->FreeMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Free).ToClrDataAddress(_target); 4638IExecutionManager executionManager = _target.Contracts.ExecutionManager; 4640CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 4664ehInfo.moduleAddr = clause.ModuleAddr is TargetPointer moduleAddr ? moduleAddr.ToClrDataAddress(_target) : 0; 4665ehInfo.mtCatch = clause.TypeHandle is TargetNUInt th ? new TargetPointer(th.Value).ToClrDataAddress(_target) : 0; 4740Contracts.ILoader loader = _target.Contracts.Loader; 4775int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 4819Contracts.ILoader loader = _target.Contracts.Loader; 4820TargetPointer moduleAddrPtr = moduleAddr.ToTargetPointer(_target); 4836pCallback(EcmaMetadataUtils.GetRowId(metadataToken), element.ToClrDataAddress(_target).Value, token); 4846Dictionary<ulong, uint> expectedElements = elements.ToDictionary(tuple => tuple.Address.ToClrDataAddress(_target).Value, tuple => EcmaMetadataUtils.GetRowId(tuple.Index)); 4884Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 4885TargetPointer listPtr = cleanupListPtr.ToTargetPointer(_target); 4891info.RCW.ToClrDataAddress(_target).Value, 4892info.Context.ToClrDataAddress(_target).Value, 4893info.STAThread.ToClrDataAddress(_target).Value, 4905Dictionary<ulong, ulong> expectedElements = cleanupInfos.ToDictionary(info => info.RCW.ToClrDataAddress(_target).Value, info => info.Context.ToClrDataAddress(_target).Value); 4928Contracts.ILoader loader = _target.Contracts.Loader; 4977Contracts.IException contract = _target.Contracts.Exception; 4978Contracts.ExceptionData exceptionData = contract.GetExceptionData(objectAddress.ToTargetPointer(_target)); 4979data->Message = exceptionData.Message.ToClrDataAddress(_target); 4980data->InnerException = exceptionData.InnerException.ToClrDataAddress(_target); 4981data->StackTrace = exceptionData.StackTrace.ToClrDataAddress(_target); 4982data->WatsonBuckets = exceptionData.WatsonBuckets.ToClrDataAddress(_target); 4983data->StackTraceString = exceptionData.StackTraceString.ToClrDataAddress(_target); 4984data->RemoteStackTraceString = exceptionData.RemoteStackTraceString.ToClrDataAddress(_target); 5006if (!_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop)) 5042IGC gc = _target.Contracts.GC; 5050GCHeapData heapData = gc.GetHeapData(interestingInfoAddr.ToTargetPointer(_target)); 5084IGC gc = _target.Contracts.GC; 5190IGC gc = _target.Contracts.GC; 5239_target.TryReadGlobal<uint>(Constants.Globals.MaxClrNotificationArgs, out uint? maxArgs); 5244TargetPointer basePtr = _target.ReadGlobalPointer(Constants.Globals.ClrNotificationArguments); 5245if (_target.ReadNUInt(basePtr).Value == 0) 5250arguments[i] = _target.ReadNUInt(basePtr.Value + (ulong)(i * _target.PointerSize)).Value; 5296ILoader loader = _target.Contracts.Loader; 5297ICodeVersions codeVersions = _target.Contracts.CodeVersions; 5298IReJIT rejitContract = _target.Contracts.ReJIT; 5299TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5306IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 5324TargetCodePointer nativeCode = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeVersions.GetNativeCode(nativeCodeVersionHandle)); 5325TargetPointer nativeCodeAddr = nativeCode.ToAddress(_target); 5326nativeCodeAddrs[count].nativeCodeAddr = nativeCodeAddr.ToClrDataAddress(_target); 5327nativeCodeAddrs[count].nativeCodeVersionNodePtr = nativeCodeVersionHandle.CodeVersionNodeAddress.ToClrDataAddress(_target); 5423Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 5424ILoader loaderContract = _target.Contracts.Loader; 5425ITypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5434data->LoaderAllocatorObjectHandle = loaderAllocatorHandle.ToClrDataAddress(_target); 5467Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 5468Contracts.ICodeVersions codeVersionsContract = _target.Contracts.CodeVersions; 5469TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5511ICodeVersions cv = _target.Contracts.CodeVersions; 5512IReJIT rejitContract = _target.Contracts.ReJIT; 5513TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5536pRejitData->il = cv.GetIL(ilCodeVersion).ToClrDataAddress(_target); 5538pRejitData->ilCodeVersionNodePtr = ilCodeVersion.ILCodeVersionNode.ToClrDataAddress(_target); 5575Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5576Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5577Contracts.ILoader loader = _target.Contracts.Loader; 5578Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5579TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5601pILData->il = il.ToClrDataAddress(_target); 5632Contracts.ILoader loader = _target.Contracts.Loader; 5633Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5634Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5635Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5637TargetPointer modulePtr = mod.ToTargetPointer(_target); 5659methodDescs[*pcMethodDescs] = md.ToClrDataAddress(_target); 5705IGC gc = _target.Contracts.GC; 5740IGC gc = _target.Contracts.GC; 5760pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5761pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5762pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5763pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5809IGC gc = _target.Contracts.GC; 5828pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 5871IGC gc = _target.Contracts.GC; 5876GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5891pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5892pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5893pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5894pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5940IGC gc = _target.Contracts.GC; 5945GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5959pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 6003Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6004Contracts.ILoader loaderContract = _target.Contracts.Loader; 6005ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6008*assemblyLoadContext = alc.ToClrDataAddress(_target); 6033int version = _target.ReadGlobal<byte>(Constants.Globals.SOSBreakingChangeVersion); 6060Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6061TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6067*rcw = rcwObj.ToClrDataAddress(_target) | _rcwMask; 6085mowList![i] = comIdentity.ToClrDataAddress(_target); 6124Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6130TargetPointer ccwPtr = comWrappersContract.GetManagedObjectWrapperFromCCW(ccw.ToTargetPointer(_target)); 6160TargetPointer ccwPtr = ccw.ToTargetPointer(_target); 6161Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6169*managedObject = comWrappersContract.GetComWrappersObjectFromMOW(managedObjectPtr).ToClrDataAddress(_target); 6202Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6211TargetPointer rcwPtr = rcw.ToTargetPointer(_target) & ~_rcwMask; 6240Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6247TargetPointer identityPtr = comWrappersContract.GetComWrappersIdentity(rcw.ToTargetPointer(_target) & ~_rcwMask); 6248*identity = identityPtr.ToClrDataAddress(_target); 6283TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6284Contracts.IObject objectContract = _target.Contracts.Object; 6290Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6297if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6336TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6337if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6342*taggedMemory = taggedMemoryPtr.ToClrDataAddress(_target); 6379Contracts.IGC gcContract = _target.Contracts.GC; 6381*allocPtr = pointer.ToClrDataAddress(_target); 6382*allocLimit = limit.ToClrDataAddress(_target); 6411int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 6446Contracts.ILoader contract = _target.Contracts.Loader; 6448*pLoaderAllocator = globalLoaderAllocator.ToClrDataAddress(_target); 6507Target.TypeInfo laType = _target.GetTypeInfo(DataType.LoaderAllocator); 6508Target.TypeInfo vcsType = _target.GetTypeInfo(DataType.VirtualCallStubManager); 6579Contracts.ILoader contract = _target.Contracts.Loader; 6580IReadOnlyDictionary<LoaderAllocatorHeapType, TargetPointer> heaps = contract.GetLoaderAllocatorHeaps(loaderAllocator.ToTargetPointer(_target)); 6596? heapAddr.ToClrDataAddress(_target) 6638IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetHandleTableMemoryRegions(); 6649ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6663IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCBookkeepingMemoryRegions(); 6674ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6688IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCFreeRegions(); 6699ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6710_target.Flush(FlushScope.All); 6731Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6732ITypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6734*GCStaticsAddress = rtsContract.GetGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6736*nonGCStaticsAddress = rtsContract.GetNonGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6770Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6771TargetPointer methodTablePtr = methodTable.ToTargetPointer(_target); 6772TargetPointer threadPtr = thread.ToTargetPointer(_target); 6785*GCStaticsAddress = rtsContract.GetGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6787*nonGCStaticsAddress = rtsContract.GetNonGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6825Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6826ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 7045IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 7046ITypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target)); 7059enumerator.Interface = new SOSMethodEnum(_target, methodTableHandle, legacyMethodEnum); 7080IGC gc = _target.Contracts.GC; 7276Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7303Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7312ThreadLogAddress = t.Address.ToClrDataAddress(_target), 7333Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7337TargetPointer address = threadStressLogAddress.ToTargetPointer(_target); 7339ppEnum.Interface = new SOSStressLogMsgEnum(_target, messages); 7354Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7363Start = r.Start.ToClrDataAddress(_target),
SOSDacImpl.IXCLRDataProcess.cs (69)
46IExecutionManager executionManager = _target.Contracts.ExecutionManager; 48executionManager.GetDynamicFunctionTableEntries(tableAddress.ToTargetPointer(_target)); 50uint runtimeFunctionSize = _target.GetTypeInfo(DataType.RuntimeFunction).Size!.Value; 72_target.ReadBuffer(functionEntries[i].Value, destination); 85_target.Flush(FlushScope.All); 106Contracts.IThread contract = _target.Contracts.Thread; 134task.Interface = new ClrDataTask(matchingThread, _target, legacyTask); 153TargetPointer thread = _target.Contracts.Thread.IdToThread((uint)taskID); 157task.Interface = new ClrDataTask(thread, _target, legacyTask); 198TargetCodePointer codeAddress = address.ToTargetCodePointer(_target); 199if (_target.TryRead(codeAddress, out byte _)) 201*type = _target.Contracts.ExecutionManager.GetCodeKind(codeAddress) switch 244TargetCodePointer codeAddr = address.ToTargetCodePointer(_target); 247if (!_target.TryRead(codeAddr, out byte _)) 250IExecutionManager eman = _target.Contracts.ExecutionManager; 253TargetCodePointer managedCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeAddr); 258*displacement = managedCodeAddr.ToAddress(_target).Value - eman.GetStartAddress(codeBlock).Value; 269IPrecodeStubs precodeStubs = _target.Contracts.PrecodeStubs; 275*displacement = codeAddr.ToAddress(_target).Value - entryPoint; 288if (resultName is null && _target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(address.ToTargetPointer(_target), out string? auxSymbolName)) 348IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 351TypeNameBuilder.AppendMethodInternal(_target, sb, mdh, TypeNameFormat.FormatSignature 402TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 458appDomain.Interface = new ClrDataAppDomain(_target, domains.Enumerator.Current, legacyAppDomain); 528TargetPointer domain = _target.Contracts.Loader.GetAppDomain(); 529appDomain.Interface = new ClrDataAppDomain(_target, domain, legacyAppDomain); 572ILoader loader = _target.Contracts.Loader; 630mod.Interface = new ClrDataModule(modules.Enumerator.Current.Address, _target, legacyModule); 700ILoader loader = _target.Contracts.Loader; 709ClrDataAddress imageBase = baseAddress.ToClrDataAddress(_target); 712mod.Interface = new ClrDataModule(module.Address, _target, legacyModule); 948TargetCodePointer methodAddr = address.ToTargetCodePointer(_target); 952bool isTriviallyReadable = _target.TryRead(methodAddr, out byte _); 956IExecutionManager eman = _target.Contracts.ExecutionManager; 960EnumMethodInstances emi = new(_target, methodDesc, TargetPointer.Null); 1023method.Interface = new ClrDataMethodInstance(_target, methodDesc, emi._appDomain, legacyMethod); 1104INotifications notifications = _target.Contracts.Notifications; 1116_legacyImpl.GetModule(moduleLoad.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 1120notify.OnModuleLoaded(new ClrDataModule(moduleLoad.ModuleAddress, _target, legacyModule)); 1130_legacyImpl.GetModule(moduleUnload.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 1134notify.OnModuleUnloaded(new ClrDataModule(moduleUnload.ModuleAddress, _target, legacyModule)); 1140TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 1142IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 1145ClrDataMethodInstance methodInst = new(_target, methodDesc, appDomain, null); 1149notify5.OnCodeGenerated2(methodInst, jit.NativeCodeAddress.ToClrDataAddress(_target)); 1158IThread thread = _target.Contracts.Thread; 1162_target, 1202TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 1203IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 1205notify4.ExceptionCatcherEnter(new ClrDataMethodInstance(_target, methodDesc, appDomain, null), exceptionCatcherEnter.NativeOffset); 1239hr = StressTestApi.CdacStressApi.HandleRequest(_target, reqCode, inBufferSize, inBuffer, outBufferSize, outBuffer); 1295_target.Contracts.CodeNotifications.SetAllCodeNotifications(moduleAddr, CodeNotificationFlagsConverter.FromCom(flags)); 1333ICodeNotifications codeNotif = _target.Contracts.CodeNotifications; 1425_target.Contracts.CodeNotifications.SetCodeNotification(moduleAddr, tokens[i], CodeNotificationFlagsConverter.FromCom(f)); 1444*flags = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags)); 1475TargetPointer dacNotificationFlags = _target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags); 1476_target.Write<uint>(dacNotificationFlags, flags); 1494flagsLocal = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags)); 1528ILoader loader = _target.Contracts.Loader; 1537ClrDataAddress imageBase = baseAddress.ToClrDataAddress(_target); 1541MetadataReader reader = _target.Contracts.EcmaMetadata.GetMetadata(module) 1615_target, 1689int headerSize = HeaderReaderHelpers.GetHeaderSize(_target, ilHeader); 1690int codeSize = HeaderReaderHelpers.GetCodeSize(_target, ilHeader); 1691ClrDataAddress codeStart = new TargetPointer(ilHeader + (uint)headerSize).ToClrDataAddress(_target); 1748_target.Contracts.Notifications.SetGcNotification(gcEvtArgs.condemnedGeneration);