Ejemplo n.º 1
0
        public bool Same(LocalVarDefinition obj)
        {
            LocalVarDefinition other = obj as LocalVarDefinition;

            return(other.name == name && other.ilEnd == ilEnd && other.ilStart == ilStart && ((signature == null && obj.signature == null) ||
                                                                                              signature.SequenceEqual <byte>(obj.signature)) && !removed);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get definitions of local variables in scope.
 /// </summary>
 /// <param name="scope">Interface refering to desired scope.</param>
 /// <param name="index">Index pointing to the last read variable.</param>
 /// <param name="definitions">List of definitions, where found variable definition are placed.</param>
 private void getDefinitionsForScope(ISymUnmanagedScope scope, ref int index, List <LocalVarDefinition> definitions)
 {
     ISymUnmanagedVariable[] variables = scope.GetLocals();
     foreach (ISymUnmanagedVariable var in variables)
     {
         LocalVarDefinition def = new LocalVarDefinition();
         def.ilStart   = scope.GetStartOffset();
         def.ilEnd     = scope.GetEndOffset();
         def.name      = var.GetName();
         def.signature = var.GetSignature();
         definitions.Add(def);
         ++index;
     }
     foreach (ISymUnmanagedScope cScope in scope.GetChildren())
     {
         getDefinitionsForScope(cScope, ref index, definitions);
     }
 }
Ejemplo n.º 3
0
 public bool Same(LocalVarDefinition obj)
 {
     LocalVarDefinition other = obj as LocalVarDefinition;
     return other.name == name && other.ilEnd == ilEnd && other.ilStart == ilStart && ((signature == null && obj.signature == null) ||
         signature.SequenceEqual<byte>(obj.signature)) && !removed;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Get definitions of local variables in scope.    
 /// </summary>
 /// <param name="scope">Interface refering to desired scope.</param>
 /// <param name="index">Index pointing to the last read variable.</param>
 /// <param name="definitions">List of definitions, where found variable definition are placed.</param>
 private void getDefinitionsForScope(ISymUnmanagedScope scope, ref int index, List<LocalVarDefinition> definitions)
 {
     ISymUnmanagedVariable[] variables = scope.GetLocals();
     foreach (ISymUnmanagedVariable var in variables) {
         LocalVarDefinition def = new LocalVarDefinition();
         def.ilStart = scope.GetStartOffset();
         def.ilEnd = scope.GetEndOffset();
         def.name = var.GetName();
         def.signature = var.GetSignature();
         definitions.Add(def);
         ++index;
     }
     foreach (ISymUnmanagedScope cScope in scope.GetChildren()) {
         getDefinitionsForScope(cScope, ref index, definitions);
     }
 }