1 write to _target
Microsoft.Diagnostics.DataContractReader.Legacy (1)
Dbi\DacDbiImpl.cs (1)
74
_target
= target;
235 references to _target
Microsoft.Diagnostics.DataContractReader.Legacy (235)
Dbi\DacDbiImpl.cs (234)
34
private ulong CorDBDefaultEnCFunctionVersion =>
_target
.ReadGlobalPointer(Constants.Globals.CorDBDefaultEnCFunctionVersion).Value;
58
if (!
_target
.TryReadGlobalPointer(Constants.Globals.ProfilerControlBlock, out TargetPointer? profControlBlockAddress))
61
Target.TypeInfo type =
_target
.GetTypeInfo(DataType.ProfControlBlock);
62
TargetPointer mainProfInterface =
_target
.ReadPointerField(profControlBlockAddress.Value, type, "MainProfilerProfInterface");
63
int notificationCount =
_target
.ReadField<int>(profControlBlockAddress.Value, type, "NotificationProfilerCount");
87
_target
.Flush(FlushScope.All);
139
*pResult =
_target
.Contracts.Debugger.TryGetDebuggerData(out Contracts.DebuggerData data) && data.IsLeftSideInitialized ? Interop.BOOL.TRUE : Interop.BOOL.FALSE;
192
string name =
_target
.Contracts.Loader.GetAppDomainFriendlyName();
216
Contracts.ILoader loader =
_target
.Contracts.Loader;
249
Contracts.ILoader loader =
_target
.Contracts.Loader;
290
Contracts.ILoader loader =
_target
.Contracts.Loader;
305
Contracts.IEcmaMetadata ecmaMetadata =
_target
.Contracts.EcmaMetadata;
315
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
370
Contracts.ILoader loader =
_target
.Contracts.Loader;
418
Contracts.ILoader loader =
_target
.Contracts.Loader;
421
Contracts.IEcmaMetadata ecmaMetadata =
_target
.Contracts.EcmaMetadata;
468
Contracts.ILoader loader =
_target
.Contracts.Loader;
471
byte[] blob =
_target
.Contracts.EcmaMetadata.GetReadWriteMetadata(handle);
505
Contracts.ILoader loader =
_target
.Contracts.Loader;
508
byte[] blob =
_target
.Contracts.EcmaMetadata.GetReadWriteMetadata(handle);
556
Contracts.ILoader loader =
_target
.Contracts.Loader;
600
Contracts.ILoader loader =
_target
.Contracts.Loader;
652
Contracts.ILoader loader =
_target
.Contracts.Loader;
691
IExecutionManager eman =
_target
.Contracts.ExecutionManager;
692
if (
_target
.TryRead(address, out byte _) && eman.GetCodeBlockHandle(address) is not null)
724
Contracts.ILoader loader =
_target
.Contracts.Loader;
761
Contracts.ILoader loader =
_target
.Contracts.Loader;
822
Contracts.ILoader loader =
_target
.Contracts.Loader;
871
_target
.Contracts.Debugger.RequestSyncAtEvent();
893
_target
.Contracts.Debugger.SetSendExceptionsOutsideOfJMC(sendExceptionsOutsideOfJMC != Interop.BOOL.FALSE);
915
Contracts.IDebugger debugger =
_target
.Contracts.Debugger;
947
Contracts.IDebugger debugger =
_target
.Contracts.Debugger;
996
IPlatformAgnosticContext ctx = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
998
if (!
_target
.TryGetThreadContext(dwThreadId, ctx.AllContextFlags, contextBuffer))
1012
int recordSize = ExceptionRecordFullSize(
_target
.PointerSize);
1017
TargetPointer espContext =
_target
.Contracts.Debugger.PrepareExceptionHijack(
1028
if (!
_target
.TrySetThreadContext(dwThreadId, contextBuffer))
1049
Contracts.IThread threadContract =
_target
.Contracts.Thread;
1105
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1131
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1158
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1188
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(threadPtr);
1189
_target
.Contracts.Thread.GetThreadAllocContext(threadPtr, out long allocBytes, out long allocBytesLoh);
1226
_target
.Contracts.Thread.SetDebuggerControlledThreadState(threadPtr, Contracts.DebuggerControlledThreadState.UserSuspend);
1230
_target
.Contracts.Thread.ResetDebuggerControlledThreadState(threadPtr, Contracts.DebuggerControlledThreadState.UserSuspend);
1258
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1293
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(threadPtr);
1295
IPlatformAgnosticContext context = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
1296
byte[] contextBytes =
_target
.Contracts.StackWalk.GetContext(threadData, ThreadContextSource.Debugger, context.FullContextFlags);
1298
if (!
_target
.Contracts.ExecutionManager.IsGcSafe(context.InstructionPointer))
1328
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(threadPtr);
1409
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1439
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1467
TargetPointer exceptionHandle =
_target
.Contracts.Thread.GetCurrentExceptionHandle(threadPtr);
1470
ThreadData data =
_target
.Contracts.Thread.GetThreadData(threadPtr);
1504
if (
_target
.Contracts.TryGetContract<IComWrappers>(out IComWrappers? comWrappers))
1509
comWrappersSuccess =
_target
.TryReadPointer(managedObjectWrapper, out objectHandle);
1513
if (!comWrappersSuccess &&
_target
.Contracts.TryGetContract<IBuiltInCOM>(out IBuiltInCOM? builtInCOM))
1550
Contracts.ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1577
TargetPointer defaultAppDomain =
_target
.Contracts.Loader.GetAppDomain();
1604
Contracts.ILoader loader =
_target
.Contracts.Loader;
1655
Contracts.IDebugInfo debugInfo =
_target
.Contracts.DebugInfo;
1721
Contracts.IThread threadContract =
_target
.Contracts.Thread;
1733
IStackWalk sw =
_target
.Contracts.StackWalk;
1761
uint contextSize = IPlatformAgnosticContext.GetContextForPlatform(
_target
).Size;
1814
IPlatformAgnosticContext ctx = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
1816
ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
1817
byte[] seedContext =
_target
.Contracts.StackWalk.GetContext(threadData, ThreadContextSource.Debugger, allFlags);
1820
handleData = new StackWalkHandleData(
_target
.Contracts.StackWalk, threadData);
1831
uint contextSize = IPlatformAgnosticContext.GetContextForPlatform(
_target
).Size;
1903
uint contextSize = IPlatformAgnosticContext.GetContextForPlatform(
_target
).Size;
2042
IPlatformAgnosticContext ctx = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
2047
_target
.Contracts.Thread.GetStackLimitData(new TargetPointer(vmThread), out TargetPointer stackBase, out TargetPointer stackLimit, out _);
2106
TargetCodePointer controlPC =
_target
.Contracts.StackWalk.GetInstructionPointer(handle);
2107
if (
_target
.Contracts.Debugger.GetHijackKind(controlPC) != HijackKind.None)
2205
IStackWalk sw =
_target
.Contracts.StackWalk;
2209
RuntimeInfoArchitecture arch =
_target
.Contracts.RuntimeInfo.GetTargetArchitecture();
2212
IPlatformAgnosticContext stripped = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
2230
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2231
IExecutionManager eman =
_target
.Contracts.ExecutionManager;
2232
TargetPointer currentAppDomain =
_target
.Contracts.Loader.GetAppDomain();
2239
data.fp =
_target
.Contracts.StackWalk.GetRuntimeFramePointer(handle).Value;
2251
TargetPointer mdPtr =
_target
.Contracts.StackWalk.GetMethodDescPtr(handle);
2262
data.v.exactGenericArgsToken =
_target
.Contracts.StackWalk.GetExactGenericArgsToken(handle).Value;
2279
TargetCodePointer controlPC =
_target
.Contracts.StackWalk.GetInstructionPointer(handle);
2303
data.v.jitFuncData.fpParentOrSelf =
_target
.Contracts.StackWalk.GetFuncletRootId(handle, out uint parentNativeOffset).Value;
2317
IExecutionManager eman =
_target
.Contracts.ExecutionManager;
2319
IGCInfo gcInfo =
_target
.Contracts.GCInfo;
2320
TargetCodePointer ip =
_target
.Contracts.StackWalk.GetInstructionPointer(handle);
2325
IStackWalk stackWalk =
_target
.Contracts.StackWalk;
2368
IStackWalk stackwalk =
_target
.Contracts.StackWalk;
2403
TargetPointer currentAppDomain =
_target
.Contracts.Loader.GetAppDomain();
2404
IStackWalk stackwalk =
_target
.Contracts.StackWalk;
2493
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2511
ILoader loader =
_target
.Contracts.Loader;
2545
IExecutionManager eman =
_target
.Contracts.ExecutionManager;
2588
IPlatformAgnosticContext leafCtx = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
2590
ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
2591
byte[] leafContext =
_target
.Contracts.StackWalk.GetContext(threadData, ThreadContextSource.None, allFlags);
2595
IPlatformAgnosticContext givenCtx = IPlatformAgnosticContext.GetContextForPlatform(
_target
);
2625
uint allFlags = IPlatformAgnosticContext.GetContextForPlatform(
_target
).AllContextFlags;
2626
ThreadData threadData =
_target
.Contracts.Thread.GetThreadData(new TargetPointer(vmThread));
2627
byte[] context =
_target
.Contracts.StackWalk.GetContext(threadData, ThreadContextSource.Debugger, allFlags);
2667
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2703
Contracts.ISignature signature =
_target
.Contracts.Signature;
2737
RuntimeInfoArchitecture arch =
_target
.Contracts.RuntimeInfo.GetTargetArchitecture();
2743
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2790
*pRetVal =
_target
.Contracts.Object.GetMethodTableAddress(new TargetPointer(rawToken)).Value;
2830
ILoader loader =
_target
.Contracts.Loader;
2833
MetadataReader mdReader =
_target
.Contracts.EcmaMetadata.GetMetadata(moduleHandle)
2849
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2861
int headerSize = HeaderReaderHelpers.GetHeaderSize(
_target
, headerPtr);
2862
int codeSize = HeaderReaderHelpers.GetCodeSize(
_target
, headerPtr);
2864
if (HeaderReaderHelpers.TryGetLocalVarSigToken(
_target
, headerPtr, out int localToken) && localToken != 0)
2903
ILoader loader =
_target
.Contracts.Loader;
2908
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
2920
pCodeInfo->vmNativeCodeMethodDescToken = methodDesc.ToClrDataAddress(
_target
);
2924
nativeCode =
_target
.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(nativeCode);
2925
pCodeInfo->hotRegion.pAddress = nativeCode.ToAddress(
_target
).ToClrDataAddress(
_target
);
2927
IExecutionManager executionManager =
_target
.Contracts.ExecutionManager;
2931
pCodeInfo->coldRegion.pAddress = coldStart.ToClrDataAddress(
_target
);
2935
if (
_target
.Contracts.TryGetContract(out ICodeVersions codeVersions))
2975
TargetCodePointer code = ((ClrDataAddress)codeAddress).ToTargetCodePointer(
_target
);
2978
code =
_target
.Contracts.PrecodeStubs.GetInterpreterCodeFromInterpreterPrecodeIfPresent(code);
2983
code = new TargetCodePointer(code.ToAddress(
_target
).Value);
2985
IExecutionManager executionManager =
_target
.Contracts.ExecutionManager;
2989
pCodeInfo->hotRegion.pAddress = codeStart.ToClrDataAddress(
_target
);
2993
pCodeInfo->coldRegion.pAddress = coldStart.ToClrDataAddress(
_target
);
3000
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3002
pCodeInfo->vmNativeCodeMethodDescToken = methodDesc.ToClrDataAddress(
_target
);
3006
if (
_target
.Contracts.TryGetContract(out ICodeVersions codeVersions))
3020
*pVmModule = module.ToClrDataAddress(
_target
);
3089
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3117
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3156
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3210
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3260
IRuntimeMutableTypeSystem? mts =
_target
.Contracts.TryGetContract<IRuntimeMutableTypeSystem>(out IRuntimeMutableTypeSystem enc) ? enc : null;
3419
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3448
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3449
TargetPointer mtAddr =
_target
.Contracts.Object.GetMethodTableAddress(new TargetPointer(addr));
3527
Contracts.ILoader loader =
_target
.Contracts.Loader;
3570
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3577
TypeDataWalk walk = new TypeDataWalk(
_target
, rts, canonTh, pTypeData->m_pList, (uint)pTypeData->m_nEntries);
3610
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3766
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3906
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3940
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3967
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
3968
IRuntimeMutableTypeSystem mrts =
_target
.Contracts.RuntimeMutableTypeSystem;
3969
Contracts.ILoader loader =
_target
.Contracts.Loader;
4071
ILoader loader =
_target
.Contracts.Loader;
4072
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4104
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4182
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4222
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4224
TargetPointer parentMT =
_target
.Contracts.Object.GetMethodTableAddress(objectAddress);
4282
ulong vmAppDomain =
_target
.Contracts.Loader.GetAppDomain().Value;
4284
IException exceptionContract =
_target
.Contracts.Exception;
4330
IObject obj =
_target
.Contracts.Object;
4375
IObject obj =
_target
.Contracts.Object;
4379
IBuiltInCOM builtInCom =
_target
.Contracts.BuiltInCOM;
4423
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4462
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4463
TargetPointer mtAddr =
_target
.Contracts.Object.GetMethodTableAddress(objectAddress);
4469
_target
.Contracts.Object.GetStringData(objectAddress, out uint length, out uint offset);
4501
IObject objectContract =
_target
.Contracts.Object;
4502
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4565
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
4570
TargetPointer mt =
_target
.Contracts.Object.GetMethodTableAddress(objectAddress);
4581
*pObjOffsetToVars = (uint)
_target
.GetTypeInfo(DataType.Object).Size!.Value;
4582
*pObjSize = (uint)
_target
.Contracts.Object.GetSize(objectAddress);
4627
*pRetVal =
_target
.Contracts.Debugger.GetDebuggerControlBlockAddress().Value;
4653
*pRetVal =
_target
.ReadPointer(new TargetPointer(ptr)).Value;
4716
TargetPointer obj =
_target
.ReadPointer(new TargetPointer(vmHandle));
4764
TargetPointer syncBlock =
_target
.Contracts.Object.GetSyncBlockAddress(vmObject);
4766
if (syncBlock == TargetPointer.Null || !
_target
.Contracts.SyncBlock.TryGetLockInfo(syncBlock, out threadId, out recursionCount))
4772
TargetPointer threadPtr =
_target
.Contracts.Thread.IdToThread(threadId);
4818
*pRetVal =
_target
.Contracts.Debugger.GetAttachStateFlags();
4853
Contracts.ILoader loader =
_target
.Contracts.Loader;
4916
Contracts.ThreadState threadState =
_target
.Contracts.Thread.GetThreadData(vmThread).State;
4948
walk = new HeapWalk(
_target
);
5108
IGC gc =
_target
.Contracts.GC;
5218
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
5219
TargetPointer mt =
_target
.Contracts.Object.GetMethodTableAddress(new TargetPointer(obj));
5261
walk = new RefWalk(
_target
, walkStacks != Interop.BOOL.FALSE, handleWalkMask);
5409
TargetPointer mt =
_target
.Contracts.Object.GetMethodTableAddress(new TargetPointer(obj));
5480
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
5516
uint firstFieldOffset = isReferenceType ?
_target
.GetTypeInfo(DataType.Object).Size!.Value : 0;
5520
IEcmaMetadata ecmaMetadataContract =
_target
.Contracts.EcmaMetadata;
5521
ISignature signature =
_target
.Contracts.Signature;
5536
Contracts.ModuleHandle enclosingModuleHandle =
_target
.Contracts.Loader.GetModuleHandleFromModulePtr(enclosingModulePtr);
5632
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
5650
pLayout->boxOffset = rts.IsCorElementTypeObjRef(componentType) ? 0u : (uint)
_target
.PointerSize;
5689
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
5691
uint pointerSize = (uint)
_target
.PointerSize;
5716
Target.TypeInfo objectHeaderTypeInfo =
_target
.GetTypeInfo(DataType.ObjectHeader);
5762
Contracts.IGC gc =
_target
.Contracts.GC;
5765
pHeapInfo->pointerSize = (uint)
_target
.PointerSize;
5807
bool hasReadWriteMetadata =
_target
.Contracts.EcmaMetadata.HasReadWriteMetadata(new TargetPointer(vmPEAssembly));
5843
if (
_target
.Contracts.TryGetContract<IReJIT>(out IReJIT rejit))
5845
ILoader loader =
_target
.Contracts.Loader;
5855
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
5894
if (!
_target
.Contracts.TryGetContract<IReJIT>(out IReJIT rejit))
5897
ILoader loader =
_target
.Contracts.Loader;
5911
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
5953
ILoader loader =
_target
.Contracts.Loader;
5962
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
5973
int headerSize = HeaderReaderHelpers.GetHeaderSize(
_target
, headerPtr);
5974
int codeSize = HeaderReaderHelpers.GetCodeSize(
_target
, headerPtr);
5976
if (HeaderReaderHelpers.TryGetLocalVarSigToken(
_target
, headerPtr, out int localToken) && localToken != 0)
6025
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
6063
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
6099
if (
_target
.Contracts.TryGetContract<IReJIT>(out _))
6101
ICodeVersions codeVersions =
_target
.Contracts.CodeVersions;
6146
_target
.Contracts.Debugger.EnableGCNotificationEvents(fEnable != Interop.BOOL.FALSE);
6207
DelegateInfo delegateInfo =
_target
.Contracts.Object.GetDelegateInfo(new TargetPointer(delegateObject));
6216
IExecutionManager eman =
_target
.Contracts.ExecutionManager;
6224
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
6231
Contracts.ModuleHandle moduleHandle =
_target
.Contracts.Loader.GetModuleHandleFromModulePtr(modulePtr);
6232
*ppFunctionAssembly =
_target
.Contracts.Loader.GetAssembly(moduleHandle).Value;
6266
DelegateInfo delegateInfo =
_target
.Contracts.Object.GetDelegateInfo(new TargetPointer(delegateObject));
6293
TargetPointer mt =
_target
.Contracts.Object.GetMethodTableAddress(vmObject);
6294
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
6312
Contracts.ILoader loader =
_target
.Contracts.Loader;
6344
*pResult =
_target
.Contracts.Debugger.MetadataUpdatesApplied() ? Interop.BOOL.TRUE : Interop.BOOL.FALSE;
6379
Contracts.ILoader loader =
_target
.Contracts.Loader;
6410
ContinuationInfo info =
_target
.Contracts.Object.GetContinuationInfo(new TargetPointer(continuationAddress));
6467
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
6475
Contracts.ICodeVersions cv =
_target
.Contracts.CodeVersions;
6486
IReadOnlyList<AsyncSuspensionInfo> suspensionPoints =
_target
.Contracts.DebugInfo.GetAsyncSuspensionPoints(pCode);
6549
Contracts.IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;
6737
Contracts.ILoader loader =
_target
.Contracts.Loader;
6793
Contracts.ILoader loader =
_target
.Contracts.Loader;
Dbi\DacDbiImpl.NativeCodeInfo.cs (1)
19
IRuntimeTypeSystem rts =
_target
.Contracts.RuntimeTypeSystem;