public IDebuggerCode GetCode(ILCodeKind kind) { return(debugger.Dispatcher.UI(() => { var code = frame.GetCode((dndbg.COM.CorDebug.ILCodeKind)kind); return code == null ? null : new DebuggerCode(debugger, code); })); }
/// <summary> /// Gets all locals /// </summary> /// <param name="kind">Kind</param> public IEnumerable <CorValue> GetILLocals(ILCodeKind kind) { var ilf4 = obj as ICorDebugILFrame4; if (ilf4 == null) { yield break; } ICorDebugValueEnum valueEnum; int hr = ilf4.EnumerateLocalVariablesEx(kind, out valueEnum); if (hr < 0) { yield break; } for (;;) { ICorDebugValue value = null; uint count; hr = valueEnum.Next(1, out value, out count); if (hr != 0 || value == null) { break; } yield return(new CorValue(value)); } }
public IDebuggerValue GetLocal(ILCodeKind kind, int index) { return(debugger.Dispatcher.UI(() => { var value = frame.GetILLocal((dndbg.COM.CorDebug.ILCodeKind)kind, index); return value == null ? null : new DebuggerValue(debugger, value); })); }
public IDebuggerValue[] GetLocals(ILCodeKind kind) => debugger.Dispatcher.UI(() => { var list = new List <IDebuggerValue>(); foreach (var v in CorFrame.GetILLocals((dndbg.COM.CorDebug.ILCodeKind)kind)) { list.Add(new DebuggerValue(debugger, v)); } return(list.ToArray()); });
public CorCode?GetCode(ILCodeKind kind) { var ilf4 = obj as ICorDebugILFrame4; if (ilf4 is null) { return(null); } int hr = ilf4.GetCodeEx(kind, out var code); return(hr < 0 || code is null ? null : new CorCode(code)); }
public CorValue?GetILLocal(ILCodeKind kind, uint index) { var ilf4 = obj as ICorDebugILFrame4; if (ilf4 is null) { return(null); } int hr = ilf4.GetLocalVariableEx(kind, index, out var value); return(hr < 0 || value is null ? null : new CorValue(value)); }
/// <summary> /// Gets the code or null if it's not an <see cref="ICorDebugILFrame4"/> or if there was an /// error /// </summary> /// <param name="kind">Kind</param> /// <param name="index">Index of local</param> /// <returns></returns> public CorCode GetCode(ILCodeKind kind, uint index) { var ilf4 = obj as ICorDebugILFrame4; if (ilf4 == null) { return(null); } ICorDebugCode code; int hr = ilf4.GetCodeEx(kind, out code); return(hr < 0 || code == null ? null : new CorCode(code)); }
public CorValue?GetILLocal(ILCodeKind kind, int index) => GetILLocal(kind, (uint)index);
/// <summary> /// Gets a local variable or null if it's not an <see cref="ICorDebugILFrame4"/> or if there /// was an error /// </summary> /// <param name="kind">Kind</param> /// <param name="index">Index of local</param> /// <returns></returns> public CorValue GetILLocal(ILCodeKind kind, int index) { return(GetILLocal(kind, (uint)index)); }
public IDebuggerCode GetCode(ILCodeKind kind) { return debugger.Dispatcher.UI(() => { var code = CorFrame.GetCode((dndbg.COM.CorDebug.ILCodeKind)kind); return code == null ? null : new DebuggerCode(debugger, code); }); }
public IDebuggerValue GetLocal(ILCodeKind kind, int index) { return debugger.Dispatcher.UI(() => { var value = CorFrame.GetILLocal((dndbg.COM.CorDebug.ILCodeKind)kind, index); return value == null ? null : new DebuggerValue(debugger, value); }); }
public IDebuggerValue[] GetLocals(ILCodeKind kind) { return debugger.Dispatcher.UI(() => { var list = new List<IDebuggerValue>(); foreach (var v in CorFrame.GetILLocals((dndbg.COM.CorDebug.ILCodeKind)kind)) list.Add(new DebuggerValue(debugger, v)); return list.ToArray(); }); }