Beispiel #1
0
 public void Add(CISymbol aSymbol)
 {
     if (!iSymbols.ContainsKey(aSymbol.Id))
     {
         iSymbols.Add(aSymbol.Id, aSymbol);
     }
 }
        internal CIStackEntry(CIStack aParent, StackOutputEntry aEntry)
            : base(aParent.Container, aParent)
        {
            iEntry = aEntry;

            // If the stack entry references a symbol then associate it with
            // the parent dictionary immediately.
            if (aEntry.Symbol != null)
            {
                ICISymbolManager symbolManager = this.SymbolManager;
                CISymbol         symbol        = symbolManager.SymbolDictionary.Register(aEntry.Symbol);
                this.AddChild(symbol);
                base.Trace(string.Format("[CIStackEntry] address: 0x{0:x8}, symbol: {1}, symId: {2}", iEntry.Data, symbol.Symbol, symbol.Id));
            }
        }
        public static bool IsSymbolSerializable(CISymbol aSymbol)
        {
            bool ret = true;

            //
            if (aSymbol.IsNull)
            {
                ret = false;
            }
            else
            {
                TSymbolType type = aSymbol.Symbol.Type;
                ret = (type != TSymbolType.EUnknown);
            }
            return(ret);
        }
Beispiel #4
0
        public CIRegister(CIRegisterList aList, TArmRegisterType aType, string aName, uint aValue)
            : base(aList.Container)
        {
            iList = aList;

            // Create register and observe when it changes value
            iRegister     = new ArmRegister(aType, aName, aValue);
            iRegister.Tag = this;

            // Prepare non-resolved symbol. I.e. this saves the address
            // but doesn't actually do any symbolic look up at this stage.
            ICISymbolManager symbolManager = this.SymbolManager;
            CISymbol         symbol        = symbolManager.SymbolDictionary.Register(iRegister.Value);

            base.AddChild(symbol);
        }
Beispiel #5
0
 public CXmlSymbol(CISymbol aSymbol)
     : base(SegConstants.Symbols_SymbolSet_Symbol)
 {
     iSymbol = aSymbol;
 }
Beispiel #6
0
        private void EnsureCodeSegmentExistsForSymbol(CIElementFinalizationParameters aParams, CISymbol aSymbol)
        {
            if (!aSymbol.IsNull)
            {
                Symbol           symbol     = aSymbol;
                SymbolCollection collection = symbol.Collection;
                //
                string binaryInDevice = PlatformFileNameConstants.Device.KPathWildcardSysBin;
                binaryInDevice += Path.GetFileName(collection.FileName.EitherFullNameButDevicePreferred);
                //
                CICodeSegList codeSegs      = CodeSegments;
                bool          alreadyExists = codeSegs.Contains(binaryInDevice);
                if (!alreadyExists)
                {
                    // Assume no match found - create implicit/speculative code segment
                    AddressRange newCodeSegRange = collection.SubsumedPrimaryRange;
                    CICodeSeg    newCodeSeg      = CreateCodeSeg(binaryInDevice, newCodeSegRange.Min, newCodeSegRange.Max, false);

                    base.Trace("[CIProcess] EnsureCodeSegmentExistsForSymbol() - creating implicitly identified code seg: " + newCodeSeg.ToString() + " for symbol: " + aSymbol.ToString());

                    // Resolve it
                    newCodeSeg.Resolve(aParams.DebugEngineView);
                }
            }
        }