Package org.jakstab.loader

Examples of org.jakstab.loader.ExecutableImage


      if (targetExpression instanceof RTLMemoryLocation) {
        RTLMemoryLocation m = (RTLMemoryLocation)targetExpression;
        if (m.getAddress() instanceof RTLNumber) {
          long v = ((RTLNumber)m.getAddress()).longValue();
          AbsoluteAddress va = new AbsoluteAddress(v);
          ExecutableImage module = Program.getProgram().getModule(va);
          if (module != null) {
            String symbol = module.getSymbolFinder().getSymbolFor(va);
            if (!symbol.equals("")) res.append("(" + symbol + ")");
          } else {
            res.append(va);
          }
        }
View Full Code Here


    if (aMemVal.containsKey(m)) return aMemVal.get(m);
    else {
      // Check if the memory location references the program's data area or imports
      if (m.getAddress() instanceof RTLNumber) {
        AbsoluteAddress a = new AbsoluteAddress((RTLNumber)m.getAddress());
        ExecutableImage module = Program.getProgram().getModule(a);
        if (module == null) return NumberElement.getTop(m.getBitWidth());
        // only read memory from image if we havn't overapproximated yet or it's a read only section
        if (!dataIsTop || module.isReadOnly(a)) {
          try {
            RTLNumber mValue = module.readMemoryLocation(m);
            // Memory outside the program area is implicitly initialized to top
            if (mValue != null)
              return new NumberElement(mValue);
          } catch (IOException e) {
            // Fall through and return TOP
View Full Code Here

    } else if (region == MemoryRegion.GLOBAL) {

      // Check if the memory location references the program's data area or imports
      AbsoluteAddress a = new AbsoluteAddress(offset);
      ExecutableImage module = Program.getProgram().getModule(a);
      // only read memory from image if we havn't overapproximated yet or it's a read only section
      if (module != null && (!dataIsTop || module.isReadOnly(a))) {
        RTLNumber mValue;
        try {
          mValue = module.readMemoryLocation(
              ExpressionFactory.createMemoryLocation(
                  ExpressionFactory.createNumber(offset), bitWidth));
          // Memory outside the program area is implicitly initialized to top
          if (mValue != null)
            return valueFactory.createAbstractValue(mValue);
View Full Code Here

TOP

Related Classes of org.jakstab.loader.ExecutableImage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.