1 write to _target
Microsoft.Diagnostics.DataContractReader.Legacy (1)
SOSDacImpl.cs (1)
66_target = target;
503 references to _target
Microsoft.Diagnostics.DataContractReader.Legacy (503)
SOSDacImpl.cs (461)
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); 723if (_target.Contracts.RuntimeInfo.GetTargetOperatingSystem() != RuntimeInfoOperatingSystem.Windows) 729buckets = _target.Contracts.WindowsErrorReporting.GetWatsonBuckets(thread.ToTargetPointer(_target)); 748int sizeOfGenericModeBlock = (int)_target.ReadGlobal<uint>(Constants.Globals.SizeOfGenericModeBlock); 772IExecutionManager eman = _target.Contracts.ExecutionManager; 773IGCInfo gcInfo = _target.Contracts.GCInfo; 775TargetCodePointer targetCodePointer = ip.ToTargetCodePointer(_target); 781data->MethodDescPtr = methodDesc.ToClrDataAddress(_target); 792data->MethodDescPtr = eman.GetMethodDesc(cbh).ToClrDataAddress(_target); 804data->GCInfo = pGcInfo.ToClrDataAddress(_target); 820data->ColdRegionStart = coldRegionStart.ToClrDataAddress(_target); 857IExecutionManager em = _target.Contracts.ExecutionManager; 860Debug.Assert(jitManager.ToTargetPointer(_target) == jitManagerInfo.ManagerAddress); 874codeHeaps[i].LoaderHeap = loader.LoaderHeapAddress.ToClrDataAddress(_target); 878codeHeaps[i].baseAddr = host.BaseAddress.ToClrDataAddress(_target); 879codeHeaps[i].currentAddr = host.CurrentAddress.ToClrDataAddress(_target); 1058IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 1059IEcmaMetadata ecmaMetadataContract = _target.Contracts.EcmaMetadata; 1061TargetPointer fieldDescTargetPtr = fieldDesc.ToTargetPointer(_target); 1072Contracts.ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 1088data->MTOfType = rtsContract.GetPrimitiveType(CorElementType.U).Address.ToClrDataAddress(_target); 1091data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1096data->MTOfType = paramTypeHandle.Address.ToClrDataAddress(_target); 1099data->MTOfType = foundTypeHandle.Address.ToClrDataAddress(_target); 1136data->ModuleOfType = modulePtr.ToClrDataAddress(_target); 1138data->MTOfEnclosingClass = ctx.Address.ToClrDataAddress(_target); 1144? nextFieldDesc.ToClrDataAddress(_target) 1187IStackWalk stackWalk = _target.Contracts.StackWalk; 1237IGC gc = _target.Contracts.GC; 1281IGC gc = _target.Contracts.GC; 1302heaps[i] = gcHeaps[(int)i].ToClrDataAddress(_target); 1346IGC gc = _target.Contracts.GC; 1353GCHeapData heapData = gc.GetHeapData(heap.ToTargetPointer(_target)); 1358details->lowest_address = minAddress.ToClrDataAddress(_target); 1359details->highest_address = maxAddress.ToClrDataAddress(_target); 1364details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1365details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1366details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1367details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1380details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1381details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1382details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1395details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1396details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1409details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1410details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1411details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1412details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1417details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1479IGC gc = _target.Contracts.GC; 1491details->lowest_address = minAddress.ToClrDataAddress(_target); 1492details->highest_address = maxAddress.ToClrDataAddress(_target); 1497details->mark_array = heapData.MarkArray.ToClrDataAddress(_target); 1498details->next_sweep_obj = heapData.NextSweepObject.ToClrDataAddress(_target); 1499details->background_saved_lowest_address = heapData.BackGroundSavedMinAddress.ToClrDataAddress(_target); 1500details->background_saved_highest_address = heapData.BackGroundSavedMaxAddress.ToClrDataAddress(_target); 1513details->alloc_allocated = heapData.AllocAllocated.ToClrDataAddress(_target); 1514details->ephemeral_heap_segment = heapData.EphemeralHeapSegment.ToClrDataAddress(_target); 1515details->card_table = heapData.CardTable.ToClrDataAddress(_target); 1528details->saved_sweep_ephemeral_seg = heapData.SavedSweepEphemeralSegment.ToClrDataAddress(_target); 1529details->saved_sweep_ephemeral_start = heapData.SavedSweepEphemeralStart.ToClrDataAddress(_target); 1542details->generation_table[i].start_segment = genData.StartSegment.ToClrDataAddress(_target); 1543details->generation_table[i].allocation_start = genData.AllocationStart.ToClrDataAddress(_target); 1544details->generation_table[i].allocContextPtr = genData.AllocationContextPointer.ToClrDataAddress(_target); 1545details->generation_table[i].allocContextLimit = genData.AllocationContextLimit.ToClrDataAddress(_target); 1550details->finalization_fill_pointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 1835IGC gc = _target.Contracts.GC; 1847ppHandleEnum.Interface = new SOSHandleEnum(_target, supportedHandleTypes, legacyHandleEnum); 1872IGC gc = _target.Contracts.GC; 1874ppHandleEnum.Interface = new SOSHandleEnum(_target, handleTypes, legacyHandleEnum); 1892IGC gc = _target.Contracts.GC; 1899GCHeapData heapData = gc.GetHeapData(addr.ToTargetPointer(_target)); 1902data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1937IGC gc = _target.Contracts.GC; 1948data->internal_root_array = (heapData.InternalRootArray ?? TargetPointer.Null).ToClrDataAddress(_target); 1983IGC gc = _target.Contracts.GC; 1985GCHeapSegmentData segmentData = gc.GetHeapSegmentData(seg.ToTargetPointer(_target)); 1988data->allocated = segmentData.Allocated.ToClrDataAddress(_target); 1989data->committed = segmentData.Committed.ToClrDataAddress(_target); 1990data->reserved = segmentData.Reserved.ToClrDataAddress(_target); 1991data->used = segmentData.Used.ToClrDataAddress(_target); 1992data->mem = segmentData.Mem.ToClrDataAddress(_target); 1993data->next = segmentData.Next.ToClrDataAddress(_target); 1994data->gc_heap = segmentData.Heap.ToClrDataAddress(_target); 1996data->background_allocated = segmentData.BackgroundAllocated.ToClrDataAddress(_target); 2004if (seg.ToTargetPointer(_target) == heapData.EphemeralHeapSegment) 2006data->highAllocMark = heapData.AllocAllocated.ToClrDataAddress(_target); 2067Contracts.ILoader loader = _target.Contracts.Loader; 2068TargetPointer module = moduleAddr.ToTargetPointer(_target); 2071*il = loader.GetILAddr(peAssemblyPtr, rva).ToClrDataAddress(_target); 2096if (!_target.Contracts.AuxiliarySymbols.TryGetAuxiliarySymbolName(ip.ToTargetPointer(_target), out string? symbolName)) 2141Contracts.JitManagerInfo jitManagerInfo = _target.Contracts.ExecutionManager.GetEEJitManagerInfo(); 2142managers->managerAddr = jitManagerInfo.ManagerAddress.ToClrDataAddress(_target); 2144managers->ptrHeapList = jitManagerInfo.HeapListAddress.ToClrDataAddress(_target); 2187=> 0x48 == _target.Read<byte>(pThunk) && 21880xB8 == _target.Read<byte>(pThunk + 1) && 21890xFF == _target.Read<byte>(pThunk + 10) && 21900xE0 == _target.Read<byte>(pThunk + 11); 2196return _target.ReadPointer(pThunk + 2); 2207if (_target.Contracts.RuntimeInfo.GetTargetArchitecture() != RuntimeInfoArchitecture.X64) 2210IPlatformAgnosticContext context = IPlatformAgnosticContext.GetContextForPlatform(_target); 2219*targetIP = DecodeJump64(pThunk).ToClrDataAddress(_target); 2262Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2264TargetPointer methodDesc = addr.ToTargetPointer(_target); 2266Contracts.ICodeVersions nativeCodeContract = _target.Contracts.CodeVersions; 2267Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 2282requestedNativeCodeVersion = nativeCodeContract.GetNativeCodeVersionForIP(ip.ToTargetCodePointer(_target)); 2301data->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCodeAddr).ToAddress(_target).ToClrDataAddress(_target); 2310data->AddressOfNativeCodeSlot = rtsContract.GetAddressOfNativeCodeSlot(methodDescHandle).ToClrDataAddress(_target); 2319data->MethodTablePtr = methodTableAddr.ToClrDataAddress(_target); 2321data->ModulePtr = rtsContract.GetModule(typeHandle).ToClrDataAddress(_target); 2360int cJittedRejitVersions = rejitContract.GetRejitIds(_target, methodDescHandle.Address).Count(); 2379List<TargetNUInt> reJitIds = rejitContract.GetRejitIds(_target, methodDescHandle.Address).ToList(); 2422data->GCStressCodeCopy = nativeCodeContract.GetGCStressCodeCopy(requestedNativeCodeVersion).ToClrDataAddress(_target); 2507ICodeVersions cv = _target.Contracts.CodeVersions; 2508IReJIT rejit = _target.Contracts.ReJIT; 2514pReJitData->NativeCodeAddr = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCode).Value; 2550Contracts.ILoader loader = _target.Contracts.Loader; 2551TargetPointer module = moduleAddr.ToTargetPointer(_target); 2557*methodDesc = loader.GetModuleLookupMapElement(lookupTables.FieldDefToDesc, token, out var _).ToClrDataAddress(_target); 2560*methodDesc = loader.GetModuleLookupMapElement(lookupTables.MethodDefToDesc, token, out var _).ToClrDataAddress(_target); 2563*methodDesc = loader.GetModuleLookupMapElement(lookupTables.TypeDefToMethodTable, token, out var _).ToClrDataAddress(_target); 2566*methodDesc = loader.GetModuleLookupMapElement(lookupTables.TypeRefToMethodTable, token, out var _).ToClrDataAddress(_target); 2599TargetPointer methodDesc = addr.ToTargetPointer(_target); 2601Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2605TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatSignature | TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2615TypeNameBuilder.AppendMethodInternal(_target, stringBuilder, methodDescHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2620string? fallbackNameString = _target.Contracts.DacStreams.StringFromEEAddress(methodDesc); 2630Contracts.ModuleHandle module = _target.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr); 2631string modulePath = _target.Contracts.Loader.GetPath(module); 2633char directorySeparator = (char)_target.ReadGlobal<byte>(Constants.Globals.DirectorySeparator); 2687Contracts.IStackWalk stackWalkContract = _target.Contracts.StackWalk; 2688TargetPointer methodDescPtr = stackWalkContract.GetMethodDescPtr(frameAddr.ToTargetPointer(_target)); 2692_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDescPtr); // validation 2693*ppMD = methodDescPtr.ToClrDataAddress(_target); 2722IExecutionManager executionManager = _target.Contracts.ExecutionManager; 2723IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 2725CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 2737*ppMD = methodDescAddr.ToClrDataAddress(_target); 2775_target.Contracts.RuntimeTypeSystem.GetMethodDescHandle(methodDesc.ToTargetPointer(_target)); 2795Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2796Contracts.TypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2813result.module = contract.GetModule(methodTable).ToClrDataAddress(_target); 2815result.klass = contract.GetCanonicalMethodTable(methodTable).ToClrDataAddress(_target); 2816result.parentMethodTable = contract.GetParentMethodTable(methodTable).ToClrDataAddress(_target); 2867TargetPointer mtAddress = mt.ToTargetPointer(_target); 2868Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 2870data->FirstField = rtsContract.GetFieldDescList(typeHandle).FirstOrDefault().ToClrDataAddress(_target); 2908Contracts.IRuntimeTypeSystem contract = _target.Contracts.RuntimeTypeSystem; 2909Contracts.TypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2910*value = methodTableHandle.Address.ToClrDataAddress(_target); 2937Contracts.IRuntimeTypeSystem typeSystemContract = _target.Contracts.RuntimeTypeSystem; 2938Contracts.ILoader loader = _target.Contracts.Loader; 2939Contracts.TypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 2957TypeNameBuilder.AppendType(_target, methodTableName, methodTableHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 2961string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt.ToTargetPointer(_target)); 3003IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3010TargetPointer methodTable = mt.ToTargetPointer(_target); 3017*value = rts.GetSlot(methodTableHandle, slot).ToClrDataAddress(_target); 3031*value = rts.GetMethodEntryPointIfExists(mdHandle).ToClrDataAddress(_target); 3078_target.Contracts.RuntimeTypeSystem.GetTypeHandle(mt.ToTargetPointer(_target)); 3103mod.Interface = new ClrDataModule(addr.ToTargetPointer(_target), _target, legacyModule); 3115Contracts.ILoader contract = _target.Contracts.Loader; 3116Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(moduleAddr.ToTargetPointer(_target)); 3120data->Assembly = contract.GetAssembly(handle).ToClrDataAddress(_target); 3128data->ilBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3132TargetSpan readOnlyMetadata = _target.Contracts.EcmaMetadata.GetReadOnlyMetadataAddress(handle); 3144data->LoaderAllocator = contract.GetLoaderAllocator(handle).ToClrDataAddress(_target); 3147data->FieldDefToDescMap = ReadMapBase(_target, tables.FieldDefToDesc, tables.TableDataOffset); 3148data->ManifestModuleReferencesMap = ReadMapBase(_target, tables.ManifestModuleReferences, tables.TableDataOffset); 3149data->MemberRefToDescMap = ReadMapBase(_target, tables.MemberRefToDesc, tables.TableDataOffset); 3150data->MethodDefToDescMap = ReadMapBase(_target, tables.MethodDefToDesc, tables.TableDataOffset); 3151data->TypeDefToMethodTableMap = ReadMapBase(_target, tables.TypeDefToMethodTable, tables.TableDataOffset); 3152data->TypeRefToMethodTableMap = ReadMapBase(_target, tables.TypeRefToMethodTable, tables.TableDataOffset); 3211Contracts.IException contract = _target.Contracts.Exception; 3213exception.ToTargetPointer(_target), 3216*exceptionObject = exceptionObjectLocal.ToClrDataAddress(_target); 3249Contracts.IObject objectContract = _target.Contracts.Object; 3250Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 3251Contracts.ILoader loader = _target.Contracts.Loader; 3253TargetPointer mt = objectContract.GetMethodTableAddress(obj.ToTargetPointer(_target)); 3273TypeNameBuilder.AppendType(_target, classNameBuilder, typeHandle, TypeNameFormat.FormatNamespace | TypeNameFormat.FormatFullInst); 3277string? fallbackName = _target.Contracts.DacStreams.StringFromEEAddress(mt); 3321Contracts.IObject objectContract = _target.Contracts.Object; 3322Contracts.IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 3324TargetPointer objPtr = objAddr.ToTargetPointer(_target); 3328data->MethodTable = mt.ToClrDataAddress(_target); 3338Target.TypeInfo arrayTypeInfo = _target.GetTypeInfo(DataType.Array); 3340data->Size += _target.Read<uint>(objAddr + numComponentsOffset) * data->dwComponentSize; 3359data->ArrayDataPtr = arrayData.ToClrDataAddress(_target); 3361data->ArrayBoundsPtr = boundsStart.ToClrDataAddress(_target); 3362data->ArrayLowerBoundsPtr = lowerBounds.ToClrDataAddress(_target); 3384if (_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop) 3431Contracts.IObject contract = _target.Contracts.Object; 3432string str = contract.GetStringValue(obj.ToTargetPointer(_target)); 3478IGC gc = _target.Contracts.GC; 3485GCOomData oomData = gc.GetOomData(oomAddr.ToTargetPointer(_target)); 3529IGC gc = _target.Contracts.GC; 3578Contracts.ILoader contract = _target.Contracts.Loader; 3579Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3584*peBase = contract.GetILBase(handle).ToClrDataAddress(_target); 3617Contracts.ILoader contract = _target.Contracts.Loader; 3618Contracts.ModuleHandle handle = contract.GetModuleHandleFromModulePtr(addr.ToTargetPointer(_target)); 3680IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3682TargetPointer rcwPtr = addr.ToTargetPointer(_target); 3685data->identityPointer = rcwData.IdentityPointer.ToClrDataAddress(_target); 3686data->unknownPointer = rcwData.UnknownPointer.ToClrDataAddress(_target); 3687data->managedObject = rcwData.ManagedObject.ToClrDataAddress(_target); 3688data->vtablePtr = rcwData.VTablePtr.ToClrDataAddress(_target); 3689data->creatorThread = rcwData.CreatorThread.ToClrDataAddress(_target); 3690data->ctxCookie = rcwData.CtxCookie.ToClrDataAddress(_target); 3740TargetPointer rcwPtr = rcw.ToTargetPointer(_target); 3741IBuiltInCOM builtInCom = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 3772interfaces[itemIndex].methodTable = methodTable.ToClrDataAddress(_target); 3773interfaces[itemIndex].interfacePtr = unknown.ToClrDataAddress(_target); 3774interfaces[itemIndex].comContext = ctxCookie.ToClrDataAddress(_target); 3824string[] regs = _target.Contracts.RuntimeInfo.GetTargetArchitecture() switch 3940Contracts.IThread contract = _target.Contracts.Thread; 3942contract.GetStackLimitData(threadPtr.ToTargetPointer(_target), out stackBase, out stackLimit, out frameAddress); 3945*lower = stackBase.ToClrDataAddress(_target); 3948*upper = stackLimit.ToClrDataAddress(_target); 3951*fp = frameAddress.ToClrDataAddress(_target); 4043IThread threadContract = _target.Contracts.Thread; 4044IStackWalk stackWalkContract = _target.Contracts.StackWalk; 4111ulong stressLogAddress = _target.ReadGlobalPointer(Constants.Globals.StressLog); 4134ISyncBlock syncBlockContract = _target.Contracts.SyncBlock; 4142syncBlockPtr = addr.ToTargetPointer(_target); 4147data->SyncBlockPointer = syncBlockPtr.ToClrDataAddress(_target); 4148data->nextSyncBlock = syncBlockContract.GetNextSyncBlock(syncBlockPtr).ToClrDataAddress(_target); 4151data->blockRCW = rcw.ToClrDataAddress(_target); 4152data->blockClassFactory = ccf.ToClrDataAddress(_target); 4153data->blockCCW = ccw.ToClrDataAddress(_target); 4195ISyncBlock syncBlock = _target.Contracts.SyncBlock; 4204data->Object = obj.ToClrDataAddress(_target); 4207data->SyncBlockPointer = syncBlockAddr.ToClrDataAddress(_target); 4219IThread thread = _target.Contracts.Thread; 4221data->HoldingThread = threadPtr.ToClrDataAddress(_target); 4224TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4225data->appDomainPtr = appDomain.ToClrDataAddress(_target); 4274Contracts.IThread contract = _target.Contracts.Thread; 4275contract.GetThreadAllocContext(thread.ToTargetPointer(_target), out long allocBytes, out long allocBytesLoh); 4307Contracts.IThread contract = _target.Contracts.Thread; 4308Contracts.ThreadData threadData = contract.GetThreadData(thread.ToTargetPointer(_target)); 4313data->allocContextPtr = threadData.AllocContextPointer.ToClrDataAddress(_target); 4314data->allocContextLimit = threadData.AllocContextLimit.ToClrDataAddress(_target); 4317TargetPointer appDomain = _target.Contracts.Loader.GetAppDomain(); 4318data->context = appDomain.ToClrDataAddress(_target); 4319data->domain = appDomain.ToClrDataAddress(_target); 4322data->pFrame = threadData.Frame.ToClrDataAddress(_target); 4323data->firstNestedException = threadData.FirstNestedException.ToClrDataAddress(_target); 4325data->lastThrownObjectHandle = threadData.LastThrownObjectHandle.ToClrDataAddress(_target); 4326data->nextThread = threadData.NextThread.ToClrDataAddress(_target); 4372TargetPointer threadPtr = _target.Contracts.Thread.IdToThread(thinLockId); 4373*pThread = threadPtr.ToClrDataAddress(_target); 4432Contracts.IThread thread = _target.Contracts.Thread; 4435data->firstThread = threadStoreData.FirstThread.ToClrDataAddress(_target); 4436data->finalizerThread = threadStoreData.FinalizerThread.ToClrDataAddress(_target); 4437data->gcThread = threadStoreData.GCThread.ToClrDataAddress(_target); 4482uint TlsIndexBase = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.TlsIndexBase)); 4483uint OffsetOfCurrentThreadInfo = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.OffsetOfCurrentThreadInfo)); 4512Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 4513data->ArrayMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Array).ToClrDataAddress(_target); 4514data->StringMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.String).ToClrDataAddress(_target); 4515data->ObjectMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Object).ToClrDataAddress(_target); 4516data->ExceptionMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Exception).ToClrDataAddress(_target); 4517data->FreeMethodTable = rts.GetWellKnownMethodTable(Contracts.WellKnownMethodTable.Free).ToClrDataAddress(_target); 4639IExecutionManager executionManager = _target.Contracts.ExecutionManager; 4641CodeBlockHandle? handle = executionManager.GetCodeBlockHandle(ip.ToTargetCodePointer(_target)); 4665ehInfo.moduleAddr = clause.ModuleAddr is TargetPointer moduleAddr ? moduleAddr.ToClrDataAddress(_target) : 0; 4666ehInfo.mtCatch = clause.TypeHandle is TargetNUInt th ? new TargetPointer(th.Value).ToClrDataAddress(_target) : 0; 4741Contracts.ILoader loader = _target.Contracts.Loader; 4776int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 4820Contracts.ILoader loader = _target.Contracts.Loader; 4821TargetPointer moduleAddrPtr = moduleAddr.ToTargetPointer(_target); 4838pCallback(index, element.ToClrDataAddress(_target).Value, token); 4848Dictionary<ulong, uint> expectedElements = elements.ToDictionary(tuple => tuple.Address.ToClrDataAddress(_target).Value, tuple => tuple.Index); 4886Contracts.IBuiltInCOM contract = _target.Contracts.BuiltInCOM; // E_NOTIMPL if not defined (non-Windows) 4887TargetPointer listPtr = cleanupListPtr.ToTargetPointer(_target); 4893info.RCW.ToClrDataAddress(_target).Value, 4894info.Context.ToClrDataAddress(_target).Value, 4895info.STAThread.ToClrDataAddress(_target).Value, 4907Dictionary<ulong, ulong> expectedElements = cleanupInfos.ToDictionary(info => info.RCW.ToClrDataAddress(_target).Value, info => info.Context.ToClrDataAddress(_target).Value); 4930Contracts.ILoader loader = _target.Contracts.Loader; 4979Contracts.IException contract = _target.Contracts.Exception; 4980Contracts.ExceptionData exceptionData = contract.GetExceptionData(objectAddress.ToTargetPointer(_target)); 4981data->Message = exceptionData.Message.ToClrDataAddress(_target); 4982data->InnerException = exceptionData.InnerException.ToClrDataAddress(_target); 4983data->StackTrace = exceptionData.StackTrace.ToClrDataAddress(_target); 4984data->WatsonBuckets = exceptionData.WatsonBuckets.ToClrDataAddress(_target); 4985data->StackTraceString = exceptionData.StackTraceString.ToClrDataAddress(_target); 4986data->RemoteStackTraceString = exceptionData.RemoteStackTraceString.ToClrDataAddress(_target); 5008if (!_target.Contracts.FeatureFlags.IsEnabled(Contracts.RuntimeFeature.COMInterop)) 5044IGC gc = _target.Contracts.GC; 5052GCHeapData heapData = gc.GetHeapData(interestingInfoAddr.ToTargetPointer(_target)); 5086IGC gc = _target.Contracts.GC; 5192IGC gc = _target.Contracts.GC; 5241_target.TryReadGlobal<uint>(Constants.Globals.MaxClrNotificationArgs, out uint? maxArgs); 5246TargetPointer basePtr = _target.ReadGlobalPointer(Constants.Globals.ClrNotificationArguments); 5247if (_target.ReadNUInt(basePtr).Value == 0) 5252arguments[i] = _target.ReadNUInt(basePtr.Value + (ulong)(i * _target.PointerSize)).Value; 5298ILoader loader = _target.Contracts.Loader; 5299ICodeVersions codeVersions = _target.Contracts.CodeVersions; 5300IReJIT rejitContract = _target.Contracts.ReJIT; 5301TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5308IRuntimeTypeSystem runtimeTypeSystemContract = _target.Contracts.RuntimeTypeSystem; 5326TargetCodePointer nativeCode = _target.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(codeVersions.GetNativeCode(nativeCodeVersionHandle)); 5327TargetPointer nativeCodeAddr = nativeCode.ToAddress(_target); 5328nativeCodeAddrs[count].nativeCodeAddr = nativeCodeAddr.ToClrDataAddress(_target); 5329nativeCodeAddrs[count].nativeCodeVersionNodePtr = nativeCodeVersionHandle.CodeVersionNodeAddress.ToClrDataAddress(_target); 5425Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 5426ILoader loaderContract = _target.Contracts.Loader; 5427Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5436data->LoaderAllocatorObjectHandle = loaderAllocatorHandle.ToClrDataAddress(_target); 5469Contracts.IReJIT rejitContract = _target.Contracts.ReJIT; 5470Contracts.ICodeVersions codeVersionsContract = _target.Contracts.CodeVersions; 5471TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5509ICodeVersions cv = _target.Contracts.CodeVersions; 5510IReJIT rejitContract = _target.Contracts.ReJIT; 5511TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5534pRejitData->il = cv.GetIL(ilCodeVersion).ToClrDataAddress(_target); 5536pRejitData->ilCodeVersionNodePtr = ilCodeVersion.ILCodeVersionNode.ToClrDataAddress(_target); 5573Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5574Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5575Contracts.ILoader loader = _target.Contracts.Loader; 5576Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5577TargetPointer methodDescPtr = methodDesc.ToTargetPointer(_target); 5599pILData->il = il.ToClrDataAddress(_target); 5630Contracts.ILoader loader = _target.Contracts.Loader; 5631Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 5632Contracts.IReJIT rejit = _target.Contracts.ReJIT; 5633Contracts.ICodeVersions cv = _target.Contracts.CodeVersions; 5635TargetPointer modulePtr = mod.ToTargetPointer(_target); 5655methodDescs[*pcMethodDescs] = md.ToClrDataAddress(_target); 5701IGC gc = _target.Contracts.GC; 5736IGC gc = _target.Contracts.GC; 5756pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5757pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5758pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5759pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5805IGC gc = _target.Contracts.GC; 5824pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 5867IGC gc = _target.Contracts.GC; 5872GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5887pGenerationData[i].start_segment = gen.StartSegment.ToClrDataAddress(_target); 5888pGenerationData[i].allocation_start = gen.AllocationStart.ToClrDataAddress(_target); 5889pGenerationData[i].allocContextPtr = gen.AllocationContextPointer.ToClrDataAddress(_target); 5890pGenerationData[i].allocContextLimit = gen.AllocationContextLimit.ToClrDataAddress(_target); 5936IGC gc = _target.Contracts.GC; 5941GCHeapData heapData = gc.GetHeapData(heapAddr.ToTargetPointer(_target)); 5955pFinalizationFillPointers[i] = heapData.FillPointers[i].ToClrDataAddress(_target); 5999Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6000Contracts.ILoader loaderContract = _target.Contracts.Loader; 6001Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6004*assemblyLoadContext = alc.ToClrDataAddress(_target); 6029int version = _target.ReadGlobal<byte>(Constants.Globals.SOSBreakingChangeVersion); 6056Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6057TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6063*rcw = rcwObj.ToClrDataAddress(_target) | _rcwMask; 6081mowList![i] = comIdentity.ToClrDataAddress(_target); 6120Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6126TargetPointer ccwPtr = comWrappersContract.GetManagedObjectWrapperFromCCW(ccw.ToTargetPointer(_target)); 6156TargetPointer ccwPtr = ccw.ToTargetPointer(_target); 6157Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6165*managedObject = comWrappersContract.GetComWrappersObjectFromMOW(managedObjectPtr).ToClrDataAddress(_target); 6198Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6207TargetPointer rcwPtr = rcw.ToTargetPointer(_target) & ~_rcwMask; 6236Contracts.IComWrappers comWrappersContract = _target.Contracts.ComWrappers; 6243TargetPointer identityPtr = comWrappersContract.GetComWrappersIdentity(rcw.ToTargetPointer(_target) & ~_rcwMask); 6244*identity = identityPtr.ToClrDataAddress(_target); 6279TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6280Contracts.IObject objectContract = _target.Contracts.Object; 6286Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6293if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6332TargetPointer objPtr = objAddr.ToTargetPointer(_target); 6333if (_target.Contracts.TryGetContract<IObjectiveCMarshal>(out IObjectiveCMarshal? objcContract)) 6338*taggedMemory = taggedMemoryPtr.ToClrDataAddress(_target); 6375Contracts.IGC gcContract = _target.Contracts.GC; 6377*allocPtr = pointer.ToClrDataAddress(_target); 6378*allocLimit = limit.ToClrDataAddress(_target); 6407int hr = TraverseLoaderHeapCore(loaderHeapAddr.ToTargetPointer(_target), pCallback); 6442Contracts.ILoader contract = _target.Contracts.Loader; 6444*pLoaderAllocator = globalLoaderAllocator.ToClrDataAddress(_target); 6504Target.TypeInfo laType = _target.GetTypeInfo(DataType.LoaderAllocator); 6505Target.TypeInfo vcsType = _target.GetTypeInfo(DataType.VirtualCallStubManager); 6576Contracts.ILoader contract = _target.Contracts.Loader; 6577IReadOnlyDictionary<LoaderAllocatorHeapType, TargetPointer> heaps = contract.GetLoaderAllocatorHeaps(loaderAllocator.ToTargetPointer(_target)); 6593? heapAddr.ToClrDataAddress(_target) 6635IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetHandleTableMemoryRegions(); 6646ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6660IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCBookkeepingMemoryRegions(); 6671ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6685IReadOnlyList<GCMemoryRegionData> regions = _target.Contracts.GC.GetGCFreeRegions(); 6696ppEnum.Interface = new SOSMemoryEnum(_target, regions, legacyMemoryEnum); 6707_target.Flush(FlushScope.All); 6728Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6729Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6731*GCStaticsAddress = rtsContract.GetGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6733*nonGCStaticsAddress = rtsContract.GetNonGCStaticsBasePointer(typeHandle).ToClrDataAddress(_target); 6767Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6768TargetPointer methodTablePtr = methodTable.ToTargetPointer(_target); 6769TargetPointer threadPtr = thread.ToTargetPointer(_target); 6782*GCStaticsAddress = rtsContract.GetGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6784*nonGCStaticsAddress = rtsContract.GetNonGCThreadStaticsBasePointer(typeHandle, threadPtr).ToClrDataAddress(_target); 6822Contracts.IRuntimeTypeSystem rtsContract = _target.Contracts.RuntimeTypeSystem; 6823Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 7042IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem; 7043TypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target)); 7056enumerator.Interface = new SOSMethodEnum(_target, methodTableHandle, legacyMethodEnum); 7077IGC gc = _target.Contracts.GC; 7273Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7300Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7309ThreadLogAddress = t.Address.ToClrDataAddress(_target), 7330Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7334TargetPointer address = threadStressLogAddress.ToTargetPointer(_target); 7336ppEnum.Interface = new SOSStressLogMsgEnum(_target, messages); 7351Contracts.IStressLog stressLogContract = _target.Contracts.StressLog; 7360Start = r.Start.ToClrDataAddress(_target),
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);