/// <summary> /// Unwind unmanaged frames within an native chain. /// </summary> /// <param name="thread">thread containing an unmanged frame</param> /// <param name="context">context containing the current context of the stack frame</param> /// <param name="endValue">address of the next managed frame</param> /// <returns>enumeration of MDbgFrames for the native frames</returns> /// <remarks>ICorDebug stackwalking only unwinds managed chains. /// A derived class can override this function to provide native stacktracing.</remarks> protected virtual IEnumerable<MDbgFrame> UnwindNativeFrames(MDbgThread thread, INativeContext context, long endValue) { // Base class can't unwind unmanaged chains. // A derived class can override and provide native stack unwinding. // Use: // 1) chain.RegisterSet to get the starting context. // 2) chain.GetStackRange(out start, out end); to get the stackrange to unwind to // 3) a native unwinder (such as DbgHelp.dll) to actually do the native stack unwinding. yield break; }
public KhrMaintenance1(INativeContext ctx) : base(ctx) { }
public ArbTransformFeedback3(INativeContext ctx) : base(ctx) { }
public ArbSync(INativeContext ctx) : base(ctx) { }
public HuaweiSubpassShading(INativeContext ctx) : base(ctx) { }
public ExtLightTexture(INativeContext ctx) : base(ctx) { }
public QComExtendedGet(INativeContext ctx) : base(ctx) { }
public KhrVisibilityMask(INativeContext ctx) : base(ctx) { }
public ArbES32Compatibility(INativeContext ctx) : base(ctx) { }
public ArbTransformFeedbackInstanced(INativeContext ctx) : base(ctx) { }
public ArbGeometryShader4(INativeContext ctx) : base(ctx) { }
public ArbMapBufferRange(INativeContext ctx) : base(ctx) { }
public ExtExtendedDynamicState2(INativeContext ctx) : base(ctx) { }
public ArbCopyBuffer(INativeContext ctx) : base(ctx) { }
/// <summary> /// Writes back the Thread Context of the thread that the CreateThreadNativeEvent was generated on /// </summary> /// <remarks>Setting a thread's context is very dangerous operation and must be used properly.</remarks> public void WriteContext(INativeContext context) { IntPtr hThread = IntPtr.Zero; try { hThread = NativeMethods.OpenThread(ThreadAccess.THREAD_ALL_ACCESS, true, (uint) ThreadId); using (IContextDirectAccessor w = context.OpenForDirectAccess()) { // context buffer is now locked NativeMethods.SetThreadContext(hThread, w.RawBuffer); } // w is disposed, this unlocks the context buffer. } finally { if (hThread != IntPtr.Zero) { NativeMethods.CloseHandle(hThread); } } }
public SgixAsync(INativeContext ctx) : base(ctx) { }
// ClsComplaint version of SetThreadContext. // Caller must ensure that the context is valid, and for the right architecture. public void SetContext(CorDebugSetContextFlag flag, INativeContext context) { using (IContextDirectAccessor w = context.OpenForDirectAccess()) { // context buffer is now locked SetThreadContext(flag, w.Size, w.RawBuffer); } }
public ArbTextureMultisample(INativeContext ctx) : base(ctx) { }
public NVConservativeRasterDilate(INativeContext ctx) : base(ctx) { }
public ArbTextureStorage(INativeContext ctx) : base(ctx) { }
public ArbVertexAttribBinding(INativeContext ctx) : base(ctx) { }
public ExtLineRasterization(INativeContext ctx) : base(ctx) { }
public AtiElementArray(INativeContext ctx) : base(ctx) { }
public NvxConditionalRender(INativeContext ctx) : base(ctx) { }
public ExtPolygonOffsetClamp(INativeContext ctx) : base(ctx) { }
public AmdPerformanceMonitor(INativeContext ctx) : base(ctx) { }
public NVMemoryObjectSparse(INativeContext ctx) : base(ctx) { }
public NVMemoryAttachment(INativeContext ctx) : base(ctx) { }
public ArbComputeShader(INativeContext ctx) : base(ctx) { }
public NVInstancedArrays(INativeContext ctx) : base(ctx) { }
/// <summary> /// copy the current context into the existing context buffer. Useful to avoid allocating a new context. /// </summary> /// <param name="context">already allocated context buffer</param> public void GetCurrentContext(INativeContext context) { Process.GetThreadContext(ThreadId, context); }
/// <inheritdoc cref="ExtensionBase" /> protected Enumeration(INativeContext ctx) : base(ctx) { }
// ClsComplaint version of GetThreadContext. // Caller must ensure that the context is valid, and for the right architecture. public void GetContext(INativeContext context) { using (IContextDirectAccessor w = context.OpenForDirectAccess()) { // context buffer is now locked // We initialize to a HUGE number so that we make sure GetThreadContext is updating the size variable. If it doesn't, // then we will hit the assert statement below. int size = Int32.MaxValue; this.GetThreadContext((ContextFlags)context.Flags,w.Size, out size, w.RawBuffer); // We should only assert when the buffer is insufficient. Since the runtime only keeps track of CONTEXT_CONTROL and CONTEXT_INTEGER // we will expect to create a larger buffer than absolutely necessary. The context buffer will be the size of a FULL machine // context. Debug.Assert(size <= w.Size, String.Format("Insufficient Buffer: Expected {0} bytes, but received {1}",w.Size, size)); } }
public ArbTextureView(INativeContext ctx) : base(ctx) { }
/* Set the INativeContext object for the given thread */ public void SetThreadContext(int threadId, INativeContext context) { using (IContextDirectAccessor w = context.OpenForDirectAccess()) { // context buffer is now locked SetThreadContext(threadId, w.RawBuffer, w.Size); } }
public ArbTextureBufferRange(INativeContext ctx) : base(ctx) { }