Exemple #1
0
        private void AddCodeReference(List <CodeReference> codeRefs, Instruction instruction, uint target)
        {
            if (target == 0)
            {
                return;
            }
            foreach (CodeReference codeRef in codeRefs)
            {
                if (codeRef.Address == target)
                {
                    codeRef.References.Add(instruction);
                    instruction.Reference = codeRef;
                    return;
                }
            }
            CodeReference newCodeRef = new CodeReference();

            newCodeRef.Address = target;
            newCodeRef.References.Add(instruction);
            instruction.Reference = newCodeRef;
            codeRefs.Add(newCodeRef);
        }
Exemple #2
0
 private void AddCodeReference( List<CodeReference> codeRefs, Instruction instruction, uint target )
 {
     if( target == 0 )
         return;
     foreach( CodeReference codeRef in codeRefs )
     {
         if( codeRef.Address == target )
         {
             codeRef.References.Add( instruction );
             instruction.Reference = codeRef;
             return;
         }
     }
     CodeReference newCodeRef = new CodeReference();
     newCodeRef.Address = target;
     newCodeRef.References.Add( instruction );
     instruction.Reference = newCodeRef;
     codeRefs.Add( newCodeRef );
 }