1 write to _target
Microsoft.Diagnostics.DataContractReader.Legacy (1)
SOSDacImpl.cs (1)
66_target = target;
502 references to _target
Microsoft.Diagnostics.DataContractReader.Legacy (502)
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); 128data->pStubHeap = loader.GetStubHeap(globalLoaderAllocator).ToClrDataAddress(_target); 186TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 190values[0] = appDomain.ToClrDataAddress(_target); 225ILoader loader = _target.Contracts.Loader; 297TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 350TargetPointer defaultAppDomain = _target.Contracts.Loader.GetAppDomain(); 351data->ParentDomain = defaultAppDomain.ToClrDataAddress(_target); 353ILoader loader = _target.Contracts.Loader; 354Contracts.ModuleHandle moduleHandle = loader.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 399ILoader loader = _target.Contracts.Loader; 418values[n++] = loader.GetAssembly(module).ToClrDataAddress(_target); 480TargetPointer addr = assembly.ToTargetPointer(_target); 481Contracts.ILoader loader = _target.Contracts.Loader; 484modules[0] = modulePointer.ToClrDataAddress(_target); 524Contracts.ILoader contract = _target.Contracts.Loader; 525Contracts.ModuleHandle handle = contract.GetModuleHandleFromAssemblyPtr(assembly.ToTargetPointer(_target)); 574Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; 576TargetPointer ccwPtr = contract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 578ccwPtr = ccw.ToTargetPointer(_target); 586data->outerIUnknown = sccwData.OuterIUnknown.ToClrDataAddress(_target); 588data->handle = handle.ToClrDataAddress(_target); 591data->managedObject = _target.ReadPointer(handle).ToClrDataAddress(_target); 593data->ccwAddress = ccwPtr.ToClrDataAddress(_target); 645Contracts.IBuiltInCOM builtInCOMContract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if contract is not present 648TargetPointer startCCW = builtInCOMContract.GetCCWFromInterfacePointer(ccw.ToTargetPointer(_target)); 650startCCW = ccw.ToTargetPointer(_target); 675interfaces[itemIndex].methodTable = item.MethodTable.ToClrDataAddress(_target); 676interfaces[itemIndex].interfacePtr = item.InterfacePointerAddress.ToClrDataAddress(_target); 720Contracts.IThread threadContract = _target.Contracts.Thread; 724if (_target.Contracts.RuntimeInfo.GetTargetOperatingSystem() != RuntimeInfoOperatingSystem.Windows) 730buckets = threadContract.GetWatsonBuckets(thread.ToTargetPointer(_target)); 749int sizeOfGenericModeBlock = (int)_target.ReadGlobal<uint>(Constants.Globals.SizeOfGenericModeBlock); 773IExecutionManager eman = _target.Contracts.ExecutionManager; 774IGCInfo gcInfo = _target.Contracts.GCInfo; 776TargetCodePointer targetCodePointer = ip.ToTargetCodePointer(_target); 782data->MethodDescPtr = methodDesc.ToClrDataAddress(_target); 793data->MethodDescPtr = eman.GetMethodDesc(cbh).ToClrDataAddress(_target); 805data->GCInfo = pGcInfo.ToClrDataAddress(_target); 821data->ColdRegionStart = coldRegionStart.ToClrDataAddress(_target); 858IExecutionManager em = _target.Contracts.ExecutionManager; 861Debug.Assert(jitManager.ToTargetPointer(_target) == jitManagerInfo.ManagerAddress); 875codeHeaps[i].LoaderHeap = loader.LoaderHeapAddress.ToClrDataAddress(_target); 879codeHeaps[i].baseAddr = host.BaseAddress.ToClrDataAddress(_target); 880codeHeaps[i].currentAddr = host.CurrentAddress.ToClrDataAddress(_target); 1059IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 1060IEcmaMetadata ecmaMetadataContract = _target.Contracts.EcmaMetadata; 1061ISignature signatureContract = _target.Contracts.Signature; 1063TargetPointer fieldDescTargetPtr = fieldDesc.ToTargetPointer(_target); 1074Contracts.ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 1088data->MTOfType = rtsContract.GetPrimitiveType(CorElementType.U).Address.ToClrDataAddress(_target); 1091data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1098data->MTOfType = paramTypeHandle.Address.ToClrDataAddress(_target); 1103data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1142data->ModuleOfType = modulePtr.ToClrDataAddress(_target); 1144data->MTOfEnclosingClass = ctx.Address.ToClrDataAddress(_target); 1149data->NextField = fieldDescTargetPtr + _target.GetTypeInfo(DataType.FieldDesc).Size!.Value; 1188IStackWalk stackWalk = _target.Contracts.StackWalk; 1238IGC gc = _target.Contracts.GC; 1282IGC gc = _target.Contracts.GC; 1303heaps[i] = gcHeaps[(int)i].ToClrDataAddress(_target); 1347IGC gc = _target.Contracts.GC; 1354GCHeapData heapData = gc.GetHeapData(heap.ToTargetPointer(_target)); 1359details->lowest_address = minAddress.ToClrDataAddress(_target); 1360details->highest_address = maxAddress.ToClrDataAddress(_target); 1365details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1366details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1367details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1368details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1381details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1382details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1383details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1396details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1397details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1410details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1411details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1412details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1413details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1418details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1480IGC gc = _target.Contracts.GC; 1492details->lowest_address = minAddress.ToClrDataAddress(_target); 1493details->highest_address = maxAddress.ToClrDataAddress(_target); 1498details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1499details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1500details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1501details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1514details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1515details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1516details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1529details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1530details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1543details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1544details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1545details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1546details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1551details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1830IGC gc = _target.Contracts.GC; 1842ppHandleEnum.Interface = new SOSHandleEnum(_target, supportedHandleTypes, legacyHandleEnum); 1867IGC gc = _target.Contracts.GC; 1869ppHandleEnum.Interface = new SOSHandleEnum(_target, handleTypes, legacyHandleEnum); 1887IGC gc = _target.Contracts.GC; 1894GCHeapData heapData = gc.GetHeapData(addr.ToTargetPointer(_target)); 1897data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1932IGC gc = _target.Contracts.GC; 1943data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1978IGC gc = _target.Contracts.GC; 1980GCHeapSegmentData segmentData = gc.GetHeapSegmentData(seg.ToTargetPointer(_target)); 1983data->allocated = segmentData.Allocated.ToClrDataAddress(_target); 1984data->committed = segmentData.Committed.ToClrDataAddress(_target); 1985data->reserved = segmentData.Reserved.ToClrDataAddress(_target); 1986data->used = segmentData.Used.ToClrDataAddress(_target); 1987data->mem = segmentData.Mem.ToClrDataAddress(_target); 1988data->next = segmentData.Next.ToClrDataAddress(_target); 1989data->gc_heap = segmentData.Heap.ToClrDataAddress(_target); 1991data->background_allocated = segmentData.BackgroundAllocated.ToClrDataAddress(_target); 1999if (seg.ToTargetPointer(_target) == heapData.EphemeralHeapSegment) 2001data->highAllocMark = heapData.AllocAllocated.ToClrDataAddress(_target); 2062Contracts.ILoader loader = _target.Contracts.Loader; 2063TargetPointer module = moduleAddr.ToTargetPointer(_target); 2066*il = loader.GetILAddr(peAssemblyPtr, rva).ToClrDataAddress(_target); 2091if (!_target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(ip.ToTargetPointer(_target), out string? symbolName)) 2136Contracts.JitManagerInfo jitManagerInfo = _target.Contracts.ExecutionManager.GetEEJitManagerInfo(); 2137managers->managerAddr = jitManagerInfo.ManagerAddress.ToClrDataAddress(_target); 2139managers->ptrHeapList = jitManagerInfo.HeapListAddress.ToClrDataAddress(_target); 2182=> 0x48 == _target.Read<byte>(pThunk) && 21830xB8 == _target.Read<byte>(pThunk + 1) && 21840xFF == _target.Read<byte>(pThunk + 10) && 21850xE0 == _target.Read<byte>(pThunk + 11); 2191return _target.ReadPointer(pThunk + 2); 2202if (_target.Contracts.RuntimeInfo.GetTargetArchitecture() != RuntimeInfoArchitecture.X64) 2205IPlatformAgnosticContext context = IPlatformAgnosticContext.GetContextForPlatform(_target); 2214*targetIP = DecodeJump64(pThunk).ToClrDataAddress(_target); 2257Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2259TargetPointer methodDesc = addr.ToTargetPointer(_target); 2261Contracts.ICodeVersions nativeCodeContract = _target.Contracts.CodeVersions; 2262Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 2277requestedNativeCodeVersion = nativeCodeContract.GetNativeCodeVersionForIP(ip.ToTargetCodePointer(_target)); 2296data->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCodeAddr).ToAddress(_target).ToClrDataAddress(_target); 2305data->AddressOfNativeCodeSlot = rtsContract.GetAddressOfNativeCodeSlot(methodDescHandle).ToClrDataAddress(_target); 2314data->MethodTablePtr = methodTableAddr.ToClrDataAddress(_target); 2316data->ModulePtr = rtsContract.GetModule(typeHandle).ToClrDataAddress(_target); 2355int cJittedRejitVersions = rejitContract.GetRejitIds(_target, methodDescHandle.Address).Count(); 2374List<TargetNUInt> reJitIds = rejitContract.GetRejitIds(_target, methodDescHandle.Address).ToList(); 2417data->GCStressCodeCopy = nativeCodeContract.GetGCStressCodeCopy(requestedNativeCodeVersion).ToClrDataAddress(_target); 2502ICodeVersions cv = _target.Contracts.CodeVersions; 2503IReJIT rejit = _target.Contracts.ReJIT; 2509pReJitData->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCode).Value; 2545Contracts.ILoader loader = _target.Contracts.Loader; 2546TargetPointer module = moduleAddr.ToTargetPointer(_target); 2552*methodDesc = loader.GetModuleLookupMapElement(lookupTables.FieldDefToDesc, token, out var _).ToClrDataAddress(_target); 2555*methodDesc = loader.GetModuleLookupMapElement(lookupTables.MethodDefToDesc, token, out var _).ToClrDataAddress(_target); 2558*methodDesc = loader.GetModuleLookupMapElement(lookupTables.TypeDefToMethodTable, token, out var _).ToClrDataAddress(_target); 2561*methodDesc = loader.GetModuleLookupMapElement(lookupTables.TypeRefToMethodTable, token, out var _).ToClrDataAddress(_target); 2594TargetPointer methodDesc = addr.ToTargetPointer(_target); 2596Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2600TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatSignature | TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2610TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2615string? fallbackNameString = _target.Contracts.DacStreams.StringFromEEAddress(methodDesc); 2625Contracts.ModuleHandle module = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 2626string modulePath = _target.Contracts.Loader.GetPath(module); 2628char directorySeparator = (char)_target.ReadGlobal<byte>(Constants.Globals.DirectorySeparator); 2682Contracts.IStackWalk stackWalkContract = _target.Contracts.StackWalk; 2683TargetPointer methodDescPtr = stackWalkContract.GetMethodDescPtr(frameAddr.ToTargetPointer(_target)); 2687_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDescPtr); // validation 2688*ppMD = methodDescPtr.ToClrDataAddress(_target); 2717IExecutionManager executionManager = _target.Contracts.ExecutionManager; 2718IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 2720CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 2732*ppMD = methodDescAddr.ToClrDataAddress(_target); 2770_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDesc.ToTargetPointer(_target)); 2790Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2791Contracts.TypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2808result.module = contract.GetModule(methodTable).ToClrDataAddress(_target); 2810result.klass = contract.GetCanonicalMethodTable(methodTable).ToClrDataAddress(_target); 2811result.parentMethodTable = contract.GetParentMethodTable(methodTable).ToClrDataAddress(_target); 2862TargetPointer mtAddress = mt.ToTargetPointer(_target); 2863Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2865data->FirstField = rtsContract.GetFieldDescList(typeHandle).FirstOrDefault().ToClrDataAddress(_target); 2903Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2904Contracts.TypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2905*value = methodTableHandle.Address.ToClrDataAddress(_target); 2932Contracts.IRuntimeTypeSystem typeSystemContract = _target.Contracts.RuntimeTypeSystem; 2933Contracts.ILoader loader = _target.Contracts.Loader; 2934Contracts.TypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 2952TypeNameBuilder.AppendType(_target, methodTableName, methodTableHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2956string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt.ToTargetPointer(_target)); 2998IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3005TargetPointer methodTable = mt.ToTargetPointer(_target); 3012*value = rts.GetSlot(methodTableHandle, slot).ToClrDataAddress(_target); 3026*value = rts.GetMethodEntryPointIfExists(mdHandle).ToClrDataAddress(_target); 3073_target.Contracts.RuntimeTypeSystem.GetTypeHandle(mt.ToTargetPointer(_target)); 3098mod.Interface = new ClrDataModule(addr.ToTargetPointer(_target), _target, legacyModule); 3110Contracts.ILoader contract = _target.Contracts.Loader; 3111Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(moduleAddr.ToTargetPointer(_target)); 3115data->Assembly = contract.GetAssembly(handle).ToClrDataAddress(_target); 3123data->ilBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3127TargetSpan readOnlyMetadata = _target.Contracts.EcmaMetadata.GetReadOnlyMetadataAddress(handle); 3139data->LoaderAllocator = contract.GetLoaderAllocator(handle).ToClrDataAddress(_target); 3142data->FieldDefToDescMap = ReadMapBase(_target, tables.FieldDefToDesc, tables.TableDataOffset); 3143data->ManifestModuleReferencesMap = ReadMapBase(_target, tables.ManifestModuleReferences, tables.TableDataOffset); 3144data->MemberRefToDescMap = ReadMapBase(_target, tables.MemberRefToDesc, tables.TableDataOffset); 3145data->MethodDefToDescMap = ReadMapBase(_target, tables.MethodDefToDesc, tables.TableDataOffset); 3146data->TypeDefToMethodTableMap = ReadMapBase(_target, tables.TypeDefToMethodTable, tables.TableDataOffset); 3147data->TypeRefToMethodTableMap = ReadMapBase(_target, tables.TypeRefToMethodTable, tables.TableDataOffset); 3206Contracts.IException contract = _target.Contracts.Exception; 3208exception.ToTargetPointer(_target), 3211*exceptionObject = exceptionObjectLocal.ToClrDataAddress(_target); 3244Contracts.IObject objectContract = _target.Contracts.Object; 3245Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3246Contracts.ILoader loader = _target.Contracts.Loader; 3248TargetPointer mt = objectContract.GetMethodTableAddress(obj.ToTargetPointer(_target)); 3268TypeNameBuilder.AppendType(_target, classNameBuilder, typeHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 3272string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt); 3316Contracts.IObject objectContract = _target.Contracts.Object; 3317Contracts.IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 3319TargetPointer objPtr = objAddr.ToTargetPointer(_target); 3323data->MethodTable = mt.ToClrDataAddress(_target); 3333Target.TypeInfo arrayTypeInfo = _target.GetTypeInfo(DataType.Array); 3335data->Size += _target.Read<uint>(objAddr + numComponentsOffset) * data->dwComponentSize; 3354data->ArrayDataPtr = arrayData.ToClrDataAddress(_target); 3356data->ArrayBoundsPtr = boundsStart.ToClrDataAddress(_target); 3357data->ArrayLowerBoundsPtr = lowerBounds.ToClrDataAddress(_target); 3379if (_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop) 3426Contracts.IObject contract = _target.Contracts.Object; 3427string str = contract.GetStringValue(obj.ToTargetPointer(_target)); 3473IGC gc = _target.Contracts.GC; 3480GCOomData oomData = gc.GetOomData(oomAddr.ToTargetPointer(_target)); 3524IGC gc = _target.Contracts.GC; 3573Contracts.ILoader contract = _target.Contracts.Loader; 3574Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3579*peBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3612Contracts.ILoader contract = _target.Contracts.Loader; 3613Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3675IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3677TargetPointer rcwPtr = addr.ToTargetPointer(_target); 3680data->identityPointer = rcwData.IdentityPointer.ToClrDataAddress(_target); 3681data->unknownPointer = rcwData.UnknownPointer.ToClrDataAddress(_target); 3682data->managedObject = rcwData.ManagedObject.ToClrDataAddress(_target); 3683data->vtablePtr = rcwData.VTablePtr.ToClrDataAddress(_target); 3684data->creatorThread = rcwData.CreatorThread.ToClrDataAddress(_target); 3685data->ctxCookie = rcwData.CtxCookie.ToClrDataAddress(_target); 3735TargetPointer rcwPtr = rcw.ToTargetPointer(_target); 3736IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3767interfaces[itemIndex].methodTable = methodTable.ToClrDataAddress(_target); 3768interfaces[itemIndex].interfacePtr = unknown.ToClrDataAddress(_target); 3769interfaces[itemIndex].comContext = ctxCookie.ToClrDataAddress(_target); 3819string[] regs = _target.Contracts.RuntimeInfo.GetTargetArchitecture() switch 3935Contracts.IThread contract = _target.Contracts.Thread; 3937contract.GetStackLimitData(threadPtr.ToTargetPointer(_target), out stackBase, out stackLimit, out frameAddress); 3940*lower = stackBase.ToClrDataAddress(_target); 3943*upper = stackLimit.ToClrDataAddress(_target); 3946*fp = frameAddress.ToClrDataAddress(_target); 4038IThread threadContract = _target.Contracts.Thread; 4039IStackWalk stackWalkContract = _target.Contracts.StackWalk; 4106ulong stressLogAddress = _target.ReadGlobalPointer(Constants.Globals.StressLog); 4129ISyncBlock syncBlockContract = _target.Contracts.SyncBlock; 4137syncBlockPtr = addr.ToTargetPointer(_target); 4142data->SyncBlockPointer = syncBlockPtr.ToClrDataAddress(_target); 4143data->nextSyncBlock = syncBlockContract.GetNextSyncBlock(syncBlockPtr).ToClrDataAddress(_target); 4146data->blockRCW = rcw.ToClrDataAddress(_target); 4147data->blockClassFactory = ccf.ToClrDataAddress(_target); 4148data->blockCCW = ccw.ToClrDataAddress(_target); 4190ISyncBlock syncBlock = _target.Contracts.SyncBlock; 4199data->Object = obj.ToClrDataAddress(_target); 4202data->SyncBlockPointer = syncBlockAddr.ToClrDataAddress(_target); 4214IThread thread = _target.Contracts.Thread; 4216data->HoldingThread = threadPtr.ToClrDataAddress(_target); 4219TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4220data->appDomainPtr = appDomain.ToClrDataAddress(_target); 4269Contracts.IThread contract = _target.Contracts.Thread; 4270contract.GetThreadAllocContext(thread.ToTargetPointer(_target), out long allocBytes, out long allocBytesLoh); 4302Contracts.IThread contract = _target.Contracts.Thread; 4303Contracts.ThreadData threadData = contract.GetThreadData(thread.ToTargetPointer(_target)); 4308data->allocContextPtr = threadData.AllocContextPointer.ToClrDataAddress(_target); 4309data->allocContextLimit = threadData.AllocContextLimit.ToClrDataAddress(_target); 4312TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4313data->context = appDomain.ToClrDataAddress(_target); 4314data->domain = appDomain.ToClrDataAddress(_target); 4317data->pFrame = threadData.Frame.ToClrDataAddress(_target); 4318data->firstNestedException = threadData.FirstNestedException.ToClrDataAddress(_target); 4320data->lastThrownObjectHandle = threadData.LastThrownObjectHandle.ToClrDataAddress(_target); 4321data->nextThread = threadData.NextThread.ToClrDataAddress(_target); 4362TargetPointer threadPtr = _target.Contracts.Thread.IdToThread(thinLockId); 4363*pThread = threadPtr.ToClrDataAddress(_target); 4422Contracts.IThread thread = _target.Contracts.Thread; 4425data->firstThread = threadStoreData.FirstThread.ToClrDataAddress(_target); 4426data->finalizerThread = threadStoreData.FinalizerThread.ToClrDataAddress(_target); 4427data->gcThread = threadStoreData.GCThread.ToClrDataAddress(_target); 4472uint TlsIndexBase = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.TlsIndexBase)); 4473uint OffsetOfCurrentThreadInfo = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.OffsetOfCurrentThreadInfo)); 4502Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 4503data->ArrayMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Array).ToClrDataAddress(_target); 4504data->StringMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.String).ToClrDataAddress(_target); 4505data->ObjectMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Object).ToClrDataAddress(_target); 4506data->ExceptionMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Exception).ToClrDataAddress(_target); 4507data->FreeMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Free).ToClrDataAddress(_target); 4629IExecutionManager executionManager = _target.Contracts.ExecutionManager; 4631CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 4655ehInfo.moduleAddr = clause.ModuleAddr is TargetPointer moduleAddr ? moduleAddr.ToClrDataAddress(_target) : 0; 4656ehInfo.mtCatch = clause.TypeHandle is TargetNUInt th ? new TargetPointer(th.Value).ToClrDataAddress(_target) : 0; 4731Contracts.ILoader loader = _target.Contracts.Loader; 4766int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 4810Contracts.ILoader loader = _target.Contracts.Loader; 4811TargetPointer moduleAddrPtr = moduleAddr.ToTargetPointer(_target); 4828pCallback(index, element.ToClrDataAddress(_target).Value, token); 4838Dictionary<ulong, uint> expectedElements = elements.ToDictionary(tuple => tuple.Address.ToClrDataAddress(_target).Value, tuple => tuple.Index); 4876Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 4877TargetPointer listPtr = cleanupListPtr.ToTargetPointer(_target); 4883info.RCW.ToClrDataAddress(_target).Value, 4884info.Context.ToClrDataAddress(_target).Value, 4885info.STAThread.ToClrDataAddress(_target).Value, 4897Dictionary<ulong, ulong> expectedElements = cleanupInfos.ToDictionary(info => info.RCW.ToClrDataAddress(_target).Value, info => info.Context.ToClrDataAddress(_target).Value); 4920Contracts.ILoader loader = _target.Contracts.Loader; 4969Contracts.IException contract = _target.Contracts.Exception; 4970Contracts.ExceptionData exceptionData = contract.GetExceptionData(objectAddress.ToTargetPointer(_target)); 4971data->Message = exceptionData.Message.ToClrDataAddress(_target); 4972data->InnerException = exceptionData.InnerException.ToClrDataAddress(_target); 4973data->StackTrace = exceptionData.StackTrace.ToClrDataAddress(_target); 4974data->WatsonBuckets = exceptionData.WatsonBuckets.ToClrDataAddress(_target); 4975data->StackTraceString = exceptionData.StackTraceString.ToClrDataAddress(_target); 4976data->RemoteStackTraceString = exceptionData.RemoteStackTraceString.ToClrDataAddress(_target); 4998if (!_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop)) 5034IGC gc = _target.Contracts.GC; 5042GCHeapData heapData = gc.GetHeapData(interestingInfoAddr.ToTargetPointer(_target)); 5076IGC gc = _target.Contracts.GC; 5182IGC gc = _target.Contracts.GC; 5231_target.TryReadGlobal<uint>(Constants.Globals.MaxClrNotificationArgs, out uint? maxArgs); 5236TargetPointer basePtr = _target.ReadGlobalPointer(Constants.Globals.ClrNotificationArguments); 5237if (_target.ReadNUInt(basePtr).Value == 0) 5242arguments[i] = _target.ReadNUInt(basePtr.Value + (ulong)(i * _target.PointerSize)).Value; 5288ILoader loader = _target.Contracts.Loader; 5289ICodeVersions codeVersions = _target.Contracts.CodeVersions; 5290IReJIT rejitContract = _target.Contracts.ReJIT; 5291TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5298IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 5316TargetCodePointer nativeCode = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeVersions.GetNativeCode(nativeCodeVersionHandle)); 5317TargetPointer nativeCodeAddr = nativeCode.ToAddress(_target); 5318nativeCodeAddrs[count].nativeCodeAddr = nativeCodeAddr.ToClrDataAddress(_target); 5319nativeCodeAddrs[count].nativeCodeVersionNodePtr = nativeCodeVersionHandle.CodeVersionNodeAddress.ToClrDataAddress(_target); 5415Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 5416ILoader loaderContract = _target.Contracts.Loader; 5417Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5426data->LoaderAllocatorObjectHandle = loaderAllocatorHandle.ToClrDataAddress(_target); 5459Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 5460Contracts.ICodeVersions codeVersionsContract = _target.Contracts.CodeVersions; 5461TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5499ICodeVersions cv = _target.Contracts.CodeVersions; 5500IReJIT rejitContract = _target.Contracts.ReJIT; 5501TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5524pRejitData->il = cv.GetIL(ilCodeVersion).ToClrDataAddress(_target); 5526pRejitData->ilCodeVersionNodePtr = ilCodeVersion.ILCodeVersionNode.ToClrDataAddress(_target); 5563Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5564Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5565Contracts.ILoader loader = _target.Contracts.Loader; 5566Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5567TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5589pILData->il = il.ToClrDataAddress(_target); 5620Contracts.ILoader loader = _target.Contracts.Loader; 5621Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5622Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5623Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5625TargetPointer modulePtr = mod.ToTargetPointer(_target); 5645methodDescs[*pcMethodDescs] = md.ToClrDataAddress(_target); 5691IGC gc = _target.Contracts.GC; 5726IGC gc = _target.Contracts.GC; 5746pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5747pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5748pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5749pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5795IGC gc = _target.Contracts.GC; 5814pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 5857IGC gc = _target.Contracts.GC; 5862GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5877pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5878pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5879pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5880pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5926IGC gc = _target.Contracts.GC; 5931GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5945pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 5989Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 5990Contracts.ILoader loaderContract = _target.Contracts.Loader; 5991Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 5994*assemblyLoadContext = alc.ToClrDataAddress(_target); 6019int version = _target.ReadGlobal<byte>(Constants.Globals.SOSBreakingChangeVersion); 6046Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6047TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6053*rcw = rcwObj.ToClrDataAddress(_target) | _rcwMask; 6071mowList![i] = comIdentity.ToClrDataAddress(_target); 6110Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6116TargetPointer ccwPtr = comWrappersContract.GetManagedObjectWrapperFromCCW(ccw.ToTargetPointer(_target)); 6146TargetPointer ccwPtr = ccw.ToTargetPointer(_target); 6147Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6155*managedObject = comWrappersContract.GetComWrappersObjectFromMOW(managedObjectPtr).ToClrDataAddress(_target); 6188Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6197TargetPointer rcwPtr = rcw.ToTargetPointer(_target) & ~_rcwMask; 6226Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6233TargetPointer identityPtr = comWrappersContract.GetComWrappersIdentity(rcw.ToTargetPointer(_target) & ~_rcwMask); 6234*identity = identityPtr.ToClrDataAddress(_target); 6269TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6270Contracts.IObject objectContract = _target.Contracts.Object; 6276Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6283if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6322TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6323if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6328*taggedMemory = taggedMemoryPtr.ToClrDataAddress(_target); 6365Contracts.IGC gcContract = _target.Contracts.GC; 6367*allocPtr = pointer.ToClrDataAddress(_target); 6368*allocLimit = limit.ToClrDataAddress(_target); 6397int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 6432Contracts.ILoader contract = _target.Contracts.Loader; 6434*pLoaderAllocator = globalLoaderAllocator.ToClrDataAddress(_target); 6494Target.TypeInfo laType = _target.GetTypeInfo(DataType.LoaderAllocator); 6495Target.TypeInfo vcsType = _target.GetTypeInfo(DataType.VirtualCallStubManager); 6566Contracts.ILoader contract = _target.Contracts.Loader; 6567IReadOnlyDictionary<LoaderAllocatorHeapType, TargetPointer> heaps = contract.GetLoaderAllocatorHeaps(loaderAllocator.ToTargetPointer(_target)); 6583? heapAddr.ToClrDataAddress(_target) 6625IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetHandleTableMemoryRegions(); 6636ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6650IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCBookkeepingMemoryRegions(); 6661ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6675IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCFreeRegions(); 6686ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6697_target.Flush(FlushScope.All); 6718Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6719Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6721*GCStaticsAddress = rtsContract.GetGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6723*nonGCStaticsAddress = rtsContract.GetNonGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6757Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6758TargetPointer methodTablePtr = methodTable.ToTargetPointer(_target); 6759TargetPointer threadPtr = thread.ToTargetPointer(_target); 6772*GCStaticsAddress = rtsContract.GetGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6774*nonGCStaticsAddress = rtsContract.GetNonGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6812Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6813Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 7032IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 7033TypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target)); 7046enumerator.Interface = new SOSMethodEnum(_target, methodTableHandle, legacyMethodEnum); 7067IGC gc = _target.Contracts.GC; 7263Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7290Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7299ThreadLogAddress = t.Address.ToClrDataAddress(_target), 7320Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7330if (thread.Address == threadStressLogAddress.ToTargetPointer(_target)) 7341ppEnum.Interface = new SOSStressLogMsgEnum(_target, messages);
SOSDacImpl.IXCLRDataProcess.cs (42)
24_target.Flush(FlushScope.All); 45Contracts.IThread contract = _target.Contracts.Thread; 73task.Interface = new ClrDataTask(matchingThread, _target, legacyTask); 112TargetCodePointer codeAddr = address.ToTargetCodePointer(_target); 115if (!_target.TryRead(codeAddr, out byte _)) 118IExecutionManager eman = _target.Contracts.ExecutionManager; 125IPrecodeStubs precodeStubs = _target.Contracts.PrecodeStubs; 131*displacement = codeAddr.ToAddress(_target).Value - entryPoint; 132IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 135TypeNameBuilder.AppendMethodInternal(_target, sb, mdh, TypeNameFormat.FormatSignature 149if (resultName is null && _target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(address.ToTargetPointer(_target), out string? auxSymbolName)) 458TargetCodePointer methodAddr = address.ToTargetCodePointer(_target); 462bool isTriviallyReadable = _target.TryRead(methodAddr, out byte _); 466IExecutionManager eman = _target.Contracts.ExecutionManager; 470EnumMethodInstances emi = new(_target, methodDesc, TargetPointer.Null); 533method.Interface = new ClrDataMethodInstance(_target, methodDesc, emi._appDomain, legacyMethod); 623INotifications notifications = _target.Contracts.Notifications; 635_legacyImpl.GetModule(moduleLoad.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 639notify.OnModuleLoaded(new ClrDataModule(moduleLoad.ModuleAddress, _target, legacyModule)); 649_legacyImpl.GetModule(moduleUnload.ModuleAddress.ToClrDataAddress(_target), legacyModuleOut); 653notify.OnModuleUnloaded(new ClrDataModule(moduleUnload.ModuleAddress, _target, legacyModule)); 659TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 661IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 664ClrDataMethodInstance methodInst = new(_target, methodDesc, appDomain, null); 668notify5.OnCodeGenerated2(methodInst, jit.NativeCodeAddress.ToClrDataAddress(_target)); 677IThread thread = _target.Contracts.Thread; 681_target, 720TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 721IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 723notify4.ExceptionCatcherEnter(new ClrDataMethodInstance(_target, methodDesc, appDomain, null), exceptionCatcherEnter.NativeOffset); 757hr = StressTestApi.CdacStressApi.HandleRequest(_target, reqCode, inBufferSize, inBuffer, outBufferSize, outBuffer); 813_target.Contracts.CodeNotifications.SetAllCodeNotifications(moduleAddr, CodeNotificationFlagsConverter.FromCom(flags)); 851ICodeNotifications codeNotif = _target.Contracts.CodeNotifications; 943_target.Contracts.CodeNotifications.SetCodeNotification(moduleAddr, tokens[i], CodeNotificationFlagsConverter.FromCom(f)); 962*flags = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags)); 993TargetPointer dacNotificationFlags = _target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags); 994_target.Write<uint>(dacNotificationFlags, flags); 1012flagsLocal = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags)); 1086_target.Contracts.Notifications.SetGcNotification(gcEvtArgs.condemnedGeneration);