Class AddressLabelInfo

java.lang.Object
ghidra.program.model.lang.AddressLabelInfo
All Implemented Interfaces:
Comparable<AddressLabelInfo>

public class AddressLabelInfo extends Object implements Comparable<AddressLabelInfo>
AddressLabelInfo is a utility class for storing an Address together with a corresponding language-defined label or alias that is within the global namespace which is established with a SourceType of IMPORTED within a program.
  • Constructor Details

    • AddressLabelInfo

      public AddressLabelInfo(Address addr, Integer sizeInBytes, String label, String description, boolean isPrimary, boolean isEntry, ProcessorSymbolType type, Boolean isVolatile) throws AddressOverflowException
      Constructor for class AddressLabelInfo
      Parameters:
      addr - Address object that describes the memory address
      sizeInBytes - Integer describing the Size in bytes that the label applies to.
      label - String label or alias for the Address
      description - Label description
      isPrimary - boolean describes if this object is the primary label for the Address 'addr'
      isEntry - boolean describes if this object is an entry label for the Address 'addr'
      type - ProcessorSymbolType the type of symbol
      isVolatile - Boolean describes if the memory at this address is volatile
      Throws:
      AddressOverflowException
  • Method Details

    • getAddress

      public final Address getAddress()
      Returns:
      object's address.
    • getEndAddress

      public final Address getEndAddress()
      Returns:
      the object's end address.
    • getLabel

      public final String getLabel()
      Returns:
      the object's label or alias.
    • getDescription

      public final String getDescription()
      Returns:
      the object's description if it has one, null otherwise
    • getByteSize

      public final int getByteSize()
      Returns:
      the object's size in bytes. Always non-zero positive value and defaults to addressable unit size of associated address space.
    • isPrimary

      public final boolean isPrimary()
      Returns:
      whether the object is the primary label at the address.
    • isVolatile

      public final Boolean isVolatile()
      Returns:
      whether the object is volatile. Boolean.False when the address is explicitly not volatile. Boolean.True when the address is volatile. NULL when the volatility is not defined at this address.
    • getProcessorSymbolType

      public ProcessorSymbolType getProcessorSymbolType()
      Returns the type of processor symbol (if this was defined by a pspec) or null if this is not a processor symbol or it was not specified in the pspec file. It basically allows a pspec file to give more information about a symbol such as if code or a code pointer is expected to be at the symbol's address.
      Returns:
      the ProcesorSymbolType if it has one.
    • compareTo

      public int compareTo(AddressLabelInfo info)
      Specified by:
      compareTo in interface Comparable<AddressLabelInfo>
    • isEntry

      public boolean isEntry()
    • toString

      public String toString()
      Overrides:
      toString in class Object