Esempio n. 1
0
 public override GenericSymbolCollection this[int aIndex]
 {
     get
     {
         GenericSymbolCollection ret = null;
         //
         lock ( iEngineMap )
         {
             lock ( iEngineSymbol )
             {
                 int mapCount = iEngineMap.NumberOfCollections;
                 if (aIndex >= 0 && aIndex < mapCount)
                 {
                     ret = iEngineMap[aIndex];
                 }
                 else
                 {
                     int symbolBaseIndex = (aIndex - mapCount);
                     int symbolCount     = iEngineSymbol.NumberOfCollections;
                     if (symbolBaseIndex >= 0 && symbolBaseIndex < symbolCount)
                     {
                         ret = iEngineSymbol[symbolBaseIndex];
                     }
                 }
             }
         }
         //
         return(ret);
     }
 }
Esempio n. 2
0
        public GenericSymbol EntryByAddress(long aAddress)
        {
            GenericSymbolCollection collection = null;
            GenericSymbol           ret        = EntryByAddress(aAddress, out collection);

            return(ret);
        }
 public SymbolAddressRange(GenericSymbolCollection aCollection)
 {
     foreach (GenericSymbol sym in aCollection)
     {
         base.Add(sym.AddressRange);
     }
 }
Esempio n. 4
0
 protected void OnCollectionCreated(GenericSymbolCollection aCollection)
 {
     if (CollectionCreatedHandler != null)
     {
         CollectionCreatedHandler(this, aCollection);
     }
 }
Esempio n. 5
0
 public override GenericSymbolCollection this[int aIndex]
 {
     get
     {
         GenericSymbolCollection ret = iEngineSymbol[aIndex];
         return(ret);
     }
 }
Esempio n. 6
0
 public override GenericSymbolCollection this[int aIndex]
 {
     get
     {
         // Map files contain only a single symbol collection;
         GenericSymbolCollection ret = iFiles[aIndex][0];
         return(ret);
     }
 }
Esempio n. 7
0
        public GenericSymbolCollection CollectionByAddress(long aAddress)
        {
            // First check with the map file engine to see if there is a loaded
            // code segment entry that matches the specified address.
            GenericSymbolCollection ret = iEngineROFS.CollectionByAddress(aAddress);

            //
            if (ret == null)
            {
                ret = iEngineROM.CollectionByAddress(aAddress);
            }
            //
            return(ret);
        }
Esempio n. 8
0
        public static SymbolSymbol NewUnknown(GenericSymbolCollection aCollection)
        {
            SymbolSymbol symbol = new SymbolSymbol(aCollection);

            //
            symbol.OffsetAddress = GenericSymbol.KNullEntryAddress;
            symbol.Symbol        = GenericSymbol.KNonMatchingSymbolName;
            if (aCollection.HostBinaryFileName.Length > 0)
            {
                symbol.Object = Path.GetFileName(aCollection.HostBinaryFileName);
            }
            else
            {
                symbol.Object = GenericSymbol.KNonMatchingObjectName;
            }
            //
            return(symbol);
        }
Esempio n. 9
0
        public GenericSymbol EntryByAddress(long aAddress, out GenericSymbolCollection aCollection)
        {
            aCollection = null;
            GenericSymbolCollection rofsCollection = null;

            // First check with the map file engine to see if there is a loaded
            // code segment entry that matches the specified address.
            GenericSymbol ret = iEngineROFS.EntryByAddress(aAddress, ref rofsCollection);

            //
            if (ret == null)
            {
                GenericSymbolCollection romCollection = null;
                ret = iEngineROM.EntryByAddress(aAddress, ref romCollection);

                // Decide which collection to return in the case that
                // a) we found a matching symbol, or
                // b) when we didn't.
                if (ret == null && rofsCollection != null)
                {
                    // ROFS wins by default if we found something inside the ROFS engine...
                    aCollection = rofsCollection;
                }
                else
                {
                    // Otherwise we'll use the ROM collection (irrespective of whether something
                    // was found or not)
                    aCollection = romCollection;
                }
            }
            else
            {
                // ROFS wins
                aCollection = rofsCollection;
            }

            return(ret);
        }
Esempio n. 10
0
 public override GenericSymbolCollection this[int aIndex]
 {
     get
     {
         GenericSymbolCollection ret = null;
         //
         foreach (SymbolFileEngine engine in iFiles)
         {
             int count = engine.NumberOfCollections;
             if (aIndex < count)
             {
                 ret = engine[aIndex];
                 break;
             }
             else
             {
                 aIndex -= count;
             }
         }
         //
         return(ret);
     }
 }
Esempio n. 11
0
 private SymbolSymbol(GenericSymbolCollection aCollection)
     : base(aCollection)
 {
 }
Esempio n. 12
0
 public static SymbolSymbol New(GenericSymbolCollection aCollection)
 {
     return(new SymbolSymbol(aCollection));
 }