Пример #1
0
        internal override void DoFinalize(CIElementFinalizationParameters aParams, Queue <CIElement> aCallBackLast, bool aForceFinalize)
        {
            CIContainer container = base.Container;

            // Find all the stacks and add them as children before we call the base class
            // method, since the base class will then take care of finalizing the new dynamically created
            // summarisable objects.
            CIElementList <CIStack> stacks = container.ChildrenByType <CIStack>(TChildSearchType.EEntireHierarchy);

            if (stacks != null && stacks.Count > 0)
            {
                foreach (CIStack stack in stacks)
                {
                    CISummarisableEntity entity = this[stack];
                    if (entity == null)
                    {
                        entity = new CISummarisableEntity(stack);
                        AddChild(entity);
                    }
                }
            }

            // Now, make sure there are summarisable wrappers created for any threads which do not have associated
            // stacks. Call stacks will be unavailable, but there's still plenty of useful information at the thread
            // process and register levels.
            CIElementList <CIThread> threads = container.ChildrenByType <CIThread>(TChildSearchType.EEntireHierarchy);

            if (threads != null && threads.Count > 0)
            {
                foreach (CIThread thread in threads)
                {
                    CISummarisableEntity entity = this[thread];
                    if (entity == null)
                    {
                        entity = new CISummarisableEntity(thread);
                        AddChild(entity);
                    }
                }
            }

            // Now run finalizers on children et al.
            base.DoFinalize(aParams, aCallBackLast, aForceFinalize);
        }
Пример #2
0
        internal void AddStacks(CIContainer aContainer)
        {
            CIElementList <CIStack> stacks = aContainer.ChildrenByType <CIStack>(CIElement.TChildSearchType.EEntireHierarchy);

            foreach (CIStack stack in stacks)
            {
                CXmlCallStack callStack = new CXmlCallStack();
                callStack.Read(stack);
                callStack.CleanStack();
                iCallStacks.Add(callStack);
            }
        }
Пример #3
0
        internal void AddRegisterLists(CIContainer aContainer)
        {
            CIElementList <CIRegisterListCollection> regListCols = aContainer.ChildrenByType <CIRegisterListCollection>(CIElement.TChildSearchType.EEntireHierarchy);

            foreach (CIRegisterListCollection regListCol in regListCols)
            {
                foreach (CIRegisterList regList in regListCol)
                {
                    iRegStorage.ReadRegisterData(regList);
                }
            }
        }
Пример #4
0
        internal void AddPanicedProcess(CIContainer aContainer)
        {
            CIElementList <CIProcess> processes = aContainer.ChildrenByType <CIProcess>(CIElement.TChildSearchType.EEntireHierarchy);

            if (processes.Count > 1)
            {
                System.Console.WriteLine("Warning: CrashInfoFilePlugin found multiple processes. CI file output can handle only one process!");
            }
            foreach (CIProcess process in processes)
            {
                iProcess = process.Name;
                iUID     = process.Uids.MostSignificant;
            }
        }
Пример #5
0
        internal void AddMemoryInfo(CIContainer aContainer)
        {
            CIElementList <CIMemoryInfo> list = aContainer.ChildrenByType <CIMemoryInfo>(CIElement.TChildSearchType.EEntireHierarchy);

            foreach (CIMemoryInfo info in list)
            {
                if (info.Type == CIMemoryInfo.TType.ETypeRAM)
                {
                    iFreeMomery = info.Free;
                }
                if (info.Type == CIMemoryInfo.TType.ETypeDrive)
                {
                    iDiskInfo = info.Free;
                }
            }
        }
Пример #6
0
        internal void AddThreadAndExitInfo(CIContainer aContainer)
        {
            CIElementList <CIThread> threads = aContainer.ChildrenByType <CIThread>(CIElement.TChildSearchType.EEntireHierarchy);

            if (threads.Count > 1)
            {
                System.Console.WriteLine("Warning: XmlFilePlugin found multiple threads. XML file output can handle only one thread!");
            }
            foreach (CIThread thread in threads)
            {
                iPanicCategory     = thread.ExitInfo.Category;
                iPanicID           = thread.ExitInfo.Reason;
                iPanicDescription  = XmlErrorLibrary.GetPanicDescription(iPanicCategory, iPanicID.ToString());
                iCrashedModuleName = thread.FullName;
            }
        }
        public override void Check(CIContainer aContainer)
        {
            CIElementList <CICodeSeg> allCodeSegs = aContainer.ChildrenByType <CICodeSeg>(CIElement.TChildSearchType.EEntireHierarchy);

            foreach (CICodeSeg codeSeg in allCodeSegs)
            {
                bool isResolved = codeSeg.IsResolved;
                if (!isResolved)
                {
                    CreateMissingWarning(codeSeg);
                }
                if (codeSeg.IsMismatched)
                {
                    CreateMismatchWarning(codeSeg);
                }
            }
        }
Пример #8
0
        internal void AddCodeSegments(CIContainer aContainer)
        {
            // Get the code segments
            CIElementList <CICodeSeg> codeSegs = aContainer.ChildrenByType <CICodeSeg>(CIElement.TChildSearchType.EEntireHierarchy);

            // Sort them
            Comparison <CICodeSeg> comparer = delegate(CICodeSeg aLeft, CICodeSeg aRight)
            {
                return(string.Compare(aLeft.Name, aRight.Name, true));
            };

            codeSegs.Sort(comparer);

            // List them
            foreach (CICodeSeg codeSeg in codeSegs)
            {
                uint   start = codeSeg.Range.Min;
                uint   end   = codeSeg.Range.Max;
                string name  = codeSeg.Name;

                CXmlCodeSegItem ciCodeSeg = new CXmlCodeSegItem(start, end, name);
                iCodeSegs.Add(ciCodeSeg);
            }
        }