public static ulong GetSize(this ISymbolEntry @this)
 {
     if (@this is SymbolEntry <uint> entryUInt32)
     {
         return(entryUInt32.Size);
     }
     if (@this is SymbolEntry <ulong> entryUInt64)
     {
         return(entryUInt64.Size);
     }
     throw new ArgumentException(ExceptionMessage);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Antmicro.Renode.Core.Symbol"/> class.
 /// </summary>
 /// <param name="originalSymbol">Original symbol.</param>
 /// <param name="mayBeThumb">Set to <c>true</c> if symbol is related to architecture that allows thumb symbols.</param>
 public Symbol(ISymbolEntry originalSymbol, bool mayBeThumb = false)
 {
     Start             = originalSymbol.GetValue();
     IsThumbSymbol     = false;
     thumbArchitecture = mayBeThumb;
     if (mayBeThumb)
     {
         UpdateIsThumbSymbol();
     }
     End     = Start + originalSymbol.GetSize();
     Name    = DemangleSymbol(originalSymbol.Name);
     Type    = originalSymbol.Type;
     Binding = originalSymbol.Binding;
 }
Esempio n. 3
0
 protected byte[] GetData(ISymbolEntry symbol, ulong size, ulong offset)
 {
     return(GetData(symbol.PointedSection, size, offset));
 }