Beispiel #1
0
        private SymbolCollection(IPlatformIdAllocator aIdAllocator, SymbolCollection aCopy)
        {
            iId                  = aIdAllocator.AllocateId();
            iIdAllocator         = aIdAllocator;
            iTag                 = aCopy.iTag;
            iOriginalCollection  = aCopy;
            iFlags               = aCopy.iFlags;
            iTagged              = aCopy.iTagged;
            iBaseAddress         = aCopy.iBaseAddress;
            iCodeSegmentResolver = aCopy.iCodeSegmentResolver;
            iRelocationHandler   = aCopy.iRelocationHandler;
            iFileName            = PlatformFileName.New(aCopy.FileName);
            iCodeSegmentResolver = aCopy.IfaceCodeSegmentResolver;
            iRelocationHandler   = aCopy.IfaceRelocationHandler;

            // Deep copy symbols
            foreach (Symbol symbol in aCopy)
            {
                Symbol clone = Symbol.NewClone(this, symbol);
                iSymbols.Add(clone);
            }

            // Recalculate addresses
            RecalculationAddressRange();
        }
Beispiel #2
0
 public override SymbolCollection this[PlatformFileName aFileName]
 {
     get
     {
         SymbolCollection ret = iQueryAPI[aFileName];
         return(ret);
     }
 }
Beispiel #3
0
 private SymbolCollection(IPlatformIdAllocator aIdAllocator, string aFileNameInHost)
 {
     iOriginalCollection = null;
     iId          = aIdAllocator.AllocateId();
     iIdAllocator = aIdAllocator;
     iFileName    = PlatformFileName.NewByHostName(aFileNameInHost);
     DefaultSymbolAdd();
 }
Beispiel #4
0
 public virtual SymbolCollection this[PlatformFileName aFileName]
 {
     get
     {
         lock ( iCollectionsAll )
         {
             SymbolCollection ret = iCollectionsAll[aFileName];
             return(ret);
         }
     }
 }
Beispiel #5
0
        public bool Contains(SymbolCollection aCollection)
        {
            bool ret = false;

            // Check not already added
            PlatformFileName name = aCollection.FileName;

            lock ( iFileNameDictionary )
            {
                ret = iFileNameDictionary.ContainsKey(name);
            }
            //
            return(ret);
        }
 private CodeCollection(IPlatformIdAllocator aIdAllocator, CodeCollection aCopy)
 {
     iId = aIdAllocator.AllocateId();
     //
     iCode                 = aCopy.iCode;
     iTag                  = aCopy.iTag;
     iFlags                = aCopy.iFlags;
     iTagged               = aCopy.iTagged;
     iBaseAddress          = aCopy.iBaseAddress;
     iCodeSegmentResolver  = aCopy.iCodeSegmentResolver;
     iRelocationHandler    = aCopy.iRelocationHandler;
     iFileName             = PlatformFileName.New(aCopy.FileName);
     iInstructionConverter = aCopy.IfaceInstructionConverter;
     iCodeSegmentResolver  = aCopy.IfaceCodeSegmentResolver;
     iRelocationHandler    = aCopy.IfaceRelocationHandler;
 }
Beispiel #7
0
        public bool IsMatchingCodeSegment(CodeSegDefinition aCodeSegment)
        {
            bool ret = false;

            //
            if (iCodeSegmentResolver != null)
            {
                ret = iCodeSegmentResolver.IsMatchingCodeSegment(this, aCodeSegment);
            }
            else
            {
                PlatformFileName codeSegName = PlatformFileName.NewByDeviceName(aCodeSegment.FileName);
                ret = FileName.Equals(codeSegName);
            }
            //
            return(ret);
        }
Beispiel #8
0
        public void Add(SymbolCollection aCollection)
        {
            // Check not already added
            PlatformFileName name = aCollection.FileName;

            lock ( iFileNameDictionary )
            {
                if (iFileNameDictionary.ContainsKey(name))
                {
                    throw new ArgumentException(string.Format("Collection \'{0}\' already exists", name));
                }
            }

            // Add to file name dictionary
            iFileNameDictionary.Add(name, aCollection);

            // Add to non-optimised collection
            iCollections.Add(aCollection);
        }
Beispiel #9
0
 public SymbolCollection this[PlatformFileName aFileName]
 {
     get
     {
         SymbolCollection ret = null;
         //
         foreach (SymSource source in SourceManager)
         {
             SymbolCollection col = source[aFileName];
             if (col != null)
             {
                 ret = col;
                 break;
             }
         }
         //
         return(ret);
     }
 }
Beispiel #10
0
 public SymbolCollection this[PlatformFileName aFileName]
 {
     get
     {
         Predicate <SymbolCollection> predicate = delegate(SymbolCollection collection)
         {
             bool same = collection.FileName.Equals(aFileName);
             return(same);
         };
         //
         SymbolCollection ret = null;
         //
         lock ( iCollections )
         {
             ret = iCollections.Find(predicate);
         }
         //
         return(ret);
     }
 }
Beispiel #11
0
 public abstract SymbolCollection this[PlatformFileName aFileName]
 {
     get;
 }
 private CodeCollection(IPlatformIdAllocator aIdAllocator, string aFileNameInHost)
 {
     iId       = aIdAllocator.AllocateId();
     iFileName = PlatformFileName.NewByHostName(aFileNameInHost);
 }