示例#1
0
        public override ILiveWatchNode[] GetChildren(LiveWatchChildrenRequestReason reason)
        {
            if (_Children == null)
            {
                List <ILiveWatchNode> nodes = new List <ILiveWatchNode>();
                nodes.Add(new IsRunningNode(this));
                if (_Variables.pxStack != null && _Variables.pxTopOfStackLive != null)
                {
                    nodes.Add(new StackUsageNode(this));
                }
                if (_Variables.pxStack != null && _Variables.pxTopOfStack != null)
                {
                    nodes.Add(new HighestStackUsageNode(this));
                }

                _Children = nodes.Concat(new ILiveWatchNode[]
                {
                    _Engine.CreateNodeForPinnedVariable(_Variables.uxBasePriority, new LiveWatchNodeOverrides {
                        UniqueID = UniqueID + ".priority", Name = "Priority"
                    }),
                    _Engine.CreateNodeForPinnedVariable(_Variables.uxMutexesHeld, new LiveWatchNodeOverrides {
                        UniqueID = UniqueID + ".mutexes", Name = "Owned Mutexes"
                    }),
                    _Engine.CreateNodeForPinnedVariable(_TCB, new LiveWatchNodeOverrides {
                        UniqueID = UniqueID + ".tcb", Name = "[Raw TCB]"
                    })
                }).Where(c => c != null).ToArray();
            }
            return(_Children);
        }
示例#2
0
        public override ILiveWatchNode[] GetChildren(LiveWatchChildrenRequestReason reason)
        {
            if (_Children == null)
            {
                List <ILiveWatchNode> children = new List <ILiveWatchNode>();
                children.Add(_Engine.CreateNodeForPinnedVariable(_Engine.Symbols.LookupVariable("uxCurrentNumberOfTasks"), new LiveWatchNodeOverrides {
                    Name = "Total Tasks"
                }));
                children.Add(_Engine.CreateNodeForPinnedVariable(_Engine.Symbols.LookupVariable("xTickCount"), new LiveWatchNodeOverrides {
                    Name = "Tick Count"
                }));

                var pxCurrentTCB = _Engine.CreateLiveVariable("pxCurrentTCB", false);
                if (pxCurrentTCB != null)
                {
                    children.Add(new CurrentTaskNode(_Root, pxCurrentTCB));
                }

                var heapVar = _Engine.Symbols.LookupVariable("ucHeap");
                if (heapVar != null)
                {
                    int heapSize     = heapVar.Size;
                    var freeBytesVar = _Engine.CreateLiveVariable("xFreeBytesRemaining", false);
                    if (freeBytesVar != null)
                    {
                        children.Add(new HeapUsageNode(_Engine, freeBytesVar, HeapNodeType.Current, heapSize));
                    }

                    freeBytesVar = _Engine.CreateLiveVariable("xMinimumEverFreeBytesRemaining", false);
                    if (freeBytesVar != null)
                    {
                        children.Add(new HeapUsageNode(_Engine, freeBytesVar, HeapNodeType.Max, heapSize));
                    }
                }

                _Children = children.Where(c => c != null).ToArray();
            }

            return(_Children);
        }
示例#3
0
 public virtual ILiveWatchNode[] GetChildren(LiveWatchChildrenRequestReason reason) => null;