示例#1
0
 public void Reset()
 {
     Dict.Clear();
     Parent = null;
     Children.Clear();
 }
示例#2
0
        public MemoryManager()
        {
            try
            {
                // Prep:
                RootNode = null;
                Nodes    = new Dictionary <long, MemoryNode>();

                ReadRootNode();
                if (RootNode == null)
                {
                    return;
                }

                var AllNodes =
                    new UITreeNode[] { RootNode }
                .Concat(RootNode.EnumerateChildrenTransitive(PyMemoryReader)).ToArray();

                //	show off the spoils....
                foreach (var Node in AllNodes)
                {
                    MemoryNode memNode = new MemoryNode();
                    memNode.BaseAddress = Node.BaseAddress;

                    var Dict = Node.Dict;

                    if (null == Dict)
                    {
                        continue;
                    }

                    var DictSlots = Dict.Slots;

                    if (null == DictSlots)
                    {
                        continue;
                    }

                    //	show info for each entry in dict that has a String as Key.
                    foreach (var Entry in DictSlots)
                    {
                        var EntryKeyStr = Entry.KeyStr;

                        if (null == EntryKeyStr)
                        {
                            continue;
                        }

                        var          me_value   = Entry.me_value;
                        PyTypeObject typeObject = new PyObject(me_value.Value, MemoryReader).LoadType(PyMemoryReader);

                        MemoryDictEntry memEntry = new MemoryDictEntry(Entry.BaseAddress, EntryKeyStr, GetTypeName(me_value), ReadValue(me_value));
                        memNode.AddMemoryDictEntry(memEntry);
                    }

                    Nodes.Add(memNode.BaseAddress, memNode);
                }
            }
            finally
            {
            }
        }
示例#3
0
 public MemoryNode()
 {
     Dict     = new Dictionary <string, MemoryDictEntry>();
     Parent   = null;
     Children = new List <MemoryNode>();
 }