コード例 #1
0
        // Load the local variable information.
        private void LoadVariables()
        {
            SymInfoEnumerator e;
            int      nameIndex, index;
            int      start, end;
            SymScope childScope;

            e = new SymInfoEnumerator(reader, token);
            while (e.MoveNext())
            {
                if (e.Type == SymReader.DataType_LocalVariables)
                {
                    // Local variables within the root scope.
                    while ((nameIndex = e.GetNextInt()) != -1)
                    {
                        index = e.GetNextInt();
                        rootScope.AddLocal
                            (reader.ReadString(nameIndex), index);
                    }
                }
                else if (e.Type == SymReader.DataType_LocalVariablesOffsets)
                {
                    // Local variables within a child scope.
                    start      = e.GetNextInt();
                    end        = e.GetNextInt();
                    childScope = rootScope.FindScope(end, start);
                    while ((nameIndex = e.GetNextInt()) != -1)
                    {
                        index = e.GetNextInt();
                        childScope.AddLocal
                            (reader.ReadString(nameIndex), index);
                    }
                }
            }
        }