Class LocalSymbolMap


  • public class LocalSymbolMap
    extends java.lang.Object
    Local variables visible to a function. This includes mapped (on the stack) and unmapped (only stored in a register).
    • Constructor Detail

      • LocalSymbolMap

        public LocalSymbolMap​(HighFunction highFunc,
                              java.lang.String spcname)
        Parameters:
        highFunc - HighFunction the local variables are defined within.
        spcname - space name the local variables are defined within.
    • Method Detail

      • grabFromFunction

        public void grabFromFunction​(boolean includeDefaultNames)
        Populate the local variable map from information attached to the Program DB's function.
        Parameters:
        includeDefaultNames - is true if default symbol names should be considered locked
      • parseScopeXML

        public void parseScopeXML​(XmlPullParser parser)
                           throws PcodeXMLException
        Parse a local symbol scope in XML from the <localdb> tag.
        Parameters:
        parser - is the XML parser
        Throws:
        PcodeXMLException - for problems parsing individual tags
      • parseSymbolList

        public void parseSymbolList​(XmlPullParser parser)
                             throws PcodeXMLException
        Add mapped symbols to this LocalVariableMap, by parsing the <symbollist> and <mapsym> tags.
        Parameters:
        parser - is the XML parser
        Throws:
        PcodeXMLException - for problems parsing a tag
      • buildLocalDbXML

        public java.lang.String buildLocalDbXML()
        Returns:
        an XML document string representing this local variable map.
      • getSymbols

        public java.util.Iterator<HighSymbol> getSymbols()
        Get all the symbols mapped for this program, Param, Locals. The HighSymbol can either be a HighParam, or HighLocal
        Returns:
        an iterator over all mapped symbols.
      • findLocal

        public HighSymbol findLocal​(VariableStorage store,
                                    Address pc)
        Find any local variable (including input params) by address
        Parameters:
        store - - variable storage
        pc - = Address of first use, or null if address is valid throughout the entire scope
        Returns:
        HighLocal or null
      • findLocal

        public HighSymbol findLocal​(Address addr,
                                    Address pc)
        Find any local variable (including input params) by address
        Parameters:
        addr - - variable storage address
        pc - = Address of first use, or null if address is valid throughout the entire scope
        Returns:
        HighLocal or null
      • getSymbol

        public HighSymbol getSymbol​(int id)
        Lookup high variable based upon its symbol-id
        Parameters:
        id - symbol-id
        Returns:
        variable or null if not found
      • getNumParams

        public int getNumParams()
      • getParamSymbol

        public MappedSymbol getParamSymbol​(int i)
      • getParam

        public HighParam getParam​(int i)
      • containsVariableWithName

        public boolean containsVariableWithName​(java.lang.String name)
      • newDynamicSymbol

        public DynamicSymbol newDynamicSymbol​(java.lang.String nm,
                                              DataType dt,
                                              int sz,
                                              long hash,
                                              Address pcaddr,
                                              int format,
                                              int id)