コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: AD7StackFrame.cs プロジェクト: robindegen/MIEngine
        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);
        }