Class FunctionSymbol

  • All Implemented Interfaces:
    Symbol

    public class FunctionSymbol
    extends SymbolDB
    Symbol class for functions. Symbol Data Usage: EXTERNAL: String stringData - external memory address/label
    • Constructor Detail

      • FunctionSymbol

        public FunctionSymbol​(SymbolManager symbolMgr,
                              DBObjectCache<SymbolDB> cache,
                              Address address,
                              DBRecord record)
        Construct a new FunctionSymbol
        Parameters:
        symbolMgr - the symbol manager.
        cache - symbol object cache
        address - the address for this symbol.
        record - the record for this symbol.
    • Method Detail

      • isExternal

        public boolean isExternal()
        Description copied from interface: Symbol
        Returns true if this an external symbol.
        Returns:
        true if this an external symbol.
        See Also:
        Address.isExternalAddress()
      • delete

        public boolean delete()
        Description copied from interface: Symbol
        Delete the symbol and its associated resources. Any references symbol associations will be discarded.
        Specified by:
        delete in interface Symbol
        Overrides:
        delete in class SymbolDB
        Returns:
        true if successful
      • getObject

        public java.lang.Object getObject()
        Returns:
        object associated with this symbol or null if symbol has been deleted
      • isPrimary

        public boolean isPrimary()
        Specified by:
        isPrimary in interface Symbol
        Specified by:
        isPrimary in class SymbolDB
        Returns:
        true if this symbol is primary
      • isPinned

        public boolean isPinned()
        Description copied from interface: Symbol
        Returns true if the symbol is pinned to its current address. If it is pinned, then moving or removing the memory associated with that address will not affect this symbol.
        Specified by:
        isPinned in interface Symbol
        Overrides:
        isPinned in class SymbolDB
        Returns:
        true if the symbol is pinned to its current address.
      • setPinned

        public void setPinned​(boolean pinned)
        Description copied from interface: Symbol

        Sets whether or not this symbol is pinned to its associated address.

        If the symbol is pinned then moving or removing the memory associated with its address will not cause this symbol to be removed and will not cause its address to change. If the symbol is not pinned, then removing the memory at its address will also remove this symbol.

        Likewise, moving a memory block containing a symbol that is not anchored will change the address for that symbol to keep it associated with the same byte in the memory block.

        Specified by:
        setPinned in interface Symbol
        Overrides:
        setPinned in class SymbolDB
        Parameters:
        pinned - true indicates this symbol is anchored to its address. false indicates this symbol is not anchored to its address.
      • getProgramLocation

        public ProgramLocation getProgramLocation()
        Returns:
        a program location corresponding to this symbol
      • isValidParent

        public boolean isValidParent​(Namespace parent)
        Description copied from interface: Symbol
        Determines if the given parent is valid for this Symbol. Specified namespace must belong to the same symbol table as this symbol.
        Specified by:
        isValidParent in interface Symbol
        Specified by:
        isValidParent in class SymbolDB
        Parameters:
        parent - prospective parent namespace for this symbol
        Returns:
        true if parent is valid
      • doGetName

        protected java.lang.String doGetName()
        Description copied from class: SymbolDB
        The code for creating the name content for this symbol. This code will be called with the symbol's lock.
        Overrides:
        doGetName in class SymbolDB
        Returns:
        the name
      • validateNameSource

        protected SourceType validateNameSource​(java.lang.String newName,
                                                SourceType source)
        Description copied from class: SymbolDB
        Allow symbol implementations to validate the source when setting the name of this symbol
        Overrides:
        validateNameSource in class SymbolDB
        Parameters:
        newName - the new name
        source - the source type
        Returns:
        the validated source type
      • getReferences

        public Reference[] getReferences​(TaskMonitor monitor)
        Description copied from interface: Symbol
        Returns all memory references to the address of this symbol. If you do not have a TaskMonitor instance, then you can pass TaskMonitorAdapter.DUMMY_MONITOR or null.
        Specified by:
        getReferences in interface Symbol
        Overrides:
        getReferences in class SymbolDB
        Parameters:
        monitor - the monitor that is used to report progress and to cancel this potentially long-running call
        Returns:
        all memory references to the address of this symbol.
      • hasReferences

        public boolean hasReferences()
        Specified by:
        hasReferences in interface Symbol
        Overrides:
        hasReferences in class SymbolDB
        Returns:
        true if this symbol has at least one reference to it.