Esempio n. 1
0
        internal void AddLocalVariables(ISymUnmanagedVariable[] variables)
        {
            var metadataReader = MetadataReader;

            int i = 0;

            foreach (var scopeHandle in metadataReader.GetLocalScopes(DebugHandle))
            {
                var scope = metadataReader.GetLocalScope(scopeHandle);
                foreach (var variableHandle in scope.GetLocalVariables())
                {
                    variables[i++] = new SymVariable(this, variableHandle);
                }
            }
        }
Esempio n. 2
0
        internal override int GetLocals(int bufferLength, out int count, ISymUnmanagedVariable[] locals)
        {
            var mdReader = SymMethod.MetadataReader;
            var scope    = mdReader.GetLocalScope(_handle);

            var handles = scope.GetLocalVariables();

            int i = 0;

            foreach (var handle in handles)
            {
                if (i >= bufferLength)
                {
                    break;
                }

                locals[i++] = new SymVariable(SymMethod, handle);
            }

            count = (bufferLength == 0) ? handles.Count : i;
            return(HResult.S_OK);
        }
        internal override int GetLocals(int bufferLength, out int count, ISymUnmanagedVariable[] locals)
        {
            var mdReader = SymMethod.MetadataReader;
            var scope = mdReader.GetLocalScope(_handle);

            var handles = scope.GetLocalVariables();

            int i = 0;
            foreach (var handle in handles)
            {
                if (i >= bufferLength)
                {
                    break;
                }

                locals[i++] = new SymVariable(SymMethod, handle);
            }

            count = (bufferLength == 0) ? handles.Count : i;
            return HResult.S_OK;
        }