Class CodePointer

java.lang.Object
com.pnfsoftware.jeb.core.units.code.Pointer
com.pnfsoftware.jeb.core.units.code.CodePointer
All Implemented Interfaces:
ICodePointer

@Ser public class CodePointer extends Pointer implements ICodePointer
Standard implementation of a pointer to code.
  • Constructor Details

    • CodePointer

      public CodePointer(long address, int mode)
      Create an entry-point address description.
      Parameters:
      address - address of the Entry point or -1 for unknown address.
      mode - optional processor mode, can be IProcessor.MODE_DEFAULT (0) if unknown/default
    • CodePointer

      public CodePointer(long address)
      Create an entry-point description using a default processor mode.
      Parameters:
      address -
    • CodePointer

      public CodePointer(ICodePointer src)
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Pointer
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Pointer
    • almostEquals

      public boolean almostEquals(Object obj)
      Equality that disregards the processor mode.
      Parameters:
      obj -
      Returns:
    • getMode

      public int getMode()
      Get the processor mode that should be used when parsing at the address.
      Specified by:
      getMode in interface ICodePointer
      Returns:
    • setMode

      public void setMode(int mode)
      Set the processor mode.
      Parameters:
      mode -
    • isUnknownAddress

      public boolean isUnknownAddress()
      Description copied from interface: ICodePointer
      Indicate if the entry-point relates to an unknown address
      Specified by:
      isUnknownAddress in interface ICodePointer
      Returns:
      true if address is unknown, false otherwise
    • toString

      public String toString()
      Description copied from interface: ICodePointer
      The returned format is 0xADDRESS(MODE) or simply 0xADDRESS for default mode.
      Specified by:
      toString in interface ICodePointer
      Overrides:
      toString in class Pointer
    • createFrom

      public static CodePointer createFrom(String entryPointAsString)
    • createFrom

      public static CodePointer createFrom(long internalAddress, INativeCodeModel<?> model)
    • createFrom

      public static CodePointer createFrom(ILocatedInstruction insn)
    • createFrom

      public static CodePointer createFrom(INativeMethodDataItem routineData)
    • createFrom

      public static CodePointer createFrom(INativeMethodItem routine)
    • createUnknown

      public static CodePointer createUnknown()
      Create an Entry Point Description pointing to an unknown address.
    • createUnknown

      public static CodePointer createUnknown(int mode)
      Create an Entry Point Description pointing to an unknown address.