Class Pointer

java.lang.Object
com.pnfsoftware.jeb.core.units.code.Pointer
Direct Known Subclasses:
CodePointer

@Ser public class Pointer extends Object
Description of a pointer or pointer to pointer. That includes memory address as well as optional memory size.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected long
    Mandatory address
    static final int
    Address references an area of code; it is recommended to use CodePointer instead for routines/methods.
    static final int
    Address references an area of data.
    static final int
    Address references a pointer (ie, this is a double-indirection) to an area of code; `size` is N/A.
    static final int
    address references a pointer (ie, this is a double-indirection) to an area of data; `size` is N/A.
    protected int
    Optional size, possibly 0 if unknown.
    protected int
    Possible type(s) for the bytes at the given address
    static final int
    Address references an area whose type is unknown.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pointer(long address)
     
    Pointer(long address, int size, int type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    long
    Get the address.
    int
    Get the size in bytes.
    int
    Get the pointer type.
    int
     
    void
    setSize(int size)
    Set the size in bytes.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • UNKNOWN

      public static final int UNKNOWN
      Address references an area whose type is unknown.
      See Also:
    • CODE

      public static final int CODE
      Address references an area of code; it is recommended to use CodePointer instead for routines/methods.
      See Also:
    • DATA

      public static final int DATA
      Address references an area of data.
      See Also:
    • PTRCODE

      public static final int PTRCODE
      Address references a pointer (ie, this is a double-indirection) to an area of code; `size` is N/A.
      See Also:
    • PTRDATA

      public static final int PTRDATA
      address references a pointer (ie, this is a double-indirection) to an area of data; `size` is N/A.
      See Also:
    • address

      protected long address
      Mandatory address
    • size

      protected int size
      Optional size, possibly 0 if unknown. Negative means address is an end address.
    • type

      protected int type
      Possible type(s) for the bytes at the given address
  • Constructor Details

    • Pointer

      public Pointer(long address, int size, int type)
      Parameters:
      address - pointed address
      size - optional size in bytes
      type - optional
    • Pointer

      public Pointer(long address)
  • Method Details

    • hashCode

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

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

      public long getAddress()
      Get the address.
      Returns:
    • getSize

      public int getSize()
      Get the size in bytes. May be 0.
      Returns:
    • setSize

      public void setSize(int size)
      Set the size in bytes.
    • getType

      public int getType()
      Get the pointer type.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object