private void CreateRegisterContent(enum_DEBUGPROP_INFO_FLAGS dwFields, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { IReadOnlyCollection <RegisterGroup> registerGroups = Engine.DebuggedProcess.GetRegisterGroups(); elementsReturned = (uint)registerGroups.Count; DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[elementsReturned]; Tuple <int, string>[] values = null; Engine.DebuggedProcess.WorkerThread.RunOperation(async() => { values = await Engine.DebuggedProcess.GetRegisters(Thread.GetDebuggedThread().Id, ThreadContext.Level); }); int i = 0; foreach (var grp in registerGroups) { AD7RegGroupProperty regProp = new AD7RegGroupProperty(Engine, dwFields, grp, values); propInfo[i] = regProp.PropertyInfo; i++; } enumObject = new AD7PropertyInfoEnum(propInfo); }
private void CreateRegisterContent(enum_DEBUGPROP_INFO_FLAGS dwFields, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { IReadOnlyCollection<RegisterGroup> registerGroups = Engine.DebuggedProcess.GetRegisterGroups(); elementsReturned = (uint)registerGroups.Count; DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[elementsReturned]; Tuple<int, string>[] values = null; Engine.DebuggedProcess.WorkerThread.RunOperation(async () => { values = await Engine.DebuggedProcess.GetRegisters(Thread.GetDebuggedThread().Id, ThreadContext.Level); }); int i = 0; foreach (var grp in registerGroups) { AD7RegGroupProperty regProp = new AD7RegGroupProperty(dwFields, grp, values); propInfo[i] = regProp.PropertyInfo; i++; } enumObject = new AD7PropertyInfoEnum(propInfo); }