Beispiel #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);
        }
Beispiel #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);
     }
 }
Beispiel #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;
 }
Beispiel #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);
     }
 }