public int EnumChildren(enum_DEBUGPROP_INFO_FLAGS dwFields, uint dwRadix, ref Guid guidFilter, enum_DBG_ATTRIB_FLAGS dwAttribFilter, string pszNameFilter, uint dwTimeout, out IEnumDebugPropertyInfo2 ppEnum) { uint thId; thread.GetThreadId(out thId); var children = engine.DebuggedProcess.EnumChildren(GetVariableReference(), (int)thId, dwTimeout); DEBUG_PROPERTY_INFO[] info = new DEBUG_PROPERTY_INFO[children.Length]; for (int i = 0; i < children.Length; i++) { var vi = children[i]; ILProperty prop = new ILProperty(engine, thread, vi); if (vi.Type == VariableTypes.IndexAccess) { prop.Parameters = new VariableReference[] { VariableReference.GetInteger(vi.Offset) } } ; prop.Parent = this; info[i] = prop.GetDebugPropertyInfo(dwFields); } ppEnum = new AD7PropertyInfoEnum(info); return(Constants.S_OK); }
public AD7StackFrame(AD7Engine engine, AD7Thread thread, StackFrameInfo info, int index) { Engine = engine; uint tId; thread.GetThreadId(out tId); ThreadID = (int)tId; this.Thread = thread; this.StackFrameInfo = info; Index = index; _functionName = info.MethodName; if (info.LocalVariables != null) { localVars = new ILProperty[info.LocalVariables.Length]; for (int i = 0; i < localVars.Length; i++) { localVars[i] = new ILProperty(engine, thread, info.LocalVariables[i], this); propertyMapping[info.LocalVariables[i].Name] = localVars[i]; } } else { localVars = new ILProperty[0]; } docContext = new AD7DocumentContext(info); }
public void DoResolve() { string member = names[curIdx]; ILProperty prop; if (!parent.Children.TryGetValue(member, out prop)) { VariableReference reference = parent.GetVariableReference(); if (reference != null) { uint threadHash; thread.GetThreadId(out threadHash); var info = engine.DebuggedProcess.ResolveVariable(reference, member, (int)threadHash); if (info == null) { info = new VariableInfo(); info.Name = member; info.Value = "null"; info.TypeName = "null"; } prop = new AD7.ILProperty(info); } else { prop = null; } parent.Children[member] = prop; } parent = prop; curIdx++; if (curIdx < names.Length && parent != null) { DoResolve(); } else { resolved = true; property = parent; } }