Interface Reference

All Superinterfaces:
Comparable<Reference>
All Known Subinterfaces:
DynamicReference, EntryPointReference, ExternalReference, OffsetReference, ShiftedReference, StackReference, TraceOffsetReference, TraceReference, TraceShiftedReference, TraceStackReference
All Known Implementing Classes:
DBTraceOffsetReference, DBTraceReference, DBTraceShiftedReference, DBTraceStackReference, MemReferenceImpl, ThunkReference

public interface Reference extends Comparable<Reference>
Base class to hold information about a referring address. Derived classes add what the address is referring to. A basic reference consists of a "from" address, the reference type, the operand index for where the reference is, and whether the reference is user defined.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Operand index which corresponds to the instruction/data mnemonic.
    static final int
    Special purpose operand index when not applicable (i.e., Thunk reference)
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns Get the address of the code unit that is making the reference..
    int
    Get the operand index of where this reference was placed.
    Returns Get the type of reference being made..
    Gets the source of this reference.
    long
    Get the symbol ID associated with this reference.
    Returns Get the "to" address for this reference..
    boolean
    Returns Returns true if this reference is an instance of EntryReference..
    boolean
    Returns Returns true if this reference is an instance of ExternalReference..
    boolean
    Returns Returns true if this reference to an address in the programs memory space. This includes offset and shifted references..
    boolean
    Returns Return true if this reference is on the Mnemonic and not on an operand..
    boolean
    Returns Returns true if this reference is an instance of OffsetReference..
    boolean
    Returns Return true if this reference is on an operand and not on the Mnemonic..
    boolean
    Returns Return whether this reference is marked as primary..
    boolean
    Returns Returns true if this reference to an address in the programs register space..
    boolean
    Returns Returns true if this reference is an instance of ShiftedReference..
    boolean
    Returns Returns true if this reference is an instance of StackReference and refers to a stack location..

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Field Details

    • MNEMONIC

      static final int MNEMONIC
      Operand index which corresponds to the instruction/data mnemonic.
      See Also:
    • OTHER

      static final int OTHER
      Special purpose operand index when not applicable (i.e., Thunk reference)
      See Also:
  • Method Details

    • getFromAddress

      Address getFromAddress()
      Returns Get the address of the code unit that is making the reference..
      Returns:
      Get the address of the code unit that is making the reference.
    • getToAddress

      Address getToAddress()
      Returns Get the "to" address for this reference..
      Returns:
      Get the "to" address for this reference.
    • isPrimary

      boolean isPrimary()
      Returns Return whether this reference is marked as primary..
      Returns:
      Return whether this reference is marked as primary.
    • getSymbolID

      long getSymbolID()
      Get the symbol ID associated with this reference. Applies to memory references only.
      Returns:
      symbol ID or -1 if no symbol is associated with this reference
    • getReferenceType

      RefType getReferenceType()
      Returns Get the type of reference being made..
      Returns:
      Get the type of reference being made.
    • getOperandIndex

      int getOperandIndex()
      Get the operand index of where this reference was placed.
      Returns:
      op index or ReferenceManager.MNEMONIC
    • isMnemonicReference

      boolean isMnemonicReference()
      Returns Return true if this reference is on the Mnemonic and not on an operand..
      Returns:
      Return true if this reference is on the Mnemonic and not on an operand.
    • isOperandReference

      boolean isOperandReference()
      Returns Return true if this reference is on an operand and not on the Mnemonic..
      Returns:
      Return true if this reference is on an operand and not on the Mnemonic.
    • isStackReference

      boolean isStackReference()
      Returns Returns true if this reference is an instance of StackReference and refers to a stack location..
      Returns:
      Returns true if this reference is an instance of StackReference and refers to a stack location.
    • isExternalReference

      boolean isExternalReference()
      Returns Returns true if this reference is an instance of ExternalReference..
      Returns:
      Returns true if this reference is an instance of ExternalReference.
    • isEntryPointReference

      boolean isEntryPointReference()
      Returns Returns true if this reference is an instance of EntryReference..
      Returns:
      Returns true if this reference is an instance of EntryReference.
    • isMemoryReference

      boolean isMemoryReference()
      Returns Returns true if this reference to an address in the programs memory space. This includes offset and shifted references..
      Returns:
      Returns true if this reference to an address in the programs memory space. This includes offset and shifted references.
    • isRegisterReference

      boolean isRegisterReference()
      Returns Returns true if this reference to an address in the programs register space..
      Returns:
      Returns true if this reference to an address in the programs register space.
    • isOffsetReference

      boolean isOffsetReference()
      Returns Returns true if this reference is an instance of OffsetReference..
      Returns:
      Returns true if this reference is an instance of OffsetReference.
    • isShiftedReference

      boolean isShiftedReference()
      Returns Returns true if this reference is an instance of ShiftedReference..
      Returns:
      Returns true if this reference is an instance of ShiftedReference.
    • getSource

      SourceType getSource()
      Gets the source of this reference. SourceTypes
      Returns:
      the source of this reference