Class AddressConversionLists

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.AddressConversionLists

public class AddressConversionLists extends Object
IR-offset to/from native-address conversion lists.

Note that the native addresses mapping from an IR statement are stored in the IR itself (see IEStatement.getLowerLevelAddresses()). However, a complete mapping, for an entire IR CFG or statements list, may be built using the static methods offered by this class.

  • Constructor Details

  • Method Details

    • record

      public void record(long nativeAddress, int irOffset)
    • getNativeToInter

      public Map<Long,Integer> getNativeToInter()
    • convertNativeAddress

      public Integer convertNativeAddress(long address)
    • getInterToNative

      public Map<Integer,Long> getInterToNative()
    • convertIntermediateOffset

      public Long convertIntermediateOffset(int offset)
    • getIntermediateOffsetsMappingToNativeAddress

      public List<Integer> getIntermediateOffsetsMappingToNativeAddress(long address)
    • getNativeAddressesMappingToIntermediateOffset

      public List<Long> getNativeAddressesMappingToIntermediateOffset(int offset)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • formatConversionLists

      public static String formatConversionLists(Map<Integer,Long> interToNative, Map<Long,Integer> nativeToInter)
    • generateFromCFG

      public static AddressConversionLists generateFromCFG(CFG<IEStatement> cfg)
      Generate conversion lists from a CFG.
      Parameters:
      cfg - a CFG
      Returns:
      a conversion-lists object containing IR<>Native mapping information
      Throws:
      IllegalStateException - in DEBUG mode only, if the CFG and/or its statements contain inconsistencies
    • generateFromList

      public static AddressConversionLists generateFromList(List<IEStatement> stmlist)