Class PcodeBlock

    • Constructor Detail

      • PcodeBlock

        public PcodeBlock()
    • Method Detail

      • typeToName

        public static java.lang.String typeToName​(int type)
      • nameToType

        public static int nameToType​(java.lang.String name)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getType

        public int getType()
      • getStart

        public Address getStart()
        Returns:
        the first Address covered by this block
      • getStop

        public Address getStop()
        Returns:
        the last Address covered by this block
      • setIndex

        public void setIndex​(int i)
      • getIndex

        public int getIndex()
      • addInEdge

        protected void addInEdge​(PcodeBlock b,
                                 int lab)
      • restoreNextInEdge

        protected void restoreNextInEdge​(XmlPullParser parser,
                                         java.util.ArrayList<? extends PcodeBlock> blockList)
                                  throws PcodeXMLException
        Restore the next input edge via XML. Resolve block indices via a blockList
        Parameters:
        parser -
        blockList - allows lookup of PcodeBlock via index
        Throws:
        PcodeXMLException
      • getOutRevIndex

        public int getOutRevIndex​(int i)
        Get reverse index of the i-th outgoing block. I.e this.getOut(i).getIn(reverse_index) == this
        Parameters:
        i - is the outgoing block to request reverse index from
        Returns:
        the reverse index
      • getInRevIndex

        public int getInRevIndex​(int i)
        Get reverse index of the i-th incoming block. I.e. this.getIn(i).getOut(reverse_index) == this
        Parameters:
        i - is the incoming block to request reverse index from
        Returns:
        the reverse index
      • getFalseOut

        public PcodeBlock getFalseOut()
        Assuming paths out of this block depend on a boolean condition
        Returns:
        the PcodeBlock coming out of this if the condition is false
      • getTrueOut

        public PcodeBlock getTrueOut()
        Assuming paths out of this block depend on a boolean condition
        Returns:
        the PcodeBlock coming out of this if the condition is true
      • getInSize

        public int getInSize()
      • getOutSize

        public int getOutSize()
      • calcDepth

        public int calcDepth​(PcodeBlock leaf)
      • saveXmlHeader

        public void saveXmlHeader​(java.lang.StringBuilder buffer)
      • saveXmlBody

        public void saveXmlBody​(java.io.Writer writer)
                         throws java.io.IOException
        Serialize information about the block to XML, other than header and edge info
        Parameters:
        writer - is where to serialize to
        Throws:
        java.io.IOException - if there is a problem with the stream
      • saveXmlEdges

        public void saveXmlEdges​(java.io.Writer writer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • restoreXmlBody

        public void restoreXmlBody​(XmlPullParser parser,
                                   BlockMap resolver)
                            throws PcodeXMLException
        Restore the any additional information beyond header and edges from XML
        Parameters:
        parser - is the XML parser
        resolver - is for looking up edge references
        Throws:
        PcodeXMLException - for invalid XML descriptions
      • saveXml

        public void saveXml​(java.io.Writer writer)
                     throws java.io.IOException
        Throws:
        java.io.IOException